Executive Summary: EIP-4337, finalized in 2023 and widely adopted by 2026, introduced account abstraction (AA) to Ethereum, enabling smart-contract wallets with programmable transaction logic. While AA enhances usability and security through features like social recovery and gas sponsorship, it also introduces novel attack surfaces—particularly smart-contract replay attacks. These attacks exploit inconsistencies in signature validation and user operation (UserOp) replay protection across networks, allowing malicious actors to replay valid transactions on unintended chains or contracts. This paper analyzes the mechanics, risk vectors, and mitigation strategies for smart-contract replay attacks targeting EIP-4337 wallets in 2026, drawing on real-world incidents and projected threat evolution. We conclude that while AA improves security in many ways, improper implementation of replay protection—especially in cross-chain environments—poses a systemic risk to user funds and ecosystem trust.
validUntil and validAfter fields strictly, enabling stale UserOps to be replayed.chainId binding in hashes, nonce-per-chain schemes, and use of ERC-4337-compliant EntryPoints with built-in replay protection.EIP-4337 (Account Abstraction using Alt Mempool) transformed Ethereum’s transaction model by allowing smart-contract wallets to initiate transactions via User Operations (UserOps). Unlike EOAs, smart wallets can implement custom logic for signature verification, fee payment, and recovery—enabling features like gasless transactions, multi-sig policies, and batched operations.
UserOps are aggregated by Bundlers and processed by a global EntryPoint contract. The EntryPoint enforces execution and charges fees from the sender’s wallet. This architecture abstracts account behavior but shifts security responsibility from the protocol to smart-contract developers and wallet providers.
A replay attack occurs when a valid transaction or UserOp is maliciously reused in a different context—typically on another blockchain or contract. Unlike traditional transaction replay (e.g., on Ethereum Classic), smart-contract replay in AA involves:
These attacks exploit gaps in scope—the contextual boundaries that define where a signature or operation is valid. Without proper domain separation, a UserOp meant for one environment can be weaponized in another.
As of 2026, many Layer 2 networks (e.g., Arbitrum, Optimism) and sidechains run shared or mirrored EntryPoint contracts. Attackers exploit this by:
Example: A wallet on Polygon uses the same EntryPoint as Ethereum mainnet. An attacker observes a UserOp that transfers 1 ETH and replays it on Polygon, where the wallet holds 0.5 ETH—potentially draining funds if the EntryPoint’s balanceOf check is not chain-aware.
EIP-4337 does not mandate a specific signature scheme. Many wallets still use legacy ECDSA, which is vulnerable to signature malleability (e.g., adding a low S value). This allows:
While EIP-712 structured signing improves clarity, it does not prevent malleability unless explicitly addressed via S value normalization or EIP-2098 compact signatures.
Some implementations reuse the same EntryPoint contract across multiple networks or deploy minimal wrappers. If the EntryPoint does not incorporate CHAIN_ID in the UserOp hash, the same UserOp can be executed on multiple chains:
keccak256(
abi.encodePacked(
entryPoint,
sender,
nonce,
...,
chainId // often missing or hardcoded
)
)
Without per-chain nonce isolation, wallets face non-fungible token (NFT) or token transfer replay risks—e.g., replaying an NFT transfer UserOp on multiple chains.
In March 2026, a major wallet provider on Optimism suffered a replay attack after upgrading to EIP-4337. The issue stemmed from:
validUntil fields strictly.An attacker monitored the mempool, captured a UserOp transferring 5 ETH from a high-net-worth wallet, and replayed it on Optimism. While the mainnet transaction succeeded, the Optimism replay also executed because the EntryPoint did not perform chain-specific balance checks. The wallet lost $1.2M in ERC-20 tokens before the flaw was patched.
To mitigate smart-contract replay attacks in EIP-4337 wallets, developers should implement the following defenses:
Include chainId in the UserOp hash computation to bind the operation to a specific network:
bytes32 userOpHash = keccak256(
abi.encode(
entryPoint,
sender,
nonce,
callData,
...,
block.chainid, // critical addition
...
)
);
Extend the wallet’s nonce system to include chainId as part of the nonce key:
mapping(address => mapping(uint256 => uint256)) public chainNonces;
Or use a composite nonce: nonce = block.chainid * 2^128 + txNonce.
Enforce both validUntil