Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Sweep

Multi-chain dust sweeper that consolidates small token balances into DeFi yield positions.

License PRs Welcome 8 Chains

Quick Start · Features · Docs · Contributing


TypeScript · Solidity · Next.js 14 · Foundry · Hono


Problem

Crypto users accumulate "dust" — small token balances worth $0.50-$10 that are economically impractical to move because gas fees exceed the token value.

Wallet Analysis
───────────────────────────────────────────
  Ethereum    $3.20 SHIB, $2.10 PEPE    ✗ no ETH for gas
  Base        $5.40 memecoins          ✗ no ETH for gas
  Arbitrum    $4.80 ARB dust           ✗ no ETH for gas
  Solana      $8.50 memecoins          ✗ no SOL for gas
───────────────────────────────────────────
  Total Trapped Value: $24.00

Solution

Sweep consolidates dust across chains, pays gas with tokens you have, and routes everything into DeFi yield.

Features

Multi-Chain Ethereum · Base · Arbitrum · Polygon · BSC · Linea · Optimism · Solana
Gasless Pay gas with any ERC-20 via ERC-4337 account abstraction
DeFi Yield Route to Aave · Yearn · Beefy · Lido · Jito
Cross-Chain Consolidate from all chains to one destination
MEV Protected CoW Protocol batch auctions

Structure

sweep/
├── contracts/     Solidity (Foundry)
├── src/           Backend API (Hono)
├── frontend/      Next.js 14
├── docs/          Documentation
└── tests/         Test suites

Quick Start

Prerequisites: Node.js 20+, Docker, Foundry

git clone https://github.com/nirholas/sweep.git && cd sweep
cp .env.example .env        # Configure your keys
docker-compose up -d        # Start Postgres + Redis
npm install && npm run db:migrate && npm run dev

Contracts

cd contracts && forge install && forge build && forge test

Frontend

cd frontend && npm install && npm run dev

Docs

Architecture System design
API Reference REST endpoints
OpenAPI Spec OpenAPI 3.1
Contracts Smart contracts
Security Security policy

Tech Stack

Contracts Solidity · Foundry · OpenZeppelin
Backend Node.js · Hono · BullMQ · Drizzle
Frontend Next.js 14 · wagmi · viem · Tailwind
Infra PostgreSQL · Redis · Docker · K8s
AA ERC-4337 · Pimlico · Coinbase Smart Wallet
DEX 1inch · Jupiter · Li.Fi · CoW Protocol
DeFi Aave V3 · Yearn V3 · Beefy · Lido

Contributing

fork → branch → commit → push → PR

License

Apache 2.0 — see LICENSE


🌐 Live HTTP Deployment

Sweep DeFi is deployed and accessible over HTTP via MCP Streamable HTTP transport — no local installation required.

Endpoint:

https://modelcontextprotocol.name/mcp/sweep-defi

Connect from any MCP Client

Add to your MCP client configuration (Claude Desktop, Cursor, SperaxOS, etc.):

{
  "mcpServers": {
    "sweep-defi": {
      "type": "http",
      "url": "https://modelcontextprotocol.name/mcp/sweep-defi"
    }
  }
}

Available Tools (3)

Tool Description
get_dust_threshold Minimum sweep threshold
find_yield_for_token Yield for idle token
get_price Get crypto prices

Example Requests

Minimum sweep threshold:

curl -X POST https://modelcontextprotocol.name/mcp/sweep-defi \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_dust_threshold","arguments":{"chain":"ethereum"}}}'

Yield for idle token:

curl -X POST https://modelcontextprotocol.name/mcp/sweep-defi \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"find_yield_for_token","arguments":{"symbol":"USDC"}}}'

Get crypto prices:

curl -X POST https://modelcontextprotocol.name/mcp/sweep-defi \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_price","arguments":{"ids":"ethereum","vs_currencies":"usd"}}}'

List All Tools

curl -X POST https://modelcontextprotocol.name/mcp/sweep-defi \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Also Available On

Powered by modelcontextprotocol.name — the open MCP HTTP gateway