Presign

Plain English for what you sign, evidence for who you trust: a pre-signing checkpoint on Arkiv

Presign

Created At

ETHGlobal Mumbai

Project Description

When you sign with a crypto wallet, you usually see an address and a wall of hex. Since EIP-7702, one signature can also hand your entire account to a smart contract. On October 29, a Binance hot wallet signed 50 such authorizations to an hours-old sweeper contract; Binance estimates about $6.3B was lost in the incident.

PreSign is the checkpoint before every signature. It answers two questions before anything is signed:

  1. "What does this do?" We mirror the Ethereum Foundation's ERC-7730 clear-signing registry to Arkiv: 1,917 contracts on 143 chains, 201 of them audited by Cyfrin. Each entry carries a fingerprint (ERC-8176) that every reader re-computes, so raw calldata becomes plain English like "Wrap 0.001 ETH", and a tampered translation is blocked.

  2. "Who am I handing my account to?" The Delegation Radar doesn't ask who a contract claims to be. A Watchtower reads EIP-7702 delegations on-chain and publishes evidence about each delegate to Arkiv: same code as a known drainer (16 drainer families), upgradeable logic, and logic changes since first seen, written as readonly alerts that nobody can delete. It already found a live mainnet delegate whose bytecode is byte-for-byte the published CrimeEnjoyor drainer. The wallet vendors' own delegate lists (MetaMask, Coinbase, Uniswap, OKX, ZeroDev, Alchemy; 41 entries on 7 chains) are mirrored too, as one signal among several.

check() turns this into the verdict a wallet, exchange or AI agent shows: verified, caution or blocked, with the evidence behind it. The Signer Guard refuses to sign anything that isn't verified. Everything lives publicly on Arkiv: any wallet can read it directly, with no PreSign server in between.

How it's Made

PreSign is a TypeScript monorepo (npm workspaces) built on Arkiv's Rabdi testnet with @arkiv-network/sdk and viem.

  • core: Arkiv schemas and reader, ERC-8176 fingerprints (keccak256 of the JCS-canonicalized descriptor), the ERC-7730 formatter, bytecode code-family matching, and check(), the deterministic verdict engine. No AI at signing time; every verdict comes from verified data and fixed rules.
  • importer: downloads the EF registry as one GitHub tarball at a pinned commit and reads it fully in memory. That's one request instead of ~1,000 API calls, and it avoids a macOS bug where two Morpho files differing only by letter case would overwrite each other on disk. Descriptors are gzip-compressed to fit Arkiv's 128 KiB limit and written in resumable batches, then read back to confirm. Cyfrin's EAS attestations are verified against our own fingerprints. Vendor delegates are only imported if the address is found in the vendor's own GitHub file at a pinned commit, with a per-chain code hash.
  • keeper: re-syncs every source daily. Unchanged entries get their 7-day expiry extended, changed ones are superseded, removed ones stop being trusted immediately, and every change is written as a readonly Change record. If a source can't be read, nothing changes, so an outage can't "remove" trusted entries.
  • watchtower (Delegation Radar): scans EIP-7702 authorizations, recovers who delegated, strips contract metadata and blanks embedded addresses so drainer clones match the same code family, detects upgradeable logic (EIP-1967 proxies and beacons), and writes readonly alerts when a delegate's logic changes.
  • guard: wraps a wallet client and refuses to sign unless check() says verified, tested with real type-4 transactions on Sepolia.
  • web: React + Vite. Every number and verdict is read live from Arkiv in the browser. MetaMask on Sepolia, and any transaction hash can be explained on 7 networks.

Why Arkiv: a trust layer shouldn't need trust in us. Entities prove their publisher (readers filter with createdBy), expire unless re-confirmed, and alerts are readonly, so history can't be quietly rewritten.

Hacky but notable: to prove the Radar works, we deployed a harmless delegate behind a beacon, delegated an account to it, then swapped the logic for a drainer. The address and code never changed, so an allowlist would still say it's fine, but the Watchtower caught the logic change and PreSign blocked it. We also rebuilt the whole mirror from a fresh clone with a brand-new publisher and got field-for-field identical data. 46 tests, CI on every push.

background image mobile

Join the mailing list

Get the latest news and updates