Verbaatim

Guilty until proven verbatim: Ethereum refuses any transaction that isn’t the sentence you signed.

Verbaatim

Created At

ETHGlobal Mumbai

Project Description

Verbatim: Chain-Enforced Clear Signing for Frame Transactions

Sentence-bound validation and guarantee enforcement on EIP-8141 and ERC-8421

Draft for ETHGlobal Mumbai, November 2026. Implementation: github.com/Shaurya2k06/verbatim at commit 6146a79.


Abstract

Every wallet that offers "clear signing" today renders the transaction itself. The chain never checks that what a signer saw matches what executes. The February 2025 Bybit incident (about $1.5B) exploited exactly this gap: a tampered frontend showed the signers one transaction and submitted another.

We present Verbatim, an account and validation architecture that moves this check on chain. The owners do not sign calldata. They sign a hash of a canonical, deterministically rendered sentence (VTREE) and of the guarantees derived from it (VSPEC). During transaction validation, the chain re-renders the sentence from the transaction's real calldata, using attested descriptors pinned to code hashes. If the result differs from what the owners signed, the transaction is never admitted to the mempool. During execution, the account asserts every guarantee the sentence made about tracked assets. If any fails, the batch reverts and only the fee is paid.

We make five contributions:

  1. On-chain sentence re-rendering bound to the owners' signatures, for arbitrary EVM contracts, enforced at mempool admission.
  2. Guarantees derived from the signed sentence and enforced in the account, including a rule that no approval outlives its batch.
  3. Stateless validation through protocol-validated attestation entries. Trust data travels inside the transaction as EIP-8141 explicit-digest signature entries plus Merkle proofs, so validation reads no global state.
  4. An on-chain renderer for Uniswap's Universal Router and v4, which reads hook risk from the hook's address bits.
  5. Four measured rule findings against the ERC-8421 reference implementation.

On the public EF frames devnet and on Sepolia, all 69 recorded cases meet their expected result, 45 of them attacks stopped on a live network. Both paths fit the deployed 100,000-gas validation cap:

  • paymaster path: 85.4k for a transfer and 90.6k for a v4 swap;
  • stateless path, with no stake at all: 90.5k for a transfer and 96.5k for a swap.

With 50 transactions pending from 50 senders, rotating the snapshot invalidated all 50 on the paymaster path and none on the stateless path. We also compromised Uniswap's real web interface at build time. An ordinary wallet that signed its swap kept about 1% of the output, while Verbatim refused the identical bytes.


1. Introduction

1.1 The gap

A hardware wallet's screen is often described as the last line of defence. That only holds if the screen shows what the chain will execute. Today it shows what the wallet's own decoder computes from calldata the host supplied, using metadata the host may also supply.

Recent standards have improved the decoder:

  • ERC-7730 descriptors specify how to display calls;
  • ERC-8176 adds integrity attestations for those descriptors;
  • ERC-8283 proposes an on-chain registry for them.

All of them still sit on the wallet side, and they leave three problems open:

  1. Nothing binds the signature to the rendering. The signature covers calldata, not the display, so a compromised host can show one display and submit other calldata.
  2. Nothing checks effects. A contract can describe itself truthfully ("deposit 1 ETH into the vault") and do something else, such as keep the ETH and mint no shares.
  3. Every wallet renders independently. There is no canonical form, so there is nothing for the chain to compare against.

1.2 Our approach

Verbatim makes the chain the screen. A transaction carries a commitment to:

  • a canonical sentence T: a typed display tree with a fixed byte encoding;
  • guarantees S = derive(T): a list of assertions computed deterministically from T.

The owners sign D_owner, an EIP-712 digest over (hash T, hash S, expiry, snapshotRoot, path, txCommit). Two checks then follow:

  • At validation, a verifier re-renders T' from the transaction's real calldata, using descriptors attested in a signed snapshot. It rebuilds the digest from its own render and requires every owner signature to be over that digest. A lie about the sentence therefore never reaches a block.
  • At execution, the account records the tracked holdings, runs the calls, and asserts S. A lie about effects reverts.

EIP-8141 frame transactions make this practical. A transaction is a sequence of frames, and VERIFY frames run validation logic that can inspect every other frame's data, the signature list, and transaction parameters through new opcodes. ERC-8421 defines an alternative mempool in which staked entities may read their own storage during validation. Together they allow a contract to run a full renderer during validation, under mempool-safe rules.

1.3 Contributions

| # | Contribution | Closest prior art | Difference | |---|---|---|---| | N1 | The chain re-renders the signed sentence during validation and binds the owners' signatures to it | Cosmos ADR-050 (SIGN_MODE_TEXTUAL) | ADR-050 covers fixed Cosmos message types. Verbatim covers arbitrary EVM contracts through code-pinned descriptors, and rejects at the mempool | | N2 | Guarantees derived from the signed sentence, enforced in the account, and durable across batches | EIP-7906; Safe guards; MetaMask caveats | Those need a fork or hand-written rules. Verbatim derives the rules from what the owners read | | N3 | Stateless validation: trust data is carried as protocol-validated explicit-digest signature entries plus Merkle proofs | Pull oracles | Pull oracles carry signed data, but not as protocol-checked signature entries feeding mempool validation | | N4 | On-chain Universal Router and v4 rendering, with hook risk from address bits | Wallet-side UR decoders | No on-chain renderer existed, and none was bound to a signature | | N5 | Measured invalidation behaviour, plus four ERC-8421 rule findings | — | New empirical data for the rules' author |


2. Background

2.1 EIP-8141 frame transactions

A type-0x06 transaction carries [chain_id, nonce_keys, nonce_seq, sender, frames, signatures, fees, blob_hashes, recent_root_references].

Frames have one of three modes:

  • VERIFY: executes as a static call and must end in APPROVE (0xaa) with a scope of PAYMENT, EXECUTION or both;
  • SENDER: executes as the sender;
  • DEFAULT: executes from the entry point.

