deficli

The Multi-Chain DeFi Toolkit

Scan exploits, swap tokens, bridge assets, track whales, compare yields — all from your terminal. 40 chains. 344 protocols. 23 commands.

Requires Node.js 18+. Works on macOS, Linux, and Windows.

What Does defi-cli Do?

defi-cli unifies DeFi operations across 40 EVM chains. Instead of juggling block explorers, DEX UIs, and bridge interfaces, you use one consistent set of commands.

Scan for exploits

$ defi scan --chain hyperevm
Protocol Risk Oracle Reentrancy Flash Loan Governance
─────────────────────────────────────────────────────────────────
HyperLend Low OK OK OK OK
MoonWell Low OK OK OK OK
Felix Med STALE OK EXPOSED OK
HyperSwap Low OK OK OK OK
Scanned 12 protocols on HyperEVM — 1 medium risk detected

Compare yields across chains

$ defi yield scan USDC --min-tvl 1000000
Protocol Chain APY TVL Type
Aave V3 Arbitrum 4.82% $1.2B Lending
Compound V3 Ethereum 3.91% $890M Lending
Morpho Base 5.47% $340M Lending
Pendle Arbitrum 7.21% $180M Yield Token
Stargate Optimism 3.15% $420M LP
Found 28 pools across 12 chains above $1M TVL

Swap tokens via ODOS

$ defi swap 1000 USDC WETH --chain arbitrum
Route: USDC → WETH via ODOS
Input: 1,000.00 USDC
Output: 0.5321 WETH ($999.47)
Slippage: 0.05% | Gas: $0.12
─────────────────────────────────────
⚠ Dry-run mode. Add --broadcast to send.

Track whale positions

$ defi whales WETH --chain ethereum --top 5
Rank Address Balance Value 24h Change
1 0x47ac...f8e2 82,451 WETH $155.0M +1,200 WETH
2 0xbe0e...a3d1 61,338 WETH $115.4M -500 WETH
3 0x1db3...c7f9 45,102 WETH $84.8M +0 WETH
4 0x8103...e4b2 38,920 WETH $73.2M +340 WETH
5 0xf977...1a8c 31,445 WETH $59.1M -2,100 WETH

40 Chains, One Interface

defi-cli abstracts away chain differences. The same commands and output format work across every supported chain — switch chains with the --chain flag.

EVM Majors

EthereumArbitrumBaseBNB ChainPolygonAvalancheOptimism

L2s & Rollups

ScrollLineaMantlezkSync EraBlastInkUnichainFraxtalTaikoMetisModeManta PacificSoneiumAbstractZircuitBoba Network

Ecosystem

HyperEVMBerachainMonadSeiSonicCronosKavaGnosisRootstockCoreCeloCantoAuroraMoonbeamMoonriverHarmonyWorld Chain
$ defi --chain arbitrum portfolio
Chain Protocol Asset Balance Value
Arbitrum Aave V3 USDC 10,000.00 $10,000.00
Arbitrum Uniswap V3 ETH/USDC LP $5,230.41
Arbitrum Pendle PT-stETH 2.5 $4,680.00
─────────────────────────────────────────────────────
Total $19,910.41

Built for AI Agents

Every design decision is optimized for programmatic consumption. Structured output, runtime introspection, and MCP integration make defi-cli a first-class tool for AI agents.

Structured JSON output

$ defi --json yield compare USDC --chain hyperevm
{
"ok": true,
"data": {
"token": "USDC",
"chain": "hyperevm",
"pools": [
{
"protocol": "HyperLend",
"apy": 5.12,
"tvl": 42000000,
"type": "lending"
},
{
"protocol": "MoonWell",
"apy": 4.87,
"tvl": 18500000,
"type": "lending"
}
]
},
"meta": { "timestamp": "2026-04-02T..." }
}

MCP Server mode

$ npx -y -p @hypurrquant/defi-cli defi-mcp
MCP server listening — compatible with Claude, Cursor, and AI IDEs
  • --json Typed JSON envelope on every command
  • --fields Request only the fields you need
  • --broadcast Dry-run by default, opt-in execution
  • --ndjson Stream large result sets
  • schema Runtime command introspection
  • MCP Model Context Protocol server

Getting Started

Three commands to go from zero to your first DeFi scan.

$ npm install -g @hypurrquant/defi-cli
$ defi scan --chain hyperevm
Scanned 12 protocols on HyperEVM — all clear
$ defi swap 100 USDC WETH --chain arbitrum
Route: USDC → WETH via ODOS | Output: 0.0532 WETH
⚠ Dry-run mode. Add --broadcast to send.

Private keys are read from the DEFI_PRIVATE_KEY environment variable. They never touch disk. All transactions are dry-run by default.

Frequently Asked Questions