The Ethereum Foundation’s Trillion Dollar Security initiative has identified blind signing and transaction uncertainty as critical user experience and security risks facing the ecosystem. As part of ongoing efforts to protect users and protocols alongside features like Clear Signing, researchers are exploring native transaction assertions as a foundational next step to enforce a transaction’s final outcome reliably.
This initiative addresses a fundamental challenge in blockchain security: holding a valid digital signature does not always guarantee the transaction result a user intended. By examining how native transaction assertions could protect users where current defenses fall short, the Ethereum research community is analyzing various design choices, with EIP-7906 (Transaction Assertions via State Diff Opcode) standing out as one prominent approach.
Two Ways a Signed Transaction Can Go Wrong
The core vulnerability begins with how the Ethereum Virtual Machine (EVM) operates. The network executes instructions precisely as authorized, without judging whether the net result aligns with the user’s actual desires. A cryptographic signature commits a user to a specific request, but the final outcome depends entirely on the code and state encountered during execution. Over the history of the network, users have suffered significant financial losses either because they inadvertently approved an action different from what they believed they were authorizing, or because a legitimate request produced an outcome that conflicted with their economic goals.
The first category of failure is an intent mismatch, a phenomenon highlighted by high-profile security incidents such as the Bybit compromise and the BadgerDAO attack. In both instances, compromised frontends supplied signing requests that deviated sharply from what users thought they were approving. During the Bybit incident, signers authorized an operation to replace a Safe’s implementation contract under false pretenses. Similarly, BadgerDAO users unknowingly granted malicious actors sweeping permissions to spend their tokens.
The second category is an outcome mismatch. In these scenarios, the signer approves the exact request shown to them by the user interface, but underlying limits or evolving blockchain state still permit a result that violates their economic objectives or standing safety policies. A prominent example occurred during an Aave and CoW collateral swap, where a user attempted to exchange approximately $50.4 million worth of aEthUSDT for aEthAAVE. Because AAVE liquidity was far too thin for a trade of that magnitude, and because CoW’s gas ceiling mechanism rejected more complex quotes during verification, only one verified quote returning roughly 329 aEthAAVE remained.
Although the interface displayed a dramatic 99.9 percent price impact warning and forced the user to explicitly confirm that the entire value could be lost, the user signed the transaction anyway and ultimately received tokens worth roughly $36,000.
In all three scenarios, a vital safeguard was missing: a trusted rule governing the resulting state, defined independently of the transaction builder and enforced directly during execution. In the Bybit incident, a protective rule would have required the approved Safe implementation contract to remain completely unchanged. For BadgerDAO users, a safety rule would have restricted new token approvals exclusively to verified, published contracts. For the Aave user, a protective rule would have enforced a strict minimum acceptable output calculated independently of the interface quote, while solver-based routing protocols would have had to require the assertion as part of the settlement process.
Currently, Ethereum lacks a generalized mechanism enabling onchain code to inspect the complete set of net state changes and emitted events produced by a single transaction.
What a Signature Does Not Control
A standard cryptographic signature commits a user only to the specific action requested, including the target contract, value transferred, and calldata payload. However, the EVM executes this call against whatever contract code and state happen to exist at the exact moment the transaction is included in a block, which may differ significantly from the state present when the user signed. Consequently, the resulting net balance modifications, storage updates, and emitted events can diverge widely from expectations.
The target contract specified in a transaction, or any other contract it interacts with through internal calls, may rely on proxy patterns where the implementation address changes before execution. As a result, the code that actually runs can be entirely different from the code the user initially inspected. Furthermore, transaction ordering within a block can drastically alter the state encountered by a call. For instance, a classic sandwich attack can manipulate a decentralized exchange pool price right before a user swap executes, achieving this malicious shift without altering the user’s signed transaction data in the slightest.