Opcodes expose the transaction to frame code:

  • TXPARAM (0xb0) for the nonce, sender, fee caps, frame count, current frame index and signature count;
  • FRAMEPARAM (0xb3) for each frame's mode, flags, target, value, gas and data length;
  • FRAMEDATALOAD and FRAMEDATACOPY (0xb1/0xb2) for each frame's data;
  • SIGPARAM (0xb4) for each signature entry's resolved signer, scheme and message.

Signature entries are [scheme, signer, msg, signature]. An entry with an explicit 32-byte msg is an explicit digest: the protocol checks it before any frame runs, at a fixed price (2,800 gas for SECP256K1), and frames can read the resolved signer and the message. This is the primitive Verbatim builds on. A verifier needs no ecrecover; it only has to check that the protocol-validated signer signed the digest the verifier itself rebuilt.

Expiry. A canonical expiry verifier is a VERIFY-frame contract whose data is an 8-byte timestamp. It reverts once the block timestamp passes it, which gives an absolute expiry without exposing TIMESTAMP to account validation.

2.2 ERC-8421 alternative mempool

ERC-8421 defines the prefix shapes a mempool accepts (PREFIX-010), such as [self_verify], [only_verify, pay], and an optional leading expiry_verify. Its storage rules allow:

  • the sender's own storage (STORAGE-010);
  • storage associated with the sender (STORAGE-021);
  • a staked entity's own storage (STORAGE-031/032).

It sets a validation budget of 100k per unstaked entity and 1M per staked entity (BUDGET-010). It limits pending transactions to 4 per (sender, nonce key) and 64 per unstaked sender (LIFECYCLE-030), and revalidates pending transactions when a storage dependency changes (LIFECYCLE-040).

2.3 Clear signing

  • ERC-7730 describes how to display a contract's calls as JSON metadata.
  • ERC-8176 attests the integrity of a descriptor.
  • ERC-8283 registers descriptors on chain.

All of them inform a wallet's renderer. None of them constrains what executes.


3. Threat model

Adversary. The adversary controls the host, frontend, RPC, relayer and bundler. It can:

  • substitute calldata, reorder or omit frames, add or remove signatures, and choose gas limits;
  • delay submission arbitrarily;
  • deploy contracts, including contracts that describe themselves truthfully but have hidden effects on assets.

Trusted:

  • the signing device's decoder, screen, clock and key;
  • the owners' keys;
  • the attestor quorum. On the ENS deployment, the quorum and the ENS publisher must collude to lie;
  • the EVM.

Our own off-chain code is untrusted: a mismatch between the renderers fails closed.

In scope:

  • a human reading a sentence on a device while the host tampers with the transaction (the Bybit class);
  • contracts with hidden effects on tracked assets;
  • swap frontends that lie about minimum output, route, recipient or hook risk;
  • stale pre-signed transactions.

Out of scope:

  • compromised machine signers and stolen keys;
  • sentences that are accurate but misunderstood;
  • the meaning of admin parameters, and protocol-internal ledgers beyond what descriptors render;
  • unattested contracts, which are refused, not supported.

A captured attestor quorum is a residual risk, not a defeat. It can mislabel spenders, tokens or names. It cannot change the amounts in signed guarantees, the no-standing-approvals rule, or execution-time revocation.


4. Design

4.1 Overview

All trust data lives in one snapshot: a typed, sorted Merkle tree signed by a k-of-n attestor set. The snapshot reaches validation by one of two delivery paths, and the wallet chooses between them by gas.

 STATELESS PATH (any frame mempool)            PAYMASTER PATH (ERC-8421)
 frame 0  VERIFY  expiry verifier              frame 0  VERIFY  expiry verifier
 frame 1  VERIFY  account: proofs, render,     frame 1  VERIFY  account: layout, owners, replay
                  owners, attestors, policy    frame 2  VERIFY  RendererPaymaster: render from
 frame 2  SENDER  account.executeVerified                       cache, rebuild D_owner, ticket
                                               frame 3  SENDER  account.executeVerified

| | Stateless | Paymaster | |---|---|---| | Who renders | The account, in its own VERIFY frame | A staked RendererPaymaster | | How trust data arrives | Attestor signature entries and Merkle proofs in the transaction | Root and leaves cached in the paymaster's storage | | What validation reads | Sender storage, EXTCODEHASH, transaction data | The paymaster's own storage (staked), EIP-1967 slots | | Mempools | Public frame pool and ERC-8421 | ERC-8421 only | | Stake | None | The paymaster is staked | | Invalidation caused by a trust update | None | Cache writes trigger LIFECYCLE-040 | | Revocation | Snapshot TTL in validation; immediate at execution | Immediate in validation |

Routing rule. Use the stateless path when the account's VERIFY frame, signatures and proofs included, fits the cap with at least 10k to spare. Otherwise use the paymaster path, if it fits the node's actual cap.

The same logic also runs behind ERC-4337 (path 3), with any bundler and no paymaster. In that case txCommit = userOpHash and validUntil = expiry.

4.2 The sentence: VTREE v2

A VTREE is laid out as MAGIC "VT\0\2" | Header | Node*.

  • Header: chainId, account, expiry, snapshotRoot, policyVersion and path.
  • Nodes: typed, length-prefixed records:
    • CALL_BEGIN/CALL_END: target, codehash, selector, descHash, intent, publisher and attestation status;
    • ADDRESS, with the name's source (hex, or a verified NAME leaf);
    • AMOUNT: the raw uint256, never rounded;
    • UINT, BOOL, ENUM, BYTES (hashed) and ETH_VALUE;
    • GROUP, for a router command, a v4 action or a nested call;
    • RISK, carrying a code;
    • BLIND: undecodable bytes, bound by an assertion or refused;
    • FEE;
    • GUARANTEE, emitted in VSPEC order.

The device shows the guarantees first. Strings are restricted to printable ASCII, excluding the backslash, at most 48 bytes, with fixed decimal formatting. The device refuses unknown node types and anything outside these limits. The tree carries no global epoch: each call binds its own descriptor hash, so refreshing unrelated trust data invalidates nothing.

