{"id":"EIP-7702","name":"Set Code for EOAs","status":"Final","chain":"both","category":{"id":"transaction-friction","name":"Transaction Friction","description":"Reducing clicks, signatures, and mental overhead"},"journeyStages":[{"id":"approving","name":"Approving & Permissioning","description":"Granting permissions for actions"},{"id":"executing","name":"Executing Transactions","description":"Performing on-chain actions"},{"id":"gas","name":"Gas & Fees","description":"Paying for transactions"}],"uxImpact":"EIP-7702 lets an existing externally owned account delegate execution to contract code while keeping its address. Delegation persists until replaced or cleared and gives the code unrestricted account access. The wallet must audit the code; applications must not request authorization signatures. Batching, sponsorship, and scoped app permissions depend on compatible wallet implementations.","lastUpdated":"2026-09-18","officialUrl":"https://eips.ethereum.org/EIPS/eip-7702","discussionUrl":"https://ethereum-magicians.org/t/eip-set-eoa-account-code-for-one-transaction/19923","lastReviewed":"2026-09-18","kind":"proposal","hasDetailedContent":true,"content":{"id":"EIP-7702","summary":"EIP-7702 lets an existing externally owned account delegate execution to contract code while keeping its address. Delegation persists until replaced or cleared and gives the code unrestricted account access. The wallet must audit the code; applications must not request authorization signatures. Batching, sponsorship, and scoped app permissions depend on compatible wallet implementations.","designerTakeaways":["Delegation is wallet-controlled. An app must not ask the user to sign an EIP-7702 authorization; scoped app permissions belong in a supported module system above delegated code.","On a supported wallet and network, a compatible delegation implementation can combine approve and swap into one transaction.","Offer sponsored transactions only when a sponsor accepts the action. Explain what the user pays if sponsorship is unavailable.","Treat app permissions and account delegation as separate controls. Ending a session does not automatically remove delegation."],"applicability":{"whenToUse":["Existing EOAs need batching, sponsorship, or session keys without a new address.","A supported wallet can batch approve and action calls with a clear review of its signing and failure behavior.","Games or apps need repeat actions using scoped permissions enforced by the selected account implementation."],"whenToAvoid":["The wallet or chain does not support 7702-style delegation yet.","You need a contract account without a retained EOA private key. ERC-4337 supports contract accounts as well as compatible EIP-7702-delegated senders; the standards are composable.","Users only perform single low-risk transfers where delegation adds confusion."]},"specConstraints":[{"id":"wallet-mediated-delegation","constraint":"Applications must not request EIP-7702 authorization signing; the wallet controls delegation and audits the code.","appliesTo":"application","normativity":"rationale","specQuote":"Applications must not expect that they can suggest the user sign an authorization, and therefore it is the duty of the wallet to not provide an interface to do so. There is no safe way to provide this interface. The code specified by an authorization has unrestricted access to the account and must always be closely audited by the wallet.","specSection":"Rationale / General design philosophy / Interaction with applications and wallets","specUrl":"https://eips.ethereum.org/EIPS/eip-7702#interaction-with-applications-and-wallets","designImplication":"Do not build an app control that requests an EIP-7702 authorization signature. Explain supported capabilities and direct the user to the wallet's own account settings when needed. Any app-scoped permissions must be enforced by a supported extension or module system above the delegated code, not by the authorization itself."},{"id":"delegated-balance-mutations","constraint":"A delegated account's balance can decrease through calls from other accounts, not only transactions it originates.","appliesTo":"application","normativity":"backwards-compatibility","specQuote":"Once an account has been delegated, any call to the account may also cause the balance to decrease.","specSection":"Backwards Compatibility","specUrl":"https://eips.ethereum.org/EIPS/eip-7702#backwards-compatibility","designImplication":"In the wallet's delegation review, explain that installed code can move funds when called by another account, subject to that code's validation rules. Refresh balances and activity from chain data rather than assuming only locally initiated transactions change them."},{"constraint":"The authors recommend a one-pending-transaction policy for delegated EOAs; this is a client recommendation, not a universal queue limit.","appliesTo":"infrastructure","normativity":"security-considerations","specQuote":"While there are a few mitigations for this, the authors recommend that clients do not accept more than one pending transaction for any EOA with a non-zero delegation indicator.","specSection":"Security Considerations / Transaction propagation","id":"pending-transaction-policy","specUrl":"https://eips.ethereum.org/EIPS/eip-7702#transaction-propagation","designImplication":"Handle the selected provider rejecting a second pending transaction. Explain the in-flight transaction and offer supported wait, replacement, or retry paths. Check actual client policy; do not impose a universal queue depth of one or apply this recommendation to every ERC-4337 UserOperation."},{"id":"delegation-migration","constraint":"Changing delegation is a security-critical migration, not a routine app permission change.","appliesTo":"wallet","normativity":"security-considerations","specQuote":"Changing an account's delegation is a security-critical operation that should not be done lightly, especially if the newly delegated code is not purposely designed and tested as an upgrade to the old one.","specSection":"Security Considerations / Storage management","specUrl":"https://eips.ethereum.org/EIPS/eip-7702#storage-management","designImplication":"Keep delegate replacement in the wallet's reviewed account-management flow. Explain which implementation replaces the current one and require a supported migration path. Do not suggest that switching code automatically resets storage or removes every existing permission."},{"id":"authorization-chain-scope","constraint":"An authorization can be restricted to one chain; chain ID zero permits a cross-chain authorization.","appliesTo":"wallet","normativity":"rationale","specQuote":"One consideration when signing a code pointer is what code that address points\nto on another chain. While it is possible to create a deterministic deployment,\ni.e. via Nick's method, verifying such a deployment may not always be desirable.\nIn such situations, the chain ID can be set to reduce the scope of the\nauthorization. When universal deployment is preferred, simply set chain ID to 0.","specSection":"Rationale / Rationale for technical details / Protection from malleability cross-chain","specUrl":"https://eips.ethereum.org/EIPS/eip-7702#protection-from-malleability-cross-chain","designImplication":"In the wallet's account-management flow, explain whether delegation is chain-specific or cross-chain and verify the intended code deployment. An address alone does not establish identical code on every network."},{"id":"storage-clearing-not-native","constraint":"The source recommends clearing storage when migration compatibility is uncertain; the protocol does not provide that operation natively.","appliesTo":"wallet","normativity":"security-considerations","specQuote":"If all contracts previously delegated to by the account used the approach\ndescribed above, a migration should not cause any issues. However, if there is\nany doubt, it is recommended to first clear all account storage, an operation\nthat is not natively offered by the protocol but that a special-purpose delegate\ncontract can be designed to implement.","specSection":"Security Considerations / Storage management","specUrl":"https://eips.ethereum.org/EIPS/eip-7702#storage-management","designImplication":"Treat any storage clearing as a separate, audited migration with explicit consequences for existing account state. Revoking or replacing delegation does not itself clear storage. Do not add an automatic reset or an app-triggered authorization request."}],"prototypeFirst":[{"screen":"Wallet delegation review and account status","why":"The wallet controls delegation because the selected code has unrestricted account access. Readers must distinguish it from an app-scoped permission.","covers":["Delegation not enabled","Delegation installed","Permission or delegation removed"],"include":["Wallet-audited code identity and account authority","Persistent delegation disclosure","Separate end-app-access and remove-delegation controls","An undelegated path when supported"]},{"screen":"Batch preview","why":"Batching depends on the installed account code, including whether a failed subcall stops or reverts the other calls.","covers":["Batch preview","Partial or complete failure"],"include":["Ordered actions and asset changes","The selected implementation's failure policy","Actual wallet prompts rather than a promised signature count"]},{"screen":"App permission review","why":"Scoped permissions require an implementation above delegated code; the EIP-7702 authorization itself is not a scoped app grant.","covers":["Session active","Permission expired or revoked"],"include":["Supported actions, spending caps, and expiry","App identity","Permission status and a working revoke path"]},{"screen":"Sponsored fee row","why":"A compatible sponsor must accept the actual action before the product can present its fee as covered.","covers":["Sponsored gas","Sponsor unavailable"],"include":["Confirmed eligibility","Any asset spend separate from the fee","A supported user-paid or retry path"]}],"designDecisions":[{"question":"Who prompts for delegation, and when?","recommendation":"The wallet controls delegation. The app can explain supported benefits and point to wallet settings, but must not request EIP-7702 authorization signing. Keep an undelegated path where the action supports one.","rationale":"The EIP's rationale says there is no safe app-requested authorization interface because the delegate has unrestricted account access and must be audited by the wallet. Describe that grant before presenting its benefits."},{"question":"How do you preview batched actions?","recommendation":"Show every step and the implementation's failure behavior before the wallet's required confirmations. Do not promise a fixed signature count.","rationale":"Hidden batch steps feel like blind signing when something unexpected executes."},{"question":"What limits apply to session keys?","recommendation":"Require spend cap, allowed actions, and expiration with a revoke-all control.","rationale":"Unbounded session keys turn a game UX bug into a full wallet drain."},{"question":"How do you label sponsorship?","recommendation":"Use honest \"Sponsored\" copy and state when the user will pay gas again.","rationale":"Surprise fees after \"free\" transactions break trust on the next action."}],"statesToDesign":[{"state":"Delegation not enabled","trigger":"The account has no compatible delegation installed.","userNeed":"Understand what delegation grants and that the wallet controls it.","designResponse":"Explain the supported benefit and persistent account authority, then direct the user to the wallet's own settings. Do not render an app control that requests an EIP-7702 authorization signature. Keep supported undelegated actions available."},{"state":"Batch preview","trigger":"User initiates multi-step action.","userNeed":"See all consequences in order.","designResponse":"Checklist of steps with combined outcome before sign."},{"state":"Session active","trigger":"Session key authorized within limits.","userNeed":"Know what the app can still do without prompts.","designResponse":"Session badge with limits, expiry, and revoke in settings."},{"state":"Sponsored gas","trigger":"Paymaster or sponsor covers fees.","userNeed":"Know cost is covered now and later.","designResponse":"Sponsored label on fee row; note when user-paid gas returns."},{"state":"Permission or delegation removed","trigger":"A session permission is revoked or expires, or a separate authorization clears account delegation.","userNeed":"Know which access ended and what the account can still do.","designResponse":"Confirm the specific change after checking its result. Do not imply that ending an app session clears persistent account delegation."},{"state":"Provider rejects another pending transaction","trigger":"The selected client enforces a pending-transaction restriction for a delegated EOA.","userNeed":"Understand which transaction is in flight and what can happen next.","designResponse":"Show the existing transaction and offer supported wait, replacement, or retry actions. Describe the provider's actual policy, not a universal EIP-7702 queue limit."}],"mentalModel":[{"label":"Existing EOA","description":"The user keeps the same address and seed phrase. Delegation adds capabilities without migration or a new receive address."},{"label":"Delegation code","description":"A type-0x04 transaction can install a persistent pointer to contract code. That code has unrestricted account access and must be audited by the wallet. The wallet controls delegation; the application must not request EIP-7702 authorization signing."},{"label":"Batched execution","description":"A compatible wallet implementation can execute multiple calls in one transaction. Whether a failed step reverts every step depends on that implementation; preview the actual failure behavior."},{"label":"Session keys","description":"A wallet implementation may provide scoped permissions for app actions. Show the allowed actions, limits, expiry, and a working revoke path; the EIP itself does not define session keys."},{"label":"Gas sponsorship","description":"A paymaster or sponsor can cover fees for the delegated transaction. Label sponsored fees honestly and note when the user pays again."}],"problemsSolved":[{"problem":"Users must sign every transaction individually","oldWay":"Approve token, wait, confirm, swap, wait, confirm (multiple popups)","newWay":"A supported wallet can submit the previewed calls together; explain whether its batch reverts as a whole.","impact":"critical"},{"problem":"New users need ETH before they can do anything","oldWay":"Buy ETH on exchange, transfer to wallet, wait, then interact","newWay":"A sponsor can pay for an eligible transaction when the wallet and account integration support it.","impact":"critical"},{"problem":"Games interrupted by constant signature requests","oldWay":"Sign for every sword swing, every loot pickup","newWay":"A compatible account implementation can enforce a user-authorized gaming session with explicit limits.","impact":"high"},{"problem":"Switching to smart wallet means new address","oldWay":"Deploy new contract wallet, transfer all assets, update everywhere","newWay":"The existing address gains the capabilities provided by its installed delegation implementation.","impact":"high"},{"problem":"Complex DeFi operations require multiple transactions","oldWay":"Unstake, claim rewards, swap, restake (4 separate transactions)","newWay":"A compatible wallet can prepare a batch; preview each action and its failure behavior.","impact":"medium"}],"uxPatterns":[{"name":"One-Click Multi-Step","description":"Combine approve and action through a wallet implementation that supports the requested calls and atomic execution.","components":["Batch preview","Step checklist","One-click button"],"userFlow":["User enters swap amount","UI shows combined preview of all steps","Single Swap button click","Wallet shows the confirmations required by its implementation; the app does not request a new delegation authorization","Execute the batch using the wallet implementation's stated failure policy","Success state shown"]},{"name":"Sponsored First Transaction","description":"A supported sponsor can pay the transaction fee for an eligible action; the user still needs any assets that the action spends.","components":["Sponsored badge","Gas display","Claim button"],"userFlow":["Connect a supported wallet","Check the intended action with the account implementation and sponsor","Show Sponsored only after eligibility is confirmed","Preview the action and any asset spend","Submit through the supported sponsorship path","Show the execution outcome and confirmation state"]},{"name":"Session Keys for Gaming","description":"Offer scoped gaming permissions only when the account implementation supports limits, expiration, and revocation.","components":["Permission checklist","Time limit","Spend limit"],"userFlow":["Check the account's permission capabilities","Show the requested game actions and spending limit","Let the user choose supported limits and expiry","Authorize the permission using the wallet's required flow","Keep remaining permissions and a revoke control visible","When the implementation enforces expiry, end that permission; account delegation remains until separately changed or cleared"]}],"antiPatterns":[{"pattern":"Forcing users to enable 7702 before basic actions","why":"Creates friction at worst moment (new user onboarding)","instead":"Keep supported undelegated actions available. Explain capabilities without requesting a delegation authorization from the app; the wallet controls account configuration.","severity":"critical"},{"pattern":"Hiding what batch transaction will do","why":"Users sign blind, lose trust if something unexpected happens","instead":"Show clear preview of ALL steps before signing","severity":"critical"},{"pattern":"Session keys with no limits","why":"Compromised session key drains wallet","instead":"Require spend limits and expiration times","severity":"critical"},{"pattern":"No way to revoke session keys","why":"Users feel trapped, cannot secure their account","instead":"Prominent Revoke All Sessions button in settings","severity":"high"},{"pattern":"Calling delegation \"Enable smart features\" without explaining account authority","why":"The delegated code has unrestricted access to the account, and calls from other accounts may reduce its balance. Benefit-only wording hides the grant.","instead":"In the wallet's review, explain that the named code can act for the account, identify the code, disclose persistence, and show how to remove delegation. Keep app-scoped permissions separate.","severity":"critical"},{"pattern":"Not showing sponsored gas clearly","why":"Users confused when gas suddenly costs money","instead":"Show Sponsored badge AND explain when sponsorship ends","severity":"medium"}],"uiComponents":[{"name":"Delegation status","description":"Identify the installed code and its persistent account authority, with a wallet-owned path to change or remove it.","kind":"status","states":["not delegated","delegated","change pending","removed"]},{"name":"Batch preview","description":"Show ordered calls, asset changes, and the selected account's success and failure behavior.","kind":"preview","states":["preparing","ready","simulation failed","submitted"]},{"name":"App permission controls","description":"Review and end implementation-supported app access without implying that ending access clears account delegation.","kind":"card","states":["not granted","active","expired","revoked"]},{"name":"Sponsored fee row","description":"Separate confirmed fee coverage from the assets spent by the action and disclose the unsupported or user-paid path.","kind":"status","states":["checking","sponsored","unavailable","user-paid"]}],"vocabulary":[{"use":"Allow this code to act for your account","avoid":"Enable smart features","why":"In a wallet-owned delegation review, explain the authority, code identity, persistence, and removal path. Benefits alone do not describe the grant."},{"use":"Account delegation active","avoid":"Temporary upgrade","why":"Delegation remains until separately replaced or cleared. Explain the term rather than hiding its persistence."},{"use":"App permission","avoid":"Account delegation","why":"Use this label only for scoped access enforced by the installed account's permission system, not for the EIP-7702 authorization."},{"use":"Remove account delegation","avoid":"Disconnect wallet","why":"Removing delegation is a separate account-level operation. Ending a connection or app session does not clear it."},{"use":"End app access","avoid":"Remove account delegation","why":"Use this label for the permission system's revoke operation. Say which permission ends and whether other grants remain."},{"use":"Sponsored","avoid":"Gasless, Free","why":"Use only after the sponsor accepts the action. Explain who pays and when the user-paid path applies."}],"keyTakeaways":["The wallet controls delegation and audits the code. Applications must not request EIP-7702 authorization signatures.","Delegated code has unrestricted account access; calls from other accounts can reduce the balance according to that code's rules.","Delegation persists until separately changed or cleared. Ending app access does not remove it.","Batch failure behavior and scoped permissions come from the account implementation, not the authorization itself.","Compatible delegated EOAs can use ERC-4337 infrastructure. Check the wallet, EntryPoint, bundler, network, and sponsor support."],"onMonad":[{"aspect":"Delegation persists","ethereum":"Delegation remains until a later authorization replaces or clears it. Session expiry depends on the delegated implementation.","monad":"The same persistence rule applies. Monad also restricts contract creation from code executing in a delegated EOA context.","designImplication":"Separate enabling an account, granting an app permission, revoking that permission, and removing delegation. Check that the chosen wallet implementation supports Monad."},{"aspect":"Native-balance spending","ethereum":"Ethereum does not impose Monad's reserve-balance rules.","monad":"Delegated EOAs cannot use the reserve emptying exception. Removing delegation alone does not establish eligibility: recent sender transactions and delegation changes also matter. A sponsored account does not universally need a 10 MON deposit.","designImplication":"Simulate the intended action using the current account state. Explain the amount available for that action and any temporary restriction without promising immediate access to the full balance."}],"technicalNotes":"EIP-7702 adds transaction type 0x04 and signed authorizations that install, replace, or clear an EOA delegation indicator. Delegation persists across transactions. Batching, session permissions, sponsorship, and their failure behavior depend on the delegated code and supporting wallet infrastructure. Monad supports EIP-7702 with additional reserve-balance and delegated-execution constraints; consult its network-specific documentation.","sources":[{"label":"Monad reserve-balance rules","url":"https://docs.monad.xyz/developer-essentials/reserve-balance","type":"reference"},{"label":"EIP-7702 on Monad","url":"https://docs.monad.xyz/developer-essentials/eip-7702","type":"reference"},{"label":"EIP-7702 specification","url":"https://eips.ethereum.org/EIPS/eip-7702","type":"official-spec"}],"lastUpdated":"2026-09-18","lastReviewed":"2026-09-18"},"sources":[{"label":"Official specification","url":"https://eips.ethereum.org/EIPS/eip-7702","type":"official-spec"},{"label":"Discussion thread","url":"https://ethereum-magicians.org/t/eip-set-eoa-account-code-for-one-transaction/19923","type":"discussion"},{"label":"Monad reserve-balance rules","url":"https://docs.monad.xyz/developer-essentials/reserve-balance","type":"reference"},{"label":"EIP-7702 on Monad","url":"https://docs.monad.xyz/developer-essentials/eip-7702","type":"reference"}],"urls":{"canonical":"https://www.eipsfordesigners.com/standards/EIP-7702","markdown":"https://www.eipsfordesigners.com/standards/EIP-7702/content.md","agent":"https://www.eipsfordesigners.com/standards/EIP-7702/agent.md","api":"https://www.eipsfordesigners.com/api/standards/EIP-7702","official":"https://eips.ethereum.org/EIPS/eip-7702","discussion":"https://ethereum-magicians.org/t/eip-set-eoa-account-code-for-one-transaction/19923"},"freshness":{"lastReviewed":"2026-09-18","lastUpdated":"2026-09-18"}}