Where Today’s Defenses Stop
The Ethereum ecosystem has deployed several important defensive mechanisms to combat these risks, but each has distinct limitations. One primary defense is Clear Signing, which translates complex calldata into human-readable descriptions of what a transaction requests. However, Clear Signing relies heavily on accurate decoding and assumes the signer can accurately recognize whether the displayed action deviates from their intent.
Another common defense is transaction simulation, which predicts the effects of a request using a selected snapshot of the chain state. Because the chain state can change before the transaction is officially included in a block, the state during simulation may not match the state at execution. Furthermore, the transaction signed by the user can sometimes differ from the one simulated. During the Radiant Capital exploit, for instance, both the wallet interface and the simulation engine displayed the intended transaction, while malware operating locally on the user’s machine substituted a malicious payload at the exact moment of signing.
Contract-level checks and wallet guards also enforce specific rules during EVM execution. For example, Uniswap automatically reverts a swap if the resulting output falls below a predefined parameter known as amountOutMinimum. Similarly, Safe accounts utilize a checkAfterExecution hook that allows a designated guard to inspect the account’s state after transaction execution and revert the operation if it violates predefined rules regarding account owners or configuration parameters.
However, both approaches require developers to choose in advance which specific state variables to check. To read another contract’s storage, these checks depend entirely on the functions that the target contract explicitly exposes. While a standard token contract makes balance checks straightforward via a balanceOf function, a proxy contract is not required to expose its implementation address through a public function. Without such an explicit interface, a standard wallet guard cannot read the implementation storage slot directly. Crucially, these existing checks cannot inspect the transaction’s full set of net state changes. While a guard can verify that a specific balance remains unchanged, it cannot query the EVM regarding what other unexpected modifications occurred, allowing unmonitored effects to slip through unnoticed.
How Native Transaction Assertions Work
Native transaction assertions would empower onchain code to inspect the full set of net state changes after a transaction’s actions have finished executing. An assertion utilizes lightweight, read-only logic to compare starting and final values against a predefined rule. If the execution violates this rule, the entire transaction automatically reverts.
The assertion rule itself is included directly within the transaction payload and signed alongside the primary actions. These rules can govern net changes across native token balances, storage slots, newly deployed contract code, and emitted events. They can enforce constraints such as requiring a minimum token payout, capping maximum spending, blocking unauthorized token approvals, preserving an account’s control logic, or restricting execution to a strictly specified set of state modifications.
However, the source of the assertion rule is just as important as the validation check itself. If a compromised frontend interface writes the assertion, it could easily craft a rule that permits an attack rather than preventing it. Therefore, a genuinely useful assertion rule must originate from independently verified user intent, a standing account policy, or core protocol logic that a compromised interface component cannot manipulate.
Three Design Choices
Designing native transaction assertions requires navigating complex architectural decisions regarding what information the EVM should expose, how assertion code can access that information, and where the associated opcodes are permitted to run.
Developers and researchers must decide whether the exposed data should encompass net state changes, emitted events, or both. Access options under consideration include enumerating raw entries, looking up specific address and storage values, or copying the full set of state changes directly into memory. Additionally, architects must determine whether the new opcodes should be restricted exclusively to specific transaction types and execution phases, or made available anywhere within the EVM execution environment.
EIP-7906 as a Possible Solution
One prominent approach currently being evaluated is EIP-7906, which builds directly upon the frame transactions defined in EIP-8141. A frame transaction structures execution into an ordered sequence of validation and action steps. EIP-7906 introduces a specialized, read-only POST_TX frame positioned at the very end of the execution flow to verify the transaction’s outcome. While EIP-8141 has advanced toward inclusion in the Hegotá upgrade, EIP-7906 has progressed to being "Considered for Inclusion," though it is not yet officially confirmed for that specific network upgrade.

The proposed design exposes both state changes and event logs. State changes are reported as net differences in native ETH balances and storage slots, alongside newly deployed contracts and their corresponding code hashes. For instance, if a specific storage slot is written to five times during a transaction, it is reported as a single entry reflecting its starting and final values. If a slot ultimately concludes with its original value, it does not appear in the trace at all.
Three new EVM opcodes provide programmatic access to this verification data. The TXTRACE instruction enumerates net state changes and events, TXDIFF retrieves the starting and final values for specific addresses and storage slots, and EVENTDATACOPY copies event data directly into memory.
These instructions operate exclusively within the POST_TX frame, which executes at the conclusion of the transaction as a static call. This ensures that the assertion can inspect the final outcome without altering state variables. If the defined rule is violated, the entire execution body reverts, but the transaction remains recorded on-chain with a failed status, and the gas payer is charged for the computational resources consumed. This economic charge prevents malicious actors from forcing block builders to process deliberately failing transactions for free.
The Assertion Has to Be Required
A key architectural nuance of EIP-7906 is that it does not inherently mandate that transactions include an assertion, leaving open the possibility that a transaction builder could omit it entirely.
To protect everyday users, cryptocurrency wallets must ensure that every frame transaction they construct includes the necessary validation assertion. This rule can be derived dynamically from a simulation performed by the wallet or enforced via a standing security policy that governs all outgoing transactions from the account.
Similarly, when a decentralized protocol wishes to protect its users, its sensitive functions must verify that incoming calls originate from a frame transaction containing the exact required assertion. The protocol must programmatically reject ordinary transactions as well as frame transactions that feature missing or incorrect assertions. Consequently, callers and frontend integrations must adopt compatible frame transactions, meaning already deployed immutable contracts cannot retroactively add this specific validation check.
Where Transaction Assertions Could Help
Beyond direct user security and protocol protection, native transaction assertions unlock new capabilities across the Ethereum ecosystem. For example, they could significantly strengthen account delegation and automated agent workflows. When delegating authority to an autonomous agent, users can already restrict which contracts the agent may access, how much capital it can spend, and how long its permissions remain active. Native assertions would add granular rules governing the precise outcome of each transaction, allowing users to constrain not only what an agent is permitted to do, but also what its actions must ultimately produce.
Protocols could similarly define native rules requiring identical safety checks for every caller utilizing a frame transaction. In solver-based execution architectures, a protocol could specify the required economic outcome while leaving solvers free to optimize the execution route. However, this guarantee remains constrained within a single transaction on a single network, meaning it cannot extend across multi-chain bridging routes. Furthermore, assertions could verify that complex multi-step workflows successfully reach their intended final state, ensuring that any unused tokens are properly returned to the user and lingering token approvals are automatically revoked.
Help Shape the Design
Solutions for native transaction assertions remain under active design and refinement as part of the Ethereum Foundation’s Trillion Dollar Security initiative. Researchers are actively seeking feedback from wallet developers, protocol engineers, and security teams who intend to implement these features.
Stakeholders can reach out via email to [email protected] to explore practical use cases, contribute to ongoing research, or participate directly in the EIP-7906 discussion thread hosted on Ethereum Magicians. Additional information regarding ongoing risk controls and priority development work is available at trilliondollarsecurity.org.

Comments (0)