Risk codes come in three groups:

  • general: UNLIMITED_APPROVAL, OPERATOR_APPROVAL, UPGRADEABLE_TARGET, UNVERIFIED_CONTRACT, TRUST_CHANGE, RECIPIENT_HAS_CODE, RECIPIENT_NOT_SELF;
  • Uniswap-specific: NO_MIN_OUT, HOOK_CAN_TAKE_INPUT, HOOK_CAN_TAKE_OUTPUT, HOOK_DYNAMIC_FEE, HOOK_UNVERIFIED, SWEEP_TO_OTHER, PERMIT2_ALLOWANCE_CHANGE, UR_ALLOW_REVERT;
  • time: TTL_LONG.

4.3 The guarantees: VSPEC

The guarantees are S = derive(T), and specHash = keccak(S). S must equal the encoding of T's GUARANTEE section byte for byte. Its items are:

| Item | Meaning | |---|---| | DELTA_EQ(holder, asset, int256) | An exact balance change | | DELTA_GE(holder, asset, uint256) | A minimum receipt | | ALLOW_LE, P2ALLOW_LE | ERC-20 and Permit2 allowance ceilings | | OPERATOR_EQ, OWNER_EQ | NFT operator and ownership state | | CODEHASH_EQ, NO_CODE | Target code identity | | TRACKED_NO_DECREASE | No tracked holding decreases beyond the stated deltas | | TRACKED_NO_ALLOW_INC | No tracked allowance increases beyond the stated ones | | ACCOUNT_INVARIANT | Owners, threshold, attestors and policy are unchanged | | APPROVALS_CLEARED | Every approval created in the batch is back to zero, except the ERC-20 base allowance to Permit2 |

derive always appends the last four items. APPROVALS_CLEARED is what makes the guarantees hold over time, not just within one batch: no counterparty can pull funds after the batch through an allowance the batch left behind.

4.4 The owner digest

D_owner = EIP712({name:"Verbatim", version:"11", chainId, verifyingContract: account},
  Tx(bytes32 treeHash, bytes32 specHash, uint64 expiry, bytes32 snapshotRoot, uint8 path, bytes32 txCommit))

txCommit = keccak(CHAINID, SENDER, NONCE, MAX_PRIORITY_FEE, MAX_FEE, FRAME_COUNT,
                  ∀ frame f: MODE, FLAGS, TARGET, VALUE, GAS, STATE_GAS, (f == 1 ? 0 : keccak(data_f)),
                  SIGNATURE_COUNT, BLOB_COUNT)

Frame 1 is always blanked. It is the account's VERIFY frame, and it carries treeHash, specHash, snapshotRoot, path and (on the stateless path) the proofs. Those values are bound through D_owner itself, and the proofs through snapshotRoot. Every other transaction field is committed, including the signature and blob counts, which prevents padding and type confusion.

Rebuild and match (D2). Each verifier computes D_owner from its own render and derivation, then requires that every owner signature entry's msg equals it. The protocol has already checked those signatures. Because the account and the paymaster each enforce this independently, the tree frame 1 claims must equal the paymaster's render.

4.5 The snapshot

The snapshot is a sorted Merkle tree:

  • leaves are ordered by leafKey = keccak(type ‖ abi.encode(key));
  • hashing is domain-separated: keccak(0x00 ‖ type ‖ key,value) for leaves and keccak(0x01 ‖ l ‖ r) for nodes;
  • depth is at most 20.

Proofs. A presence proof is a Merkle path. A non-membership proof is a pair of adjacent leaves whose keys bracket the missing key. This lets a host prove that a name is absent, so that the address renders as hex. A host that omits a proof can only make a render refuse or show hex; it can never make one lie.

Leaf types:

| Type | Key | Value | |---|---|---| | DESC | chainId, codehash, selector | descHash, publisher, status | | TOKEN | chainId, address | symbol, decimals, riskFlags | | HOOK | chainId, hook codehash | attestFlags | | NAME | chainId, address | normalized name, resolver | | PROXY | chainId, proxy codehash | template, implementation slot, expected implementation codehash | | ROUTER, SPENDER | — | — |

ROUTER and SPENDER were added during implementation.

Every touched token needs a TOKEN presence proof, and any set risk flag refuses the token. The risk flags are: fee-on-transfer, rebasing, pausable, blacklist, ERC-777 operators, ERC-2771 forwarder, admin seize, and non-standard return.

Attestor statement: D_snapshot = EIP712({name:"VerbatimSnapshot", version:"1", chainId}, Snapshot(root, issuedAt, expiry, schema)). On the stateless path, attestor signatures are additional explicit-digest entries whose msg is D_snapshot. The protocol validates them, so the account verifies the quorum without ecrecover and without reading any registry.

Revocation happens in two layers:

  1. leaving the leaf out of the next snapshot, with the TTL capped at 6 hours by default;
  2. a RevocationRegistry keyed by leaf hash, read only at execution. It can cause a revert but never authorizes anything, and it never invalidates the mempool.

4.6 Validation

Account VERIFY (frame 1) does five things:

  1. Layout lock. Frame 0 is VERIFY on the expiry verifier, with enough gas to run it. Frame 1 is the current frame. Then, depending on the path:

    • stateless: exactly 3 frames, with frame 2 a SENDER executeVerified on the account;
    • paymaster: exactly 4 frames, with frame 2 a VERIFY on the immutable paymaster and frame 3 a SENDER executeVerified.

    No value is allowed and no atomic-batch flag, and the declared path must match.

  2. Signatures. The count must be exactly k_owners (paymaster path) or k_owners + k_attestors (stateless path). Every entry must be SECP256K1 with a 32-byte msg. The owners must be distinct members meeting the threshold, each with msg == D_owner. The attestors must be distinct and meet their threshold, each with msg == D_snapshot.

  3. Freshness and replay. The expiry comes from frame 0. On the stateless path, expiry ≤ snapshot.expiry and snapshot.expiry − issuedAt ≤ maxSnapshotTTL. And consumed[D_owner] must be false.

  4. Stateless path only:

    • verify the proofs;
    • render frame 2's calls;
    • require EXTCODEHASH(target) to equal the attested codehash for each contract target;
    • read hook flags from the hook's address;
    • require keccak(T') = treeHash and derive(T') = specHash;
    • apply policy.
  5. APPROVE with scope EXECUTION_AND_PAYMENT on the stateless path, or EXECUTION on the paymaster path.

