Inspiration
This project started when I noticed how often people lose control of their wallets after unknowingly signing bad approvals. Once a sweeper bot gets installed, it automatically steals every asset that enters the wallet.
I wanted to create a tool that helps people safely recover their own funds, even if their wallet is already compromised and can’t send normal transactions anymore.
What it does
This project gives users a safe and efficient way to recover assets from their own compromised MetaMask wallets, especially in cases where a sweeper bot keeps stealing everything that comes in.
By using EIP-7702 gas sponsorship and batch transactions, the system lets users perform a full recovery even when:
- the wallet has no ETH for gas, and
- a malicious bot is watching the wallet continuously.
All recovery steps happen quickly and atomically, so users can move their assets before the sweeper bot gets a chance to react.
How we built it
We built the system around the new abilities introduced in EIP-7702, which allows normal wallets (EOAs) to temporarily behave like smart contracts and receive sponsored gas.
Key parts of the project include:
- A 7702-based sponsorship flow that lets compromised wallets execute transactions without needing gas.
- A batcher contract that bundles all token transfers into one safe atomic transaction.
- A timing-optimised strategy designed to stay ahead of sweeper bots.
- A clean and minimal frontend, ensuring users only sign safe actions needed for recovery.
- Extensive simulations of gas, mempool behaviour, and attack patterns to increase the success rate.
Everything is built to be permissionless, transparent, and entirely controlled by the user.
Challenges we ran into
- Sweeper bots trigger faster than human users, so designing a strategy to consistently beat them required careful gas and timing optimization
- Implementing EIP-7702 during its early ecosystem adoption brought compatibility challenges across networks and RPC providers
- Ensuring every step remained safe—no risky approvals, no unnecessary permissions, no room for misuse
- Handling unpredictable gas conditions that could reduce the success probability of a recovery batch
- Creating a smooth UX for a problem that is inherently stressful for users facing a compromised wallet
Accomplishments that we're proud of
- Successfully executing recovery flows on compromised wallets without needing ETH in the wallet
- Designing a batch transaction approach that consistently outruns sweeper bots
- Building a user-friendly interface for a process normally requiring deep technical knowledge
- Leveraging a cutting-edge Ethereum improvement proposal (EIP-7702) in a practical, real-world scenario
- Maintaining strict safety boundaries: the system works only for self-recovery, never accessing anyone else’s assets
What we learned
- How sweeper bots monitor mempools and front-run user transactions
- The mechanics and possibilities of EIP-7702 for sponsored execution
- Designing secure flows that avoid new vulnerabilities
- Modeling gas behavior and crafting transaction sequences that minimize attack windows
- Communicating technical concepts to users in a clear, reassuring way
What's next for eip7702-GasSponsor-Batcher
- Expanding support for more chains as EIP-7702 adoption grows
- Adding better pre-flight checks to detect what assets are recoverable before execution
- Integrating automated gas estimation tuned to outrun known sweeper bot patterns
- Building an educational module to help users understand how compromises happen and how to prevent them
- Exploring a fully modular recovery toolkit powered by future Ethereum improvements
- Refining the UX so recovery can be completed with as few steps—and as little stress—as possible
Built With
- css
- ethers
- html
- javascript
- node.js
- viem