On 14 October 2026, the security firm ExVul reported that an attacker had drained about 9.1 ETH from one wallet with a single sponsored EIP-7702 transaction. The attacker even paid the gas. Yet the same feature now powers batched swaps and gas-free sign-ups in major wallets, and MetaMask turns on smart accounts for new users by default.
This is EIP-7702 explained for the people who build with it. Most guides stop at “what it is”, but this one shows how the type 0x04 set-code call works, what you can ship, how it fits with ERC-4337, which wallets support it, and how to keep users safe. You also get worked gas numbers, a launch plan and cost ranges.
In this guide:
- EIP-7702 is Final and has been live on Ethereum since the Pectra upgrade on 7 May 2025. It lets a normal wallet address run smart contract code without moving funds.
- Each authorization costs 25,000 gas, and 12,500 comes back if the account already exists. Each step you batch away saves at least 21,000 gas.
- You still need ERC-4337 for paymasters and bundlers. EntryPoint v0.8 and later accept 7702 sign-offs out of the box.
- The delegate contract is your biggest risk. Set it up in the same call, use namespaced storage, and never ask users to sign a chain ID of 0.
- Users revoke by pointing the account to the zero address, and any wallet can pay that gas. If the key leaked, though, revoking will not save the funds.
EIP-7702 Explained: What It Changes for an Ethereum Account
EIP-7702 adds a new kind of Ethereum transaction. It lets a normal wallet, known as an EOA, point to a smart contract and run that contract’s code as its own. The address stays the same. The funds stay put. The private key still controls everything.
Before 7702, teams had to choose: keep users on plain wallets that sign one action at a time and need ETH for gas, or move them to a new smart contract wallet at a new address. EIP-7702 removes that trade-off.
Once an account points to a delegate, it can do three things a plain wallet cannot:
- Batching: Approve and swap in one signature, or send ten payouts at once.
- Sponsored gas: Someone else pays the fee, or the user pays in USDC instead of ETH.
- Limited keys: Session keys, spending caps and auto-pay rules, set by the delegate code.
However, one thing does not change. The original key is still the master key, and it can override any rule the delegate sets. So EIP-7702 is an upgrade for ease of use, not for key safety. For that, you still need a key design such as MPC wallet development or secure hardware.
How the Set-Code Transaction (Type 0x04) Works
EIP-7702 calls its new format a set-code transaction, type `0x04`. It looks like a normal EIP-1559 transaction with one extra field: an `authorization_list`. Each entry in that list is a signed tuple.
| Tuple field | What it holds | Rule for builders |
| chain_id | The chain the sign-off is valid on | A value of 0 makes it valid on every chain. Avoid it for users. |
| address | The delegate contract the account will point to | Use a known, audited contract. The zero address clears it. |
| nonce | The account’s current nonce | It must match exactly. It goes up by one once the code is set. |
| y_parity, r, s | The owner’s signature | The owner signs a hash of the byte 0x05 joined to `rlp([chain_id, address, nonce])`. |
Here is what happens when the call lands:
- The user signs. The wallet signs the tuple with the user’s key. This step is free and needs no ETH.
- Anyone submits it. The user, a relayer or an ERC-4337 bundler wraps the tuple in a type 0x04 call and pays the gas.
- The chain checks it. It confirms the chain ID, the nonce and the signature. A bad tuple is skipped, and the rest still runs.
- The code is set. The account’s code becomes a 23-byte pointer: `0xef0100` followed by the delegate address.
- Calls run the delegate code. Any call to the user’s address now runs the delegate’s logic, with the user’s own storage and balance.

