Skip to content

Back to the catalog

ERC draft: Independent Simulation Result for (STVA)
ethereum-magicians.orgother

ERC draft: Independent Simulation Result for (STVA)

ERC draft "Independent Simulation Result" (STVA) defines a canonical, content-addressed SimulationResult structure that wallets, hardware devices or third-party verifiers can recompute from the same VerificationPayload and state snapshot. It specifies fields, a keccak256 or EIP-712 result hash, and Basic, Standard and Strict compliance tiers. The goal is to close UI/calldata mismatch attacks where a compromised frontend serves a false simulation. Open questions cover stateDiff encoding and prestate proofs.

TL;DR Proposes a standard, reproducible transaction-simulation result that hardware wallets and other verifiers can re-execute and reject on mismatch, defeating compromised-frontend blind signing.
Document

What it is

An Ethereum Magicians draft ERC (STVA) that standardizes a SimulationResult so independent parties can recompute it from the same inputs and get an identical hash. The page is an early forum post that asks for feedback. It gives no author, ERC number, or reference implementation.

How it works

Inputs are the full preimage of the transaction (UserOperation or SafeTx, including every field that enters the hash), a block/state root or Merkle proofs of the relevant state, and optional overrides.

The prose lists these output fields: success, gasUsed, return data and logs in canonical encoding, stateDiff (or its hash), structured balanceChanges and tokenTransfers, optional semanticEffects, snapshotId (block number plus state root), and simulatorId/version. semanticEffects should preferably be recomputed using ERC-7730-style descriptors.

The reference struct is smaller: success, gasUsed, returnData, stateDiffHash, logsHash, snapshotId, resultHash and an optional derivedSummary. Balance changes, token transfers and simulator ID appear only in the prose list. The struct also contains resultHash itself, described as the self-describing canonical hash. The page does not say how that field is excluded from the hash input.

The hash is either keccak256(abi.encode(SimulationResult)) or a domain-separated EIP-712 hash. The draft leaves the choice open.

The result hash is meant to be bound into signatures and Scoped Capability Tokens. The draft also says simulation should be required before high-privilege authority transitions.

Preconditions / Affected

The draft targets wallets, hardware signers and verifiers that currently trust a frontend's simulation. It states one hard requirement: a hardware offline verifier MUST be able to re-execute, or re-verify proofs, and reject on mismatch.

What to do

Nothing is deployable yet. Reviewers can comment on the three open points the author lists:

  • Whether stateDiff is encoded in full or as a hash only, trading size against checkability.
  • Whether prestate proofs are required, or a trusted RPC with multi-node consensus is enough.
  • How tightly the result binds into the VerificationPayload and capabilities.

Caveats

The compliance tiers are loosely defined. Basic accepts any simulator, Standard needs multi-node consensus on the state root, and Strict needs local revm/EVM execution plus Merkle proofs of prestate. Only Strict rules out a lying RPC. The page does not say how Standard handles nodes that disagree. The draft depends on other drafts (capability tokens, authority lifecycle) that it does not link.

Organisations named here

  • EIP-712
  • Scoped Capability Tokens
  • SimulationResult
  • UI/calldata mismatch
  • UserOperation
  • VerificationPayload

Technologies named here

  • ERC-7730
  • revm
  • Ethereum
  • Safe
  • EIP-712
  • ERC draft: Independent Simulation Result for (STVA)
  • keccak256
  • SafeTx (Safe transactions)
  • Scoped Capability Tokens
  • UserOperation (ERC-4337 style account abstraction transactions)
  • VerificationPayload
  • Wallet frontends that serve simulation results (a compromised frontend makes the simulation worthless, per the draft)

Techniques named here

  • Blind signing
  • Canonical content-addressed hashing of simulation results
  • Hardware offline verifier re-execution
  • Independent simulation re-verification
  • Merkle proofs of prestate
  • Multi-node consensus on state root