io.github.zerodustxyz/zerodust

编码与调试

by zerodustxyz

借助 AI agents,在 25+ 条 EVM 链上将原生 gas token 余额精确清扫至零。

什么是 io.github.zerodustxyz/zerodust

借助 AI agents,在 25+ 条 EVM 链上将原生 gas token 余额精确清扫至零。

README

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:

code
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

  1. User connects wallet to ZeroDust
  2. User selects source chain and destination (same-chain or cross-chain)
  3. User signs ONE authorization (no gas needed)
  4. ZeroDust sponsor executes the sweep
  5. User receives funds on destination
  6. Origin chain balance: EXACTLY ZERO

Supported Sweep Cases

CaseDescriptionExample
Cross-chain, same addressExit to yourself on another chainArbitrum → Base (same wallet)
Cross-chain, different addressExit to another wallet on another chainArbitrum → Base (different wallet)
Same-chain, different addressConsolidate to another walletArbitrum → 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:

ChainIDTokenChainIDToken
Ethereum1ETHSei1329SEI
Optimism10ETHAstar zkEVM1514ETH
BSC56BNBSoneium1868ETH
Gnosis100xDAIMantle5000MNT
Unichain130ETHKaia5330KAIA
Polygon137POLBase8453ETH
Sonic146SPlasma9745XPL
X Layer196OKBApeChain33139APE
Fraxtal252frxETHMode34443ETH
World Chain480ETHArbitrum42161ETH
Celo42220CELORedstone57073ETH
BOB60808ETHBerachain80094BERA
Scroll534352ETHZora7777777ETH

Plus 46 testnets for development.

See contracts/README.md for explorer links.

Project Structure

code
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

code
┌─────────────────────────────────────────────────────────────┐
│                        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.

code
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

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

ContractStatusFeatures
ZeroDustSweepMainnetProductionUnified SweepIntent, granular fees, sponsor model
ZeroDustSweepTESTTestnetSame as mainnet, for testing

Verified Mainnet Sweeps

ChainSweptTX
Base$3.46 → 0View
Arbitrum$3.57 → 0View
BSC$2.25 → 0View
Polygon$7.55 → 0View

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

常见问题

io.github.zerodustxyz/zerodust 是什么?

借助 AI agents,在 25+ 条 EVM 链上将原生 gas token 余额精确清扫至零。

相关 Skills

网页构建器

by anthropics

Universal
热门

面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。

在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。

编码与调试
未扫描114.1k

前端设计

by anthropics

Universal
热门

面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。

想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。

编码与调试
未扫描114.1k

网页应用测试

by anthropics

Universal
热门

用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。

借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。

编码与调试
未扫描114.1k

相关 MCP Server

GitHub

编辑精选

by GitHub

热门

GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。

这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。

编码与调试
83.4k

by Context7

热门

Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。

它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。

编码与调试
52.2k

by tldraw

热门

tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。

这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。

编码与调试
46.3k

评论