RendererPaymaster VERIFY (frame 2, paymaster path):

  • render frame 3 from its cached leaves and apply policy;
  • rebuild D_owner with path = 2 and require every owner msg to equal it;
  • check frame 0's expiry against the cached snapshot;
  • require a per-nonce fee ticket covering the maximum cost;
  • APPROVE(PAYMENT).

Policy is the same on both paths. It refuses:

  • unattested targets and unattested spenders;
  • NO_MIN_OUT together with any HOOK_CAN_TAKE_*;
  • HOOK_UNVERIFIED together with any HOOK_CAN_TAKE_*;
  • unbounded BLIND nodes;
  • unknown risk codes or router commands;
  • UR_ALLOW_REVERT;
  • a TTL above the policy cap;
  • any flagged token.

4.7 Execution

executeVerified(calls, spec) runs in this order:

  1. Fee first. On the paymaster path, the fee ticket is consumed before anything else. If that fails, no protected call runs.
  2. Commit. Require keccak(spec) = specHash, then set consumed[D_owner] = true.
  3. Execution-time checks. These never touch the mempool:
    • no leaf in use is revoked, checked against the registry and, where ENS exists, the ENS anchor;
    • proxy implementations match their PROXY leaves;
    • targets marked as having no code still have none;
    • names re-resolve forward and in reverse;
    • the timestamp is still within the expiry.
  4. The batch. It runs in an inner call to the account itself, so a failed assertion undoes the batch while the consumed digest and the fee survive:
    • record the tracked set: touched tokens, the ledger and the watchlist;
    • run CALLs only, under a reentrancy lock, with bounded gas per call and bounded return data;
    • assert every item of S.
  5. Ledger. Record the Permit2 base allowances and prune any that are at zero.

4.8 The Universal Router renderer

URRender decodes execute(commands, inputs, deadline). COMMAND_TYPE_MASK is 0x7f; bit 0x80 is the allow-revert flag and raises UR_ALLOW_REVERT.

Supported commands: V3_SWAP_EXACT_IN, V4_SWAP (with SWAP_EXACT_IN_SINGLE, SWAP_EXACT_IN, SETTLE_ALL and TAKE_ALL), WRAP_ETH, UNWRAP_WETH, SWEEP and PAY_PORTION. Anything else renders BLIND, and policy refuses it.

Hook risk is read with pure arithmetic on the hook's address:

  • beforeSwapReturnsDelta raises HOOK_CAN_TAKE_INPUT;
  • afterSwapReturnsDelta raises HOOK_CAN_TAKE_OUTPUT;
  • the dynamic-fee flag raises HOOK_DYNAMIC_FEE;
  • a hook whose code hash has no HOOK leaf raises HOOK_UNVERIFIED.

Because v4 encodes a hook's permissions in its address, a renderer can assess hook risk inside a restricted validation context, with no state reads.

Swap guarantees:

  • the input changes by exactly −amountIn;
  • the output reaches the displayed recipient in at least the displayed minimum. Where TAKE_ALL's minimum and amountOutMinimum differ, the larger applies;
  • P2ALLOW_LE(token, router, 0) holds after the batch.

4.9 ENS as the trust root

On chains with ENS, ENSv2 answers four questions, all checked at execution so that validation reads nothing external:

  1. Who you are paying. NAME leaves are re-resolved forward and in reverse; a mismatch reverts. Wildcard and CCIP-read resolvers are refused, and lookalikes render as hex.
  2. Who published each descriptor. A publisher name passes an exclusivity proof on its PermissionedResolver. The proof checks that:
    • the resolver is pinned code and is reached directly;
    • the clear-signing record lists the descriptor's hash;
    • no one holds the root SET_TEXT, LINK or UPGRADE roles, or their admins;
    • exactly one party holds the argument-scoped setter for clear-signing, with no admin;
    • no one can change the name's resolver or subregistry;
    • the registration runs at least a year past now.
  3. Who may attest. The anchor name's attestor record lists the attestor set and threshold. Every attestor whose signature a transaction used must be listed, or the batch reverts.
  4. What is revoked. Revocation records on the anchor name are checked alongside the registry.

5. Security analysis

5.1 Properties

| # | Property | |---|---| | I1 | A batch that succeeds was rendered to exactly the signed treeHash, under the signed root | | I2 | A batch that succeeds satisfies every VSPEC item | | I3 | No layout other than the two canonical ones receives an APPROVE | | I4 | If the fee fails, no protected call runs | | I5 | If an assertion fails, no protected effect persists | | I6 | No transaction is included past its expiry, and the device refuses an expiry beyond its cap | | I7 | No takeover is possible: no delegatecall, no upgrade path, no 7702, and trust changes only through a rendered TRUST_CHANGE | | I8 | The Solidity and TypeScript renderers produce identical bytes | | I9 | Validation reads only what each path's rules allow | | I10 | A snapshot from another chain, or past its TTL or expiry, is never accepted | | I11 | A revoked leaf never executes | | I12 | No approval survives a batch, except Permit2 base allowances with zero sub-allowances | | I13 | No D_owner executes twice |

5.2 The no-loss lemma

Lemma. Assume three things:

  • (i) the account never delegatecalls and issues only the CALLs in a rendered batch;
  • (ii) after every batch, its only nonzero approvals are ERC-20 base allowances to Permit2, whose Permit2 sub-allowances are zero (I12);
  • (iii) every token it holds has zero risk flags.

Then the account's balance of a tracked token can decrease only inside a batch that calls that token's contract (directly or through an attested router), was rendered to the signed treeHash, and satisfies the signed S.

Proof sketch. A balance of a standard token decreases only in two ways:

  • the holder calls transfer, or a contract it calls does. This is the holder's own action. By (i), the account acts only inside executeVerified. That runs only after both VERIFY checks pass (I1) and asserts S before it returns (I2). And TRACKED_NO_DECREASE bounds the effect of any call the descriptors don't explain.
  • a third party calls transferFrom using an allowance. By (ii), the only standing allowance goes to Permit2. Permit2 moves tokens only up to a sub-allowance, and every sub-allowance is zero outside a batch. Signed permits are not supported, because they couldn't be post-checked.

