Unrecoverable UserOperations and the Paymaster Security Gap

The shift to contract-based risks

Smart account adoption reached 40 million wallets in early 2026. Coinbase facilitated 2.3 million user-controlled deployments through its Smart Wallet. This expansion coincides with Samsung’s rollout of USDC transfers to 82 million Galaxy devices. While these features improve access, they also shift the risk profile of the Ethereum network. The traditional fear of losing a private key is being replaced by the risk of flawed smart contract logic. You already know how private key loss ruins accounts.

In the traditional Ethereum model, users interact via externally owned accounts (EOAs). These accounts depend on a public/private keypair, where the loss of a private key results in the permanent loss of all funds. Smart contract accounts, however, use code to manage transactions. This allows for social recovery, where users designate guardians to help regain access, and gas sponsorship, where a third party pays transaction fees. The transition from EOAs to smart accounts changes the fundamental nature of blockchain risk. Instead of managing keys, users and developers must manage the security of the validation logic within the smart contract.

Technical failures in gas sponsorship

The $890,000 loss in unrecoverable UserOperation bundles stems from a mismatch between paymaster logic and EntryPoint requirements. In traditional EOA transactions, a user must hold ETH to pay for gas. In ERC-4337, a paymaster contract covers this cost. However, if the paymaster logic fails to verify that the caller is the EntryPoint, an attacker can trigger unauthorized gas spending. This bypasses the bundler and the mempool rules entirely. This specific vulnerability leads to the loss of funds in unrecoverable bundles.

Error Code Meaning Necessary Action
AA21 Insufficient prefund Verify paymasterAndData configuration
AA31 Paymaster low on funds Add more gas tokens to the EntryPoint
AA36 Over paymaster gas limit Increase paymasterVerificationGasLimit
AA93 Malformed paymaster data Check the length of the paymaster field

The error code AA21 signifies that the sender lacks enough native tokens to cover gas costs, even when intending to use a paymaster. If the paymasterAndData field lacks correct configuration, the EntryPoint rejects the operation. Similarly, error AA31 indicates that the paymaster lacks sufficient funds in its EntryPoint deposit. These errors prevent the execution of UserOperations, but they can also hide deeper logic flaws. If a developer misconfigures the paymaster, the resulting error can leave transactions in a state that developers struggle to resolve.

The mechanics of the gas griefing attack

The relationship between the user, the bundler, and the EntryPoint creates a new attack surface. Paymasters agree to cover gas during a short validation window. If the validation logic remains loose, an attacker targets the trust relationship. One common mistake involves the postOp function, which settles gas costs after execution. An attacker crafts calldata that remains cheap to validate but stays expensive to execute, forcing the paymaster to cover a far larger bill than the contract originally priced during the validation phase.

The technical process follows these steps:

  1. Users send a UserOperation to a dedicated mempool.
  2. Bundlers pick up these objects and package them into a transaction.
  3. The EntryPoint contract executes the bundle via the handleOps call.
  4. The Paymaster validates the UserOperation.

This flow relies on the Paymaster providing enough gas for the transaction. Gelato reported that roughly $5.7 million in gas moved through its paymaster infrastructure. If a developer misses the requirement that all calls to validatePaymasterUserOp must originate from the EntryPoint, any actor can bypass the bundler and the mempool rules to trigger unauthorized gas spending. This mismatch in expectation caused the $890,000 loss in unrecoverable bundles.

The testing gap in smart accounts

Engineers focus on reentrancy and flash loan attacks. They do not apply the same level of fuzzing or invariant testing to paymaster validation logic. Because the paymaster validation logic remains a new and less understood component compared to traditional token contracts or lending pools, many engineers fail to implement sufficient fuzzing or invariant coverage for these specific contracts. The $890,000 loss in unrecoverable bundles highlights this specific weakness.

The scale of this issue grows as more users migrate to managed wallets. With 2.3 million Coinbase Smart Wallet deployments, a single error in a widely used paymaster can affect millions of users instantly. The complexity of the EntryPoint, which acts as a singleton contract for all ERC-4337 accounts, means that a single flaw in how it handles deposits or validation can have systemic effects. Does the industry prioritize speed of deployment over the rigorous testing of paymaster validation logic? The testing gap remains the primary driver of these new vulnerabilities.

Newsletter