io.github.zerodustxyz/zerodust
Sweep native gas tokens to exactly zero across 25+ EVM chains via AI agents.
Ask AI about io.github.zerodustxyz/zerodust
Powered by Claude Β· Grounded in docs
I know everything about io.github.zerodustxyz/zerodust. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
ZeroDust
Exit a blockchain completely - transfer 100% of your native gas balance via EIP-7702
ZeroDust is an intent-based exit system that enables users to sweep their entire native gas token balance to exactly zero via EIP-7702 sponsored execution.
The Problem
When users want to fully exit a blockchain, they face an impossible situation:
User has: 0.0008 ETH on Arbitrum
User wants: 0 ETH on Arbitrum (transfer everything to Base)
The Problem:
βββ To send ETH, you need ETH for gas
βββ If you send all your ETH, you can't pay gas
βββ If you keep gas, you can't send all your ETH
βββ Result: Small amount always stranded
ZeroDust is the only solution that enables complete chain exits for native gas tokens.
How It Works
- User connects wallet to ZeroDust
- User selects source chain and destination (same-chain or cross-chain)
- User signs ONE authorization (no gas needed)
- ZeroDust sponsor executes the sweep
- User receives funds on destination
- Origin chain balance: EXACTLY ZERO
Supported Sweep Cases
| Case | Description | Example |
|---|---|---|
| Cross-chain, same address | Exit to yourself on another chain | Arbitrum β Base (same wallet) |
| Cross-chain, different address | Exit to another wallet on another chain | Arbitrum β Base (different wallet) |
| Same-chain, different address | Consolidate to another wallet | Arbitrum β Arbitrum (different wallet) |
Post-Condition (enforced on-chain): Source balance = exactly 0 wei
Supported Chains
Contract Address (same on all chains): 0x3732398281d0606aCB7EC1D490dFB0591BE4c4f2
ZeroDust is deployed on 26 mainnet chains with EIP-7702 support:
| Chain | ID | Token | Chain | ID | Token |
|---|---|---|---|---|---|
| Ethereum | 1 | ETH | Sei | 1329 | SEI |
| Optimism | 10 | ETH | Astar zkEVM | 1514 | ETH |
| BSC | 56 | BNB | Soneium | 1868 | ETH |
| Gnosis | 100 | xDAI | Mantle | 5000 | MNT |
| Unichain | 130 | ETH | Kaia | 5330 | KAIA |
| Polygon | 137 | POL | Base | 8453 | ETH |
| Sonic | 146 | S | Plasma | 9745 | XPL |
| X Layer | 196 | OKB | ApeChain | 33139 | APE |
| Fraxtal | 252 | frxETH | Mode | 34443 | ETH |
| World Chain | 480 | ETH | Arbitrum | 42161 | ETH |
| Celo | 42220 | CELO | Redstone | 57073 | ETH |
| BOB | 60808 | ETH | Berachain | 80094 | BERA |
| Scroll | 534352 | ETH | Zora | 7777777 | ETH |
Plus 46 testnets for development.
See contracts/README.md for explorer links.
Project Structure
zerodust/
βββ contracts/ # Smart contracts (Foundry)
β βββ src/
β β βββ ZeroDustSweepMainnet.sol # Production contract
β β βββ ZeroDustSweepTEST.sol # Testnet contract
β βββ script/
β β βββ DeployMainnet.s.sol # Mainnet deployment (CREATE2)
β βββ broadcast/ # Deployment logs
βββ docs/
Architecture
Contract Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β User's EOA β
β (EIP-7702 delegated) β
β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β ZeroDustSweepMainnet (bytecode) β β
β β β β
β β executeSweep(intent, sig) β β
β β β β β
β β ββββββββββββββ΄βββββββββββββ β β
β β βΌ βΌ β β
β β MODE_TRANSFER (0) MODE_CALL (1) β β
β β Same-chain sweep Cross-chain sweep β β
β β β β β β
β β βΌ βΌ β β
β β Transfer to Call bridge target β β
β β destination (callTarget + callData) β β
β β β β β
β βββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββ β
β β β
ββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββ
β External Bridge β
β (Gas.zip) β
β β
β Delivers funds on β
β destination chain β
βββββββββββββββββββββββββββ
Security Model
- No admin functions - Immutable after deployment
- No upgradability - What you see is what you get
- Unified SweepIntent - Single signed structure for all sweep types
- Zero balance enforcement - Contract reverts if any balance remains
- ERC-7201 storage - Prevents slot collisions with other EIP-7702 apps
- Immutable sponsors - Stored in bytecode, not storage
Fee Structure
Service Fee: 1% of swept value, with $0.05 minimum and $0.50 maximum.
Total Fee = Gas Reimbursement + Service Fee + Bridge Fee (if cross-chain)
Examples:
- $5 balance β $0.05 fee (1% = $0.05, at min) β User receives ~$4.95
- $10 balance β $0.10 fee (1%) β User receives ~$9.90
- $60 balance β $0.50 fee (max) β User receives ~$59.50
Documentation
- contracts/README.md - Contract details and deployment
- contracts/SPECIFICATION.md - Technical specification
- contracts/DEPLOYMENT.md - Deployment guide
Security
ZeroDust is designed with security as the top priority:
- No fund custody - All operations are atomic, single-transaction
- User-controlled limits - maxTotalFeeWei and minReceive signed by user
- Mandatory simulation - Every transaction simulated before execution
- routeHash binding - Signature bound to specific bridge route (cross-chain)
- Internal security review - 7 rounds, 16 issues identified and fixed
- External audit - Pending (required before full launch)
Status
Smart Contract: Deployed on 26 mainnets + 46 testnets
Contract Versions
| Contract | Status | Features |
|---|---|---|
| ZeroDustSweepMainnet | Production | Unified SweepIntent, granular fees, sponsor model |
| ZeroDustSweepTEST | Testnet | Same as mainnet, for testing |
Verified Mainnet Sweeps
| Chain | Swept | TX |
|---|---|---|
| Base | $3.46 β 0 | View |
| Arbitrum | $3.57 β 0 | View |
| BSC | $2.25 β 0 | View |
| Polygon | $7.55 β 0 | View |
See contracts/README.md for full deployment list.
Testnets NOT Supporting EIP-7702
The following testnets were tested and do not support EIP-7702:
Abstract, Lens, zkSync, Taiko, opBNB, Avalanche, Swell, Cyber, Boba, Metis, Fuse, Aurora, Flare, Vana, Corn, Rootstock, Apechain, IoTeX, Viction, XDC, Telos, Kava, EDU Chain, Gravity, Manta Pacific, Lightlink, Moonbase, Nibiru, Somnia, Rari, Blast, Xai, B3, Mezo, Chiliz, HashKey, Memecore
Note: Mainnet support may differ from testnet.
Cross-Chain Bridging
ZeroDust supports cross-chain sweeps via the MODE_CALL pattern:
- callTarget: Bridge contract address
- callData: Bridge-specific transaction data
- routeHash:
keccak256(callData)- binds signature to specific route
Primary Bridge: Gas.zip - 239+ chains, ~5 second delivery
License
MIT License - see LICENSE
Production deployed on 26 mainnet chains. Contract: 0x3732398281d0606aCB7EC1D490dFB0591BE4c4f2