Tokens that move balances any other way are exactly the ones the risk flags describe (rebasing, admin seize, fee-on-transfer, and so on), and (iii) excludes them. ∎

5.3 Attack coverage

| Attack | Defence | Where it stops | |---|---|---| | A1 swap the recipient under an honest sentence | Re-render mismatch | Validation: SpecHashMismatch on the paymaster path, where the derived spec is checked first; TreeMismatch on the stateless path and on ERC-4337 | | A2 minOut = 0 through a skimming hook, under an honest sentence | Re-render mismatch | Validation: SpecHashMismatch (paymaster path) | | A2b the owners sign the true risky sentence | Policy: NO_MIN_OUT with HOOK_CAN_TAKE_OUTPUT | Validation: PolicyRefused | | A3 drop or swap the renderer frame | Layout lock | Validation: BadLayout | | A4 a weaker spec, either way | derive(T') ≠ specHash | Validation | | A5 an unattested target | UNVERIFIED_CONTRACT | Validation: policy | | A6 a vault that keeps the ETH and mints nothing | DELTA_GE on shares | Execution: AssertionFailed, fee kept | | A7 a stale signature; A7b a starved expiry frame | Expiry frame; minimum gas on frame 0 | Validation | | A8 a lookalike ENS name | NAME non-membership; exclusivity proof | Shows as hex; refused | | A9 no fee ticket; A14 two transactions on one ticket | Per-nonce tickets | Validation | | A10 a 7702-delegated sender | Layout and code-hash pin | Validation | | A11 reentrancy; A12 a gas burn; A18 a return bomb | Lock, per-call gas bound and reserve, bounded return data | Execution: batch reverts, frame survives | | A13 a future-dated expiry | Device clock and TTL cap | Device; execution: TtlTooLong | | A15 revocation while transactions are pending | Per-call descHash, no global epoch | Only the dependent transactions drop | | A16 the allow-revert flag; A17 an unknown command or action | UR_ALLOW_REVERT, BLIND | Validation: policy | | B1–B11 stateless-path attacks (unattested collection, cross-chain snapshot, leaf-type confusion, padding, omitted proof, proxy swap, far-future snapshot, revocation while pending) | Proof rules, domain separation, signature counts, TTL, execution checks | Validation or execution. Live: B1, B3, B5–B7, B9–B11. Foundry only: B2, B4, B8 | | B12 the same content under a different nonce key | consumed[D_owner] | Validation: Replayed in Foundry. Live, the node's nonce rule refuses it first | | B13 an attestor missing from the ENS anchor | Anchor check | Execution: AttestorNotListed | | B14 an approval left standing | APPROVALS_CLEARED | Execution: AssertionFailed |

5.4 Why the expiry needs a gas floor

A live probe produced a subtle finding. A frame-0 expiry check that runs out of gas has status 0, and the node still mines the transaction. A host could therefore remove the expiry by starving that frame.

Reading frame 0's status from frame 1 would detect this, but on the deployed client it masked every revert reason. The account instead requires frame 0's gas limit to cover the verifier (BadLayout(8)) and rechecks the timestamp at execution. We report this as a rule finding: an expiry frame should be mandatory-success for the whole transaction.


6. Implementation

| Component | Role | |---|---| | VerbatimAccount | Frame account: layout lock, stateless VERIFY, executeVerified, assertions. No DELEGATECALL, checked on the bytecode in CI | | RendererPaymaster | Staked renderer: cache, rebuild and match, fee tickets | | DisplayVM, URRender, AssertionKit | The renderer, the router and v4 decoder, and the assertions | | SnapshotVerifier, StatelessRenderer, RevocationRegistry | Proofs, proof-reading render, revocation | | VerbatimAccount4337 | The same semantics behind ERC-4337 | | EnsTrustChecker, EnsTrustAnchor | ENSv2 exclusivity and the anchor | | FrameReader (Yul), ApproveShim | Access to the new opcodes from Solidity; APPROVE emitted by patching a single LOG1 byte, checked by the deploy tool | | displayvm-ts, urrender, vdesc-compiler, snapshot-cli, signer, frames-sdk | The TypeScript twin, the standalone Uniswap renderer, the ERC-7730 compiler, the snapshot builder, the offline signer, and frame transaction tooling |

Language and tooling. The contracts use Solidity 0.8.28 through the IR pipeline, built and tested with Foundry. The off-chain packages are TypeScript, using viem and vitest.

APPROVE without DELEGATECALL. APPROVE must execute in the frame target's own code, and Solidity cannot emit it. The usual helper delegatecalls, which the account forbids. log1(0, 0, scope) has the same stack shape as APPROVE(offset, length, scope), so the deploy tool rewrites that single opcode byte from 0xa1 to 0xaa, after checking that the runtime contains exactly one LOG1.

Descriptor coverage. vdesc-compiler ingests the public ERC-7730 registry. 1,898 of its 3,035 functions compile, across 65 protocols, and the failures are listed with reasons. Effects are written and tested for ERC-20, WETH, Permit2, the Universal Router, an ERC-4626 vault and an Aave-style pool.


7. Evaluation

We report only measured results. Live results come from the public EF frames devnet (chain 1337, the ERC-8421 reference sidecar), redeployed on the final build after its reset on 6 November 2026, and from Sepolia through ERC-4337 with official Uniswap contracts and ENSv2. Every row of the proof ledger (contracts/docs/proofs.json) records the network's own answer: a transaction hash, or the rejection message the node returned.

7.1 Correctness

| Check | Result | |---|---| | Foundry tests, including a stateful invariant suite, the attack matrix and the named guards | 191 passed, 0 failed | | TypeScript tests (11 packages, golden vectors included) | 95 passed, 0 failed | | Differential fuzzer (I8): the Solidity and TypeScript renderers on anvil | 10,000 cases per CI run, 0 mismatches. An independent rerun of 2,000 cases: 1,553 identical, 447 refused by both, 0 mismatches | | Effect checks | Every check has a named test. Disabling any one of the ten post-call checks fails at least one test | | Invariants I1–I13 | Each is mapped to the tests that assert it (SECURITY.md) | | Live ledger | 69 of 69 cases meet their expected result; 45 are attacks stopped on a live network |

7.2 Gas under the 100k cap

The deployed sidecar caps the whole validation prefix at a flat 100,000 gas, signature cost included. A probe confirmed this: limits plus signatures of 100,000 were admitted, and 100,001 were refused. The table below is measured on the final build, using two owner signatures on the paymaster path (5,600 gas) and two owners plus two attestors on the stateless path (11,200 gas).

| Transaction | Paymaster path: expiry + account + paymaster | Paymaster prefix | Stateless path: expiry + account | Stateless prefix | Proof bytes | |---|---|---:|---|---:|---:| | Transfer | 3,051 + 16,285 + 60,493 | 85,429 | 3,051 + 76,234 | 90,485 | 732 | | Approve | 3,051 + 16,294 + 64,043 | 88,988 | 3,051 + 83,926 (Permit2) | 98,177 | 1,005 | | v4 swap, ETH in, real Universal Router | 3,051 + 16,719 + 65,218 | 90,588 | 3,051 + 82,291 | 96,542 | 591 | | WRAP_ETH | — | 78,884 | 3,051 + 70,245 | 84,496 | 264 | | permit2.approve | 3,051 + 16,319 + 69,069 | 94,039 | — | — | — |

The first build measured 99–109k. A single-STATICCALL frame reader and unchecked buffer writes brought it under the cap.

Limits found by measurement:

  • One call per batch. Each additional call costs about 21.5k, so an ERC-20 swap, which needs [permit2.approve, execute] in one batch, does not fit a flat 100k. ERC-8421's 1M staked budget would hold it. On Sepolia, without that cap, a two-hop v4 swap landed through the account in 929,953 transaction gas, above its signed minimum.
  • No hook routes on the stateless path. Rendering a hook route on the stateless path exceeds its 85,300 account-frame limit. Such transactions are refused by running out of gas, with no reason attached. With room, the same transaction reverts PolicyRefused(56).
  • Nonce keys. A non-default nonce key adds 20,000 validation gas, so no keyed transaction fits the cap.

7.3 Attacking Uniswap's real interface

We built Uniswap's open-source web interface from a clean checkout and added a malicious build step, in the manner of the Bybit S3 injection. The step leaves the displayed quote intact. It rewrites the transaction to a minimum output of 0, routed through SkimHook, a pool hook whose address carries afterSwapReturnsDelta.

The harness stubs one thing: token metadata for the selected pair, read from the chain. The quote comes from the real Trading API, and the transaction is the bytes the page produced.

| Signer | Outcome on Sepolia | |---|---| | Ordinary wallet, signing what the page sends | The page quoted 26.19 USDC for 0.001 ETH. The victim received 0.026 dUSDC; the hook took 2.55 | | Verbatim, given the identical calldata | The device shows ! NO MINIMUM OUTPUT, ! HOOK CAN TAKE YOUR OUTPUT and ! UNVERIFIED HOOK. Refused: PolicyRefused(56) | | Verbatim, the host lies about the sentence (A2) | Refused at validation: SpecHashMismatch on the paymaster path |

The same route sent directly to Uniswap's official Sepolia contracts reproduces the result. The ordinary wallet received 0.0272 dUSDC and the hook 2.70; Verbatim refused it.

7.4 Live results

| Network | Results | |---|---| | Frames devnet, paymaster path | Admitted and mined: HONEST, SWAP and WRAP through the real Universal Router. Refused at the mempool with the account's or paymaster's own error: A1, A2, A4 and A4b (SpecHashMismatch); A3, A3b and A10 (BadLayout); A5, A2b, A15, A16, A17 and A17b (PolicyRefused); A9 and A14 (no ticket); A7 and A7b (expiry frame). Mined, with the batch reverting and the fee kept: A6 and B14 (AssertionFailed); A11, A12 and A18 (bounded call failure); A13 (TtlTooLong). Fee failure runs nothing: F7 | | Frames devnet, stateless path, no stake | Admitted and mined: S-HONEST, S-SWAP and S-WRAP. Refused: S-A1 (TreeMismatch); B1 (policy); B5 and B7 (render or proof); B9 (far-future snapshot); B10 (revoked at execution); B3, B6, B11 and S-B12 (see the note below) | | Mempool comparison | ethrex's canonical check reports StorageReadNonSender for paymaster-path transactions, and refuses an unstaked renderer. The alt mempool admits them because the paymaster is staked. The stateless prefix is canonical-valid | | Sepolia, ERC-4337 | Honest transactions landed: transfers via Pimlico and via Alchemy, with the recipient shown by ENS name; a v4 swap; a two-hop swap; a WalletConnect dapp session. Refused: B-A1 (TreeMismatch); A8, a lookalike name; B13 (AttestorNotListed); and LeafRevokedInEns for a leaf revoked while pending. Also run: the side-by-side and real-interface attacks above | | Replay | I13: after landing, consumed[D_owner] is true |

Note: where the node refuses first. Several cases are refused by the node before the account's own check runs:

  • B3, a snapshot signed for another chain, fails the protocol's signature check;
  • B6, padding the signature list, exceeds the gas cap;
  • B11-A3, sending a different layout, fails the sidecar's prefix-shape rule;
  • B12 and S-B12, replaying the same content, fail the nonce rule.

Each is refused, and the account's own check for each is proven in Foundry. B2, B4 and B8 are covered in Foundry only.

7.5 Invalidation

N = 50. We placed one pending transaction from each of 50 senders on each path, then revalidated all of them through ethrex_simulateFrameTransaction, the call the sidecar uses for LIFECYCLE-040 revalidation. We did this before and after each of two trust events:

| Event | Paymaster path stopped | Stateless path stopped | |---|---:|---:| | Trust refresh with the same root | 0 / 50 | 0 / 50 | | Snapshot rotation to a new root | 50 / 50 (SnapshotMismatch) | 0 / 50 |

This bears out the design claim. A stateless transaction carries its snapshot, so no global trust write can invalidate it. A paymaster-path transaction binds the cached root it was signed against.

Per-descriptor revocation (A15). Of five signed transactions, an unrelated refresh invalidated none. Revoking one descriptor invalidated exactly the one that used it. This is the consequence of having no global epoch.

Method limitation. The bench revalidates through the sidecar's simulator rather than observing a pool, because the devnet's miner includes pending transactions within seconds.

8. Rule findings

  1. Unstaked senders and proxied tokens. STORAGE-021 cannot cover proxied tokens such as USDC, because balanceOf reads the implementation slot, which is not associated with the sender. Proposal: exempt EIP-1967 slots.
  2. Budget. The reference sidecar enforces a flat 100k on the whole prefix, where BUDGET-010 gives staked entities 1M. Under the flat cap, heavier renders such as ERC-20 swaps are refused.
  3. Precompiles. The sidecar sets precompiles: [], contradicting CALLING-040. This also breaks a canonical paymaster's ecrecover. Explicit-digest entries avoid the problem for us.
  4. WebAuthn. There is no WebAuthn scheme, so P256 entries accept only raw digests and passkeys cannot sign D_owner directly. Proposal: a WEBAUTHN scheme, or SHA256 under CALLING-040.

We also observed:

  • the canonical expiry verifier is deployed at a different address from the spec's;
  • a starved expiry frame does not fail its transaction (§5.4);
  • reading frame status masks revert data in the deployed client.

9. Related work

  • Cosmos ADR-050, SIGN_MODE_TEXTUAL, has the chain regenerate the screens a signature covers. That is the same core move. It applies to a fixed set of Cosmos message types, under a chain-wide renderer. Verbatim extends it to arbitrary EVM contracts through attested, code-pinned descriptors. It adds enforcement of effects, and rejection at the mempool rather than in the transaction's execution.
  • ERC-7730, ERC-8176 and ERC-8283 standardize descriptors, their integrity and their registration, for wallet-side rendering. Verbatim consumes ERC-7730 directly and makes its output binding.
  • Kampela's on-chain clear-signing proposal has the target contract check a display identifier. Verbatim keeps the check in the signer's account and in validation, so targets need no changes.
  • EIP-7906 proposes protocol-level asset assertions. It needs a hard fork and hand-written rules. Verbatim's VSPEC is derived from the signed sentence and runs in the account today. VSPEC items map naturally onto 7906 assertions if that EIP is adopted.
  • Transaction guards (Safe guards, MetaMask delegation caveats) enforce hand-written constraints. They are not tied to what a human read.
  • ERC-4337 and ERC-7562 define validation rules for account abstraction. Our ERC-4337 leg follows them (STO-010) and runs on any bundler without a paymaster.

10. Limitations and future work

  • The paymaster path's trust cache only grows. The current refreshTrust adds hook, spender, token, name and router entries but cannot remove them; only descriptors can be revoked. It also does not check cached leaves against the signed root. The paymaster path's effective trust set is therefore the union of all updates minus revoked descriptors, whereas the stateless path's is exactly the root's leaves. Closing this needs removal lists and per-leaf Merkle checks during refreshTrust, which runs outside validation.
  • Some checks are not exercised live. Under the 100k cap, signature padding, keyed-nonce replay and stateless hook routes are refused by the node or by running out of gas, before the account's named check (§7.4). Each such check is proven in Foundry. With a 1M staked budget they would surface by name.
  • Budget. Only single-call batches fit the deployed flat cap, so ERC-20-input swaps are not supported on the frames path.
  • Snapshot lifetime. Snapshots last at most 6 hours, so a deployment needs a re-signing service. Re-signing an unchanged root stops nothing pending (§7.5).
  • Demo-deployment trust. On the public demo, the team holds the attestor keys and the server holds two of three owner keys, so visitors can run fixed cases. Attestor independence is a property of the design that this deployment does not exercise. The ENS council is a single key.
  • Scope. Compromised machine signers, stolen keys, misunderstood sentences and protocol-internal accounting are not addressed.
  • Rendering quality. Multi-hop route lines render accurately but awkwardly.
  • Future work:
    • a hardware signer;
    • a policy-bounded signing oracle for a public bounty, with attestor keys held outside the team;
    • L2 production deployments;
    • removal semantics for the paymaster cache;
    • upstreaming urrender and the two ERC drafts ("Sentence-Bound Frame Transactions" and "Signed Attestation Snapshots for Stateless Validation").

11. Conclusion

Clear signing fails when the screen and the chain disagree. Verbatim makes them the same thing. The owners sign the sentence, the chain re-renders it from the real calldata before admitting the transaction, and the account enforces what the sentence promised after it runs.

EIP-8141's explicit-digest signature entries and introspection opcodes make on-chain re-rendering practical without ecrecover or global state. ERC-8421 lets a staked renderer serve the cases that need cached state. The design fits the deployed 100k validation cap for transfers and single-call swaps. On the public frames devnet and on Sepolia it stops the Bybit-class attack at the mempool and the truthful-but-malicious-contract attack at execution. That includes an attack through Uniswap's real interface. With the stateless path, a trust update invalidates nothing pending.


References

  1. EIP-8141: Frame Transactions. https://eips.ethereum.org/EIPS/eip-8141
  2. ERC-8421: Frame Transaction Alternative Mempool (draft). https://github.com/forshtat/ERCs (branch pr-clean, ERCS/erc-8421.md)
  3. M. Garnett, Frame mempool. https://hackmd.io/@matt/frame-mempool
  4. ethPandaOps, Frames devnet 0. https://notes.ethereum.org/@ethpandaops/frames-devnet-0
  5. ERC-7730: Structured Data Clear Signing Format. LedgerHQ clear-signing-erc7730-registry.
  6. ERC-8176: Integrity Verification for ERC-7730. https://ethereum-magicians.org/t/erc-8176-integrity-verification-for-erc-7730/27911
  7. ERC-8283: On-chain Registry for ERC-7730 Descriptors. https://ethereum-magicians.org/t/erc-8283-on-chain-registry-for-erc-7730-clear-signing-descriptors/28717
  8. Kampela, ERC: Onchain Clear Signing. https://ethereum-magicians.org/t/erc-onchain-clear-signing/28068
  9. Cosmos SDK, ADR-050: SIGN_MODE_TEXTUAL. https://docs.cosmos.network/sdk/latest/reference/architecture/adr-050-sign-mode-textual.md
  10. EIP-7906. https://eips.ethereum.org/EIPS/eip-7906
  11. ERC-4337 and ERC-7562: Account Abstraction and its validation rules. https://eips.ethereum.org/EIPS/eip-7562
  12. Uniswap v4-core Hooks.sol, v4-periphery Actions.sol and ActionConstants.sol, universal-router Commands.sol, Permit2.
  13. ENS, ENSv2 documentation: Permissioned Registry, PermissionedResolver, Enhanced Access Control.
  14. Bybit incident post-mortems, February 2025 (Safe{Wallet} S3 JavaScript injection).

Appendix A: Notation

| Symbol | Meaning | |---|---| | T, treeHash | The VTREE sentence and its keccak hash | | S = derive(T), specHash | The VSPEC guarantees and their hash | | D_owner | The owners' EIP-712 digest (§4.4) | | D_snapshot | The attestors' EIP-712 digest over the snapshot root | | txCommit | Commitment to every transaction field except frame 1's data | | path | 1 stateless, 2 paymaster, 3 ERC-4337 | | consumed[·] | Replay set, keyed by D_owner |

Appendix B: Design decisions

| # | Decision | Reason | |---|---|---| | D1 | One snapshot trust model, two delivery paths, routed by gas | Stateless by default; the alt mempool for heavy renders | | D2 | Explicit-digest owner signatures; every verifier rebuilds D_owner from its own render | Binds the render to the signature without ecrecover | | D3 | txCommit blanks only frame 1 | Every verifier computes the same commitment; no padding or replay | | D4 | Canonical expiry frame, device clock, TTL cap | A host-chosen block number proves nothing | | D5 | No global epoch; per-call descHash | No mass invalidation | | D6 | Revocation keyed by leaf hash, checked at execution, liveness-only | Immediate, with no effect on the mempool | | D7 | Unattested targets are refused | The host controls any "effects-only" list, so that mode is unsound | | D8 | TOKEN proofs are mandatory; flagged tokens are refused | Risk metadata can't be omitted silently | | D9 | No standing approvals | The guarantees hold over time | | D10 | No delegatecall, upgrade or 7702; ERC-1271 off | Removes the takeover class | | D11 | Fee charged first; per-nonce tickets | Multiple pending transactions per sender | | D23 | consumed[D_owner] | Replay protection that doesn't depend on keyed-nonce semantics | | D24 | ENSv2 records govern attestors and revocations, checked at execution | ENS as the trust root, with no validation reads |

How it's Made

Verbatim is a smart account where owners never sign calldata. They sign a hash of the sentence they read. Before admitting the transaction, the chain re-renders that sentence from the real calldata, and after the calls it enforces every promise the sentence made.

Core: EIP-8141 frame transactions and the ERC-8421 alt mempool. A VERIFY frame reads the SENDER frame's calldata through the new introspection opcodes (FRAMEDATALOAD, FRAMEPARAM, SIGPARAM). It runs our on-chain renderer (DisplayVM), rebuilds the owners' EIP-712 digest from its own render, and APPROVEs only if every owner signature matches. Owner and attestor signatures are EIP-8141 explicit-digest entries, so the protocol verifies them before any frame runs. We never call ecrecover, which matters because the reference sidecar has no precompiles.

There are two paths:

  • Stateless: Merkle proofs and attestor-signed snapshots ride inside the tx, so it needs no stake and reads no global state.
  • Paymaster: a staked RendererPaymaster renders from its own cached snapshot. The canonical rules refuse that storage read, and ERC-8421 admits it.

Rotating the snapshot invalidated 50 of 50 pending transactions on the paymaster path and 0 of 50 on the stateless path. Everything fits the sidecar's 100k validation cap (85k transfer, 91k v4 swap). We also run an ERC-4337 version on Sepolia (Pimlico, Alchemy).

Uniswap: URRender, an on-chain decoder for Universal Router commands and v4 actions. It reads hook risk from the hook's address bits (afterSwapReturnsDelta → "HOOK CAN TAKE YOUR OUTPUT"), and refuses no-minimum swaps through such hooks. We tested it against Uniswap's official Sepolia contracts. We also rebuilt Uniswap's real web interface with a malicious build step: it quoted 26.19 USDC, an ordinary wallet got 0.026, and Verbatim refused the same bytes.

ENSv2 is the trust root:

  • attestor sets and revocations live in ENS records;
  • descriptor publishers must pass an exclusivity proof on their PermissionedResolver: one scoped setter, no root roles, locked resolver;
  • recipient names are re-resolved forward and in reverse at execution.

Stack:

  • Solidity 0.8.28 (via-IR) with Foundry, 191 tests including invariants and an attack matrix;
  • TypeScript (viem): a renderer twin, an ERC-7730 descriptor compiler that compiles 1,898 of 3,035 registry functions, the snapshot builder, and an offline signer that is one HTML file;
  • React + Vite on Vercel, Express on Render.

Hacky bits:

  • APPROVE without DELEGATECALL. Solidity can't emit APPROVE (0xaa), and the account bans DELEGATECALL. We compile log1(0,0,scope), which has the same stack shape, and our deploy tool patches that single byte from 0xa1 to 0xaa after checking there's exactly one LOG1.
  • One STATICCALL for frame data. A Yul FrameReader returns the whole frame layout in a single STATICCALL, which helped bring the prefix from 109k down to 85k.
  • Real Uniswap code on the devnet. We replayed mainnet bytecode for PoolManager, Universal Router and Permit2 onto the frames devnet.
  • Mined hook address. SkimHook's address was mined to carry the exact permission bits.
  • Byte-for-byte fuzzing. A differential fuzzer runs 10,000 cases per CI run to keep the Solidity and TypeScript renderers identical.
  • Rule findings. We probed the sidecar's real limits (exactly 100,000 gas admitted, 100,001 refused) and turned what we found into four ERC-8421 rule findings and two ERC drafts.
background image mobile

Join the mailing list

Get the latest news and updates

Verbaatim | ETHGlobal