A few rules from the EIP trip up new teams. First, a set-code call cannot create a contract, so the “to” field must be set. Second, the list cannot be empty. Third, when users send it from their own account, the nonce goes up before the tuple is checked, so the tuple must carry the current nonce plus one. Fourth, an account points to one delegate at a time, and the latest one wins.
Finally, clearing a delegate resets the code but keeps the account’s storage, so old data is still there when a new delegate arrives.
What You Can Ship With EIP-7702
Most teams use 7702 for three features, and each maps to a standard you can build on today.
Batched Actions With wallet_sendCalls
ERC-5792 is Final and defines `wallet_sendCalls`, the method a dapp uses to ask a wallet for a batch. The dapp first calls `wallet_getCapabilities` to see if the wallet can run the batch as one unit, so all calls pass or none do. On the contract side, ERC-7821, still a Draft, defines a small `execute` function that many delegates follow. Typical uses are approve plus swap, or claim plus restake, in one click.
Gas Sponsorship and Gas in Tokens
Because anyone can submit the set-code call, a sponsor can pay the gas. In practice, most apps route this through an ERC-4337 paymaster, which can cover the fee or take USDC instead. For instance, Coinbase’s CDP Paymaster sponsors upgraded EOAs, even when another tool did the upgrade. If your app sponsors token transfers, our guide to ERC865 token development covers the token-side options, such as permit and ERC-3009.
Session Keys and Spending Limits
The delegate code can accept a second, weaker key. For example, a game can hold a session key that may spend up to 20 USDC for one hour, while the main key never leaves the user’s phone. This feature most often needs custom code and an audit.
Worked Example: What Batching Saves in Gas
Each Ethereum transaction pays a flat 21,000 gas before it does any work. Under EIP-7702, each sign-off in the list adds 25,000 gas, and 12,500 comes back if the account already exists. So the first batch costs more than a plain call, and each later batch saves gas.

Take a swap that needs an approval first:
- Two plain calls: 2 × 21,000 = 42,000 gas of base cost, plus two signatures and two waits.
- First batch, with the sign-off: 21,000 + 25,000 − 12,500 = about 33,500 gas, in one signature.
- Each later batch: 21,000 gas, since the delegate is already in place.
At an assumed 1 gwei and ETH near $2,500, its mid-October 2026 level, 21,000 gas is about 5 cents. So the real win is fewer clicks and no ETH needed at sign-up.
EIP-7702 vs ERC-4337: Use Both, Not One
“EIP-7702 vs ERC-4337” is one of the most searched questions on this topic. In fact, they solve different parts of the same problem. EIP-7702 changes what an account is. ERC-4337 supplies the system around it: user operations, bundlers and paymasters.
| EIP-7702 delegated EOA | ERC-4337 smart account | |
| Address | Same as the user’s current wallet | A new contract address |
| Setup cost | One sign-off (25,000 gas, part refunded) | A contract deploy |
| Key control | The original key always rules | Rules can replace or rotate keys |
| Social recovery | Limited, the key can still override | Full |
| Gas sponsorship | Through a sponsor or a 4337 paymaster | Built in through paymasters |
| Best for | Current users with funds and history | New users and treasury accounts |
The two now work together. The ERC-4337 EntryPoint v0.8 release (March 2025) added native support for 7702 sign-offs. Its `eth_sendUserOperation` call takes an `eip7702Auth` field, and it ships a sample `Simple7702Account`. For contract code, OpenZeppelin Contracts offers `SignerEIP7702`, `Account` and `ERC7821` building blocks.

How to Write a Safe Delegation Contract
The delegate runs with full power over the user’s funds, and one bug can drain every account that points to it. These rules come from the EIP’s own safety notes and from the OpenZeppelin and Coinbase docs:
- Set it up in the same step. A delegate that needs setup, such as naming an owner, can be front-run between delegation and setup. Coinbase warns against pointing straight at a wallet contract. It suggests a proxy that sets the logic in the same call.
- Use namespaced storage. Users may switch delegates later. Store data under ERC-7201 roots, so a new delegate does not read old data as its own.
- Check every signature. Bind each signed call to the chain ID, the account and a nonce, so no one can replay it.
- Drop tx.origin checks. After 7702, `tx.origin == msg.sender` no longer proves the caller is a plain wallet. Review any guard that relied on it.
- Refuse chain ID 0. A tuple signed with chain ID 0 works on every chain that supports 7702, even where your delegate address holds other code.
- Plan for relayer abuse. A user can bump their nonce or empty the account before your relayer’s call lands, so the relayer pays for nothing. Set caps, rate limits and per-user budgets.
- Get it audited. Audit the delegate before launch, and again after each change.
For the wider list of wallet threats, from seed storage to signing flows, see our guide to crypto wallet security.
EIP-7702 Wallet and Chain Support in October 2026
Support is broad but uneven. Here is what each team states in its own docs.
| Product | EIP-7702 status | What builders should know |
| MetaMask | Live: smart accounts point to the MetaMask delegator | Turned on per network, including Ethereum, Base, Optimism, Arbitrum One and BNB Chain. On by default for new users, who can revert at any time. |
| MetaMask gas included transactions | Live | Users pay fees in tokens such as USDC on Ethereum, BNB Chain, Arbitrum, Polygon, Linea, Base and Tempo, for a small MetaMask fee. |
| Ambire | Live | Delegates on its own with any transaction, with no separate switch step. |
| Coinbase CDP | Partial | CDP Paymaster sponsors upgraded EOAs. CDP Wallets do not yet do 7702 upgrades directly. |
| ERC-4337 EntryPoint | Live since v0.8 | Native 7702 sign-offs; v0.9 adds an event that logs the delegate. |
| Base | Planned | Base Transactions with 7702-style delegation will go live with the Everest upgrade. Dates are not set. |
One trap shows up in support threads often. If a user imports the same address into two 7702 wallets, the last delegation replaces the first, and the first wallet quietly breaks. So read the current delegate with `eth_getCode` before any batch.
If you would rather rent this layer than build it, our guide to wallet as a service compares the main providers and their 2026 prices.
Ship EIP-7702 Smart Accounts Without the Delegation Risk
EIP-7702 Wallet Development — done right.
- Audited Delegates: Delegate contracts with atomic setup, namespaced storage and replay protection.
- Gas Sponsorship: ERC-4337 paymaster and relayer setups with per-user caps, so users never need ETH.
- One-Click Batching: wallet_sendCalls support for approve-and-swap and other multi-step flows.
- Safe Signing Screens: Delegate allowlists, batch simulation and one-tap revoke built into your wallet.
See a live demo of a smart account wallet with sponsored gas and batched actions.
Book a Free Demo to plan the EIP-7702 and ERC-4337 setup that fits your users and chains.
Delegation Phishing: The Main Risk, With Dated Data
A 7702 sign-off hands over an account’s logic. It is free to sign, and it can look like a harmless “sign in” request. That makes it the prize every phishing site wants. The record so far:
| Date | Source | What happened |
| 1 Jun 2025 | Wintermute, via The Block | Over 80% of EIP-7702 delegations were tied to copy-pasted sweeper contracts built to drain wallets whose keys had leaked. |
| Aug 2025 | Scam Sniffer 2025 report | Two batch-signature cases cost victims $1.54M and $1.00M. |
| Full year 2025 | Scam Sniffer, published 3 Jan 2026 | Signature phishing of all kinds took $83.85M from 106,106 victims. |
| 14 Oct 2026 | ExVul, via crypto.news | A sponsored type 0x04 call set a hostile delegate and took 9.1231 ETH, about $22,770. |
There are two attack patterns. In the first, the scam site asks for a delegation to its own sweeper contract. In the second, it uses a real delegate, such as the wallet’s own, and hides transfers inside a batch. The second is harder to spot.
Wallet teams can block most of this:
- Allowlist delegates: Let dapps request batches, but never let them pick the delegate.
- Simulate every batch: Show the net balance change of the whole batch, not each call alone.
- Warn on risky tuples: Flag chain ID 0, unknown delegates and any sign-off a website asks for.
- Show the current delegate: Put it on the account screen, with a one-tap revert.
How Users Check and Revoke a Delegation
Users can see the delegate in the “Delegated Address” field on Etherscan. To revoke, they sign a new tuple that points to the zero address. The hard case comes up in many Reddit threads: the wallet is drained, and any ETH sent for gas is swept at once. Because anyone can submit the type 0x04 call, a second wallet or a rescue service can pay that gas.
Be honest with users about one thing, though. If the key itself leaked, revoking does not help, because the attacker can sign a new delegation at any time. The only fix is to move what is left to a fresh wallet.
How to Add EIP-7702 to Your Wallet or App: Step by Step
- Pick the scope: batching only, sponsorship, session keys, or all three.
- Choose the delegate: reuse an audited one, or write your own for custom rules.
- Pick the gas payer: your own relayer, or a 4337 bundler and paymaster on EntryPoint v0.8 or later.
- List your chains: confirm each has turned on 7702, and sign one tuple per chain.
- Build the signing screens: delegate name, chain, net effect of each batch, and a revoke button.
- Test the edge cases: nonce errors, replaced delegates, old storage and relayer abuse.
- Audit, then launch in stages: start small, cap sponsorship and watch delegation patterns.
EIP-7702 Cost and Timeline
Adding 7702 is usually one part of a wallet build or upgrade, not a project on its own. Published 2026 agency cost guides put a white label wallet at about $15,000 to $90,000 and a custom wallet at about $50,000 to $200,000. A custom delegate with session keys adds design and audit time on top.
The other cost is the gas you sponsor. Here is a simple worked budget:
| Input | Value |
| Monthly active users | 10,000 |
| Sponsored actions per user per month | 4 |
| Gas per action | 150,000 |
| Gas price, Ethereum mainnet | 1 gwei (assumed) |
| ETH price | $2,500 |
| Monthly sponsor bill | 6 ETH, about $15,000 |
On a layer 2 such as Base or Arbitrum, gas prices are usually far lower. Either way, set a monthly cap per user before you go live.
For timelines, Coinsclone delivers white label wallets in 3 to 5 weeks and custom wallets in 8 to 12 weeks. A white label DeFi wallet is the faster route when a standard delegate fits your needs.
How to Choose an EIP-7702 Development Partner
A good partner asks about your users before your features. Before a scoping call, prepare:
- Your users: new sign-ups, or current wallet holders with funds and history?
- Your chains: which networks you need at launch, and which come later.
- Your gas plan: who pays, in which token, and the monthly budget.
- Your custody model: self-custody, embedded or business-held, since this shapes the licence question.
- Your risk rules: which delegates you allow, and how you warn users.
Then ask to see a delegate they have shipped and the audit behind it. Coinsclone has been building since 2018 and has delivered 350+ platforms for 200+ clients across 20 industries. Our crypto wallet app development team builds 7702 delegates, 4337 paymaster setups and the signing screens around them.
Frequently Asked Questions
Is EIP-7702 live?
Yes. EIP-7702 is Final and went live on Ethereum mainnet with the Pectra upgrade on 7 May 2025. MetaMask also supports it on Base, Optimism, Arbitrum One, BNB Chain and other networks.
What is EIP-7702 delegation?
Delegation means pointing a normal wallet address to a smart contract, so the address runs that contract’s code. The owner signs a sign-off naming the contract, and a type 0x04 call sets it on-chain. The address, funds and private key stay the same.
What is the difference between EIP-7702 and ERC-4337?
EIP-7702 upgrades an existing wallet address so it can run smart account code. ERC-4337 provides the bundlers and paymasters that sponsor gas and process user operations, often for new contract accounts. Most teams use both: 7702 for current users and 4337 for the gas system.
How do I check an EIP-7702 delegation?
Look up the address on Etherscan, which shows a “Delegated Address” field. Developers can call `eth_getCode` on the address. A result that starts with `0xef0100` means the account is delegated, and the rest is the delegate’s address.
How do I revoke an EIP-7702 delegation?
Sign a new tuple that points to the zero address and submit it in a type 0x04 call. This clears the code but keeps the account’s storage. In MetaMask, open Account details, choose Smart account and switch off the network.
Can I revoke an EIP-7702 delegation without gas?
The account itself does not need ETH. The sign-off only needs the owner’s signature, so another wallet or a rescue service can submit it and pay the gas. If the private key was stolen, though, move what is left to a new wallet, since the attacker can delegate again.
Is EIP-7702 safe?
The standard is sound, but a bad delegate can drain an account. Scam Sniffer recorded two batch-signature losses of $1.54M and $1.00M in August 2025. Use wallets that allowlist delegates, read each batch before signing, and treat any sign-off a website asks for as a red flag.
Does EIP-7702 change my wallet address?
No. The account keeps its address and its funds. MetaMask states that a smart account “still remains an EOA” and is still controlled by the same recovery phrase.