@hypurrquant/defi-cli 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -39
- package/dist/index.js +7588 -5875
- package/dist/index.js.map +1 -1
- package/dist/main.js +7631 -5916
- package/dist/main.js.map +1 -1
- package/dist/mcp-server.js +310 -63
- package/dist/mcp-server.js.map +1 -1
- package/package.json +4 -3
- package/skills/defi-cli/SKILL.md +181 -0
- package/skills/defi-cli/package.json +38 -0
- package/skills/defi-cli/references/commands.md +162 -0
- package/skills/defi-cli/references/protocols.md +115 -0
- package/skills/defi-cli/scripts/exploit-scan.sh +10 -0
- package/skills/defi-cli/scripts/portfolio-snapshot.sh +19 -0
- package/skills/defi-cli/scripts/preflight.sh +14 -0
- package/skills/defi-cli/scripts/yield-scan.sh +10 -0
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ npx -y @hypurrquant/defi-cli --json status
|
|
|
20
20
|
- **21 Protocols** — lending (Aave V3 forks, Morpho, HypurrFi), DEX (KittenSwap, Ramses, Uniswap V3, Merchant Moe LB), vaults, CDP
|
|
21
21
|
- **Lending** — rates, positions, supply, withdraw across all lending protocols
|
|
22
22
|
- **DEX** — add/remove liquidity with multicall optimization
|
|
23
|
-
- **LP Management** — discover
|
|
23
|
+
- **LP Management** — discover emission pools with APR/TVL/MOE-per-day, add, farm, claim, remove, autopilot
|
|
24
24
|
- **DEX Aggregator** — best-price swap via KyberSwap, OpenOcean, LiquidSwap
|
|
25
25
|
- **Bridge** — cross-chain token transfer via LI.FI, deBridge, CCTP
|
|
26
26
|
- **Portfolio** — aggregate positions across lending and LP
|
|
@@ -52,9 +52,9 @@ defi --json status
|
|
|
52
52
|
| Command | Description |
|
|
53
53
|
|---------|-------------|
|
|
54
54
|
| `defi` | Dashboard — multicall balances across all protocols |
|
|
55
|
-
| `defi yield` | Cross-chain lending APY comparison (
|
|
55
|
+
| `defi yield` | Cross-chain lending APY comparison (all chains, filter with `--chain`) |
|
|
56
56
|
| `defi swap` | DEX aggregator swap (KyberSwap, OpenOcean, LiquidSwap) |
|
|
57
|
-
| `defi lp discover` | Scan
|
|
57
|
+
| `defi lp discover` | Scan emission pools with APR, TVL, rewards data |
|
|
58
58
|
| `defi lp add` | Add liquidity to a pool |
|
|
59
59
|
| `defi lp farm` | Add liquidity and auto-stake for emissions |
|
|
60
60
|
| `defi lp claim` | Claim fee and emission rewards |
|
|
@@ -111,28 +111,28 @@ defi --json status
|
|
|
111
111
|
# Multicall balance dashboard
|
|
112
112
|
defi --json
|
|
113
113
|
|
|
114
|
-
# Protocol overview
|
|
114
|
+
# Protocol overview (all chains)
|
|
115
115
|
defi --json status
|
|
116
116
|
|
|
117
|
-
#
|
|
117
|
+
# Single chain
|
|
118
118
|
defi --json --chain mantle status
|
|
119
119
|
```
|
|
120
120
|
|
|
121
121
|
### Lending
|
|
122
122
|
|
|
123
123
|
```bash
|
|
124
|
-
# Cross-chain lending APY comparison (default
|
|
124
|
+
# Cross-chain lending APY comparison (scans all chains by default)
|
|
125
125
|
defi --json yield
|
|
126
126
|
defi --json --chain mantle yield --asset USDT
|
|
127
127
|
|
|
128
128
|
# Check user position
|
|
129
|
-
defi --json lending position --protocol hyperlend
|
|
129
|
+
defi --json --chain hyperevm lending position --protocol hyperlend
|
|
130
130
|
|
|
131
131
|
# Supply collateral (auto-approve included)
|
|
132
|
-
defi --json lending supply --protocol hyperlend --asset USDC --amount 1000000000 --broadcast
|
|
132
|
+
defi --json --chain hyperevm lending supply --protocol hyperlend --asset USDC --amount 1000000000 --broadcast
|
|
133
133
|
|
|
134
134
|
# Withdraw collateral
|
|
135
|
-
defi --json lending withdraw --protocol hyperlend --asset USDC --amount 500000000 --broadcast
|
|
135
|
+
defi --json --chain hyperevm lending withdraw --protocol hyperlend --asset USDC --amount 500000000 --broadcast
|
|
136
136
|
```
|
|
137
137
|
|
|
138
138
|
### DEX Aggregator Swap
|
|
@@ -141,13 +141,13 @@ Uses KyberSwap, OpenOcean, and LiquidSwap to find the best route automatically.
|
|
|
141
141
|
|
|
142
142
|
```bash
|
|
143
143
|
# Dry-run (default — no transaction)
|
|
144
|
-
defi --json swap --
|
|
144
|
+
defi --json --chain hyperevm swap --from WHYPE --to USDC --amount 1000000000000000000
|
|
145
145
|
|
|
146
146
|
# Execute swap
|
|
147
|
-
defi --json swap --
|
|
147
|
+
defi --json --chain hyperevm swap --from WHYPE --to USDC --amount 1000000000000000000 --broadcast
|
|
148
148
|
|
|
149
149
|
# With slippage (basis points)
|
|
150
|
-
defi --json swap --
|
|
150
|
+
defi --json --chain hyperevm swap --from WHYPE --to USDC --amount 1000000000000000000 --slippage 100 --broadcast
|
|
151
151
|
```
|
|
152
152
|
|
|
153
153
|
### LP Operations
|
|
@@ -155,41 +155,41 @@ defi --json swap --token-in WHYPE --token-out USDC --amount 1000000000000000000
|
|
|
155
155
|
#### Discover Pools
|
|
156
156
|
|
|
157
157
|
```bash
|
|
158
|
-
#
|
|
159
|
-
defi --json lp discover
|
|
158
|
+
# Discover emission pools with APR, TVL, rewards (requires --chain)
|
|
159
|
+
defi --json --chain hyperevm lp discover
|
|
160
160
|
|
|
161
|
-
#
|
|
162
|
-
defi --json lp discover
|
|
161
|
+
# Mantle LB pools with MOE/day, APR, pool TVL
|
|
162
|
+
defi --json --chain mantle lp discover
|
|
163
163
|
|
|
164
|
-
#
|
|
165
|
-
defi --json lp discover --
|
|
164
|
+
# Filter by protocol
|
|
165
|
+
defi --json --chain hyperevm lp discover --protocol kittenswap
|
|
166
166
|
```
|
|
167
167
|
|
|
168
168
|
#### Add Liquidity
|
|
169
169
|
|
|
170
170
|
```bash
|
|
171
|
-
defi --json lp add --protocol kittenswap --pool
|
|
171
|
+
defi --json --chain hyperevm lp add --protocol kittenswap --pool 0x... --amount-a 1000000000000000000 --amount-b 5000000000 --broadcast
|
|
172
172
|
```
|
|
173
173
|
|
|
174
174
|
#### Farm (Add + Auto-stake)
|
|
175
175
|
|
|
176
176
|
```bash
|
|
177
177
|
# Add liquidity and stake into gauge/farming in one step
|
|
178
|
-
defi --json lp farm --protocol kittenswap --pool
|
|
178
|
+
defi --json --chain hyperevm lp farm --protocol kittenswap --pool 0x... --amount-a 1000000000000000000 --amount-b 5000000000 --broadcast
|
|
179
179
|
```
|
|
180
180
|
|
|
181
181
|
#### Claim Rewards
|
|
182
182
|
|
|
183
183
|
```bash
|
|
184
184
|
# Claim fee and emission rewards from a pool
|
|
185
|
-
defi --json lp claim --protocol kittenswap --pool
|
|
185
|
+
defi --json --chain hyperevm lp claim --protocol kittenswap --pool 0x... --broadcast
|
|
186
186
|
```
|
|
187
187
|
|
|
188
188
|
#### Remove Liquidity
|
|
189
189
|
|
|
190
190
|
```bash
|
|
191
191
|
# Auto-unstake (if staked) and remove liquidity
|
|
192
|
-
defi --json lp remove --protocol kittenswap --pool
|
|
192
|
+
defi --json --chain hyperevm lp remove --protocol kittenswap --pool 0x... --broadcast
|
|
193
193
|
```
|
|
194
194
|
|
|
195
195
|
#### LP Autopilot
|
|
@@ -237,34 +237,33 @@ defi --json bridge --token USDC --amount 100000000 --to-chain arbitrum --provide
|
|
|
237
237
|
|
|
238
238
|
```bash
|
|
239
239
|
# Aggregate positions across all protocols
|
|
240
|
-
defi --json portfolio
|
|
240
|
+
defi --json --chain hyperevm portfolio show --address 0xYourAddress
|
|
241
241
|
```
|
|
242
242
|
|
|
243
243
|
### Token & Wallet
|
|
244
244
|
|
|
245
245
|
```bash
|
|
246
|
-
# Token operations
|
|
247
|
-
defi --json token balance --token USDC
|
|
248
|
-
defi --json token allowance --token USDC --spender 0x...
|
|
249
|
-
defi --json token approve --token USDC --spender 0x... --amount
|
|
250
|
-
defi --json token transfer --token USDC --to 0x... --amount 1000000 --broadcast
|
|
246
|
+
# Token operations (--chain required)
|
|
247
|
+
defi --json --chain hyperevm token balance --owner 0x... --token USDC
|
|
248
|
+
defi --json --chain hyperevm token allowance --owner 0x... --token USDC --spender 0x...
|
|
249
|
+
defi --json --chain hyperevm token approve --token USDC --spender 0x... --amount 1000000 --broadcast
|
|
250
|
+
defi --json --chain hyperevm token transfer --token USDC --to 0x... --amount 1000000 --broadcast
|
|
251
251
|
|
|
252
252
|
# Wallet management
|
|
253
|
-
defi --json wallet address
|
|
254
|
-
defi --json wallet balance
|
|
253
|
+
defi --json --chain hyperevm wallet balance --address 0x...
|
|
255
254
|
```
|
|
256
255
|
|
|
257
256
|
### Price & Market Data
|
|
258
257
|
|
|
259
258
|
```bash
|
|
260
|
-
# Oracle + DEX prices
|
|
261
|
-
defi --json price --asset WHYPE
|
|
259
|
+
# Oracle + DEX prices (--chain required)
|
|
260
|
+
defi --json --chain hyperevm price --asset WHYPE
|
|
262
261
|
|
|
263
262
|
# DEX prices only
|
|
264
|
-
defi --json price --asset WHYPE --source dex
|
|
263
|
+
defi --json --chain hyperevm price --asset WHYPE --source dex
|
|
265
264
|
|
|
266
265
|
# Oracle prices only
|
|
267
|
-
defi --json price --asset USDC --source oracle
|
|
266
|
+
defi --json --chain hyperevm price --asset USDC --source oracle
|
|
268
267
|
```
|
|
269
268
|
|
|
270
269
|
## Agent-First Design
|
|
@@ -286,10 +285,10 @@ defi --json --fields balance,positions status
|
|
|
286
285
|
defi --json --ndjson lp discover
|
|
287
286
|
|
|
288
287
|
# Pre-validate before executing
|
|
289
|
-
defi --json swap --
|
|
288
|
+
defi --json --chain hyperevm swap --from WHYPE --to USDC --amount 1000000000000000000
|
|
290
289
|
|
|
291
290
|
# Safe by default: --dry-run is on, use --broadcast to execute
|
|
292
|
-
defi --json swap --
|
|
291
|
+
defi --json --chain hyperevm swap --from WHYPE --to USDC --amount 1000000000000000000 --broadcast
|
|
293
292
|
```
|
|
294
293
|
|
|
295
294
|
Responses include `needs_approval` simulation status. Auto-approve flow: check allowance → exact approve → execute tx.
|
|
@@ -303,7 +302,7 @@ Errors include `retryable` flag — only retry when `true`.
|
|
|
303
302
|
--json # Output as JSON (structured for agents)
|
|
304
303
|
--ndjson # Output as newline-delimited JSON
|
|
305
304
|
--fields <f> # Select output fields (comma-separated)
|
|
306
|
-
--chain <chain> # Target chain: hyperevm (
|
|
305
|
+
--chain <chain> # Target chain: hyperevm or mantle (required for tx commands)
|
|
307
306
|
--dry-run # Dry-run mode (default, no broadcast)
|
|
308
307
|
--broadcast # Execute transaction on-chain
|
|
309
308
|
```
|
|
@@ -319,7 +318,7 @@ MANTLE_RPC_URL # Override Mantle RPC endpoint
|
|
|
319
318
|
|
|
320
319
|
## MCP Server
|
|
321
320
|
|
|
322
|
-
|
|
321
|
+
17 MCP tools for Claude Desktop, Cursor, and other MCP clients.
|
|
323
322
|
|
|
324
323
|
```json
|
|
325
324
|
{
|
|
@@ -332,7 +331,7 @@ MANTLE_RPC_URL # Override Mantle RPC endpoint
|
|
|
332
331
|
}
|
|
333
332
|
```
|
|
334
333
|
|
|
335
|
-
**Available tools:** `defi_status`, `defi_lending_rates`, `defi_lending_supply`, `defi_lending_withdraw`, `
|
|
334
|
+
**Available tools:** `defi_status`, `defi_yield`, `defi_lending_rates`, `defi_lending_supply`, `defi_lending_withdraw`, `defi_lp_discover`, `defi_lp_add`, `defi_lp_farm`, `defi_lp_claim`, `defi_lp_remove`, `defi_swap`, `defi_bridge`, `defi_price`, `defi_token_balance`, `defi_token_approve`, `defi_portfolio`, `defi_schema`
|
|
336
335
|
|
|
337
336
|
See `mcp-config.example.json` for full configuration.
|
|
338
337
|
|