@continuumdao/ctm-mpc-defi 0.2.34 → 0.2.35

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.
Files changed (83) hide show
  1. package/dist/agent/catalog.cjs +712 -44
  2. package/dist/agent/catalog.cjs.map +1 -1
  3. package/dist/agent/catalog.d.ts +1630 -244
  4. package/dist/agent/catalog.js +678 -45
  5. package/dist/agent/catalog.js.map +1 -1
  6. package/dist/agent/skills/aave-v4/SKILL.md +19 -4
  7. package/dist/agent/skills/aerodrome/SKILL.md +2 -2
  8. package/dist/agent/skills/compound-v3/SKILL.md +2 -2
  9. package/dist/agent/skills/curve-dao/SKILL.md +14 -0
  10. package/dist/agent/skills/ethena/SKILL.md +3 -1
  11. package/dist/agent/skills/euler-v2/SKILL.md +1 -1
  12. package/dist/agent/skills/gmx/SKILL.md +1 -1
  13. package/dist/agent/skills/hyperliquid/SKILL.md +7 -5
  14. package/dist/agent/skills/lido/SKILL.md +3 -0
  15. package/dist/agent/skills/maple-syrup/SKILL.md +35 -3
  16. package/dist/agent/skills/morpho/SKILL.md +1 -1
  17. package/dist/agent/skills/sky/SKILL.md +2 -0
  18. package/dist/agent/skills/yield-compare/SKILL.md +78 -0
  19. package/dist/index.cjs +129 -29
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.js +129 -27
  22. package/dist/index.js.map +1 -1
  23. package/dist/protocols/evm/aave-v4/index.cjs +170 -0
  24. package/dist/protocols/evm/aave-v4/index.cjs.map +1 -1
  25. package/dist/protocols/evm/aave-v4/index.d.ts +59 -1
  26. package/dist/protocols/evm/aave-v4/index.js +164 -1
  27. package/dist/protocols/evm/aave-v4/index.js.map +1 -1
  28. package/dist/protocols/evm/aerodrome/index.cjs +1308 -901
  29. package/dist/protocols/evm/aerodrome/index.cjs.map +1 -1
  30. package/dist/protocols/evm/aerodrome/index.d.ts +69 -2
  31. package/dist/protocols/evm/aerodrome/index.js +1217 -807
  32. package/dist/protocols/evm/aerodrome/index.js.map +1 -1
  33. package/dist/protocols/evm/compound-v3/index.cjs +82 -6
  34. package/dist/protocols/evm/compound-v3/index.cjs.map +1 -1
  35. package/dist/protocols/evm/compound-v3/index.d.ts +89 -1
  36. package/dist/protocols/evm/compound-v3/index.js +80 -7
  37. package/dist/protocols/evm/compound-v3/index.js.map +1 -1
  38. package/dist/protocols/evm/curve-dao/index.cjs +447 -18
  39. package/dist/protocols/evm/curve-dao/index.cjs.map +1 -1
  40. package/dist/protocols/evm/curve-dao/index.d.ts +108 -1
  41. package/dist/protocols/evm/curve-dao/index.js +440 -19
  42. package/dist/protocols/evm/curve-dao/index.js.map +1 -1
  43. package/dist/protocols/evm/ethena/index.cjs +89 -0
  44. package/dist/protocols/evm/ethena/index.cjs.map +1 -1
  45. package/dist/protocols/evm/ethena/index.d.ts +17 -1
  46. package/dist/protocols/evm/ethena/index.js +89 -2
  47. package/dist/protocols/evm/ethena/index.js.map +1 -1
  48. package/dist/protocols/evm/euler-v2/index.cjs +29 -0
  49. package/dist/protocols/evm/euler-v2/index.cjs.map +1 -1
  50. package/dist/protocols/evm/euler-v2/index.d.ts +21 -1
  51. package/dist/protocols/evm/euler-v2/index.js +29 -1
  52. package/dist/protocols/evm/euler-v2/index.js.map +1 -1
  53. package/dist/protocols/evm/gmx/index.cjs +83 -1
  54. package/dist/protocols/evm/gmx/index.cjs.map +1 -1
  55. package/dist/protocols/evm/gmx/index.d.ts +22 -2
  56. package/dist/protocols/evm/gmx/index.js +80 -2
  57. package/dist/protocols/evm/gmx/index.js.map +1 -1
  58. package/dist/protocols/evm/hyperliquid/index.cjs +67 -11
  59. package/dist/protocols/evm/hyperliquid/index.cjs.map +1 -1
  60. package/dist/protocols/evm/hyperliquid/index.d.ts +39 -2
  61. package/dist/protocols/evm/hyperliquid/index.js +64 -12
  62. package/dist/protocols/evm/hyperliquid/index.js.map +1 -1
  63. package/dist/protocols/evm/lido/index.cjs +13 -0
  64. package/dist/protocols/evm/lido/index.cjs.map +1 -1
  65. package/dist/protocols/evm/lido/index.d.ts +9 -1
  66. package/dist/protocols/evm/lido/index.js +13 -1
  67. package/dist/protocols/evm/lido/index.js.map +1 -1
  68. package/dist/protocols/evm/maple/index.cjs +129 -1
  69. package/dist/protocols/evm/maple/index.cjs.map +1 -1
  70. package/dist/protocols/evm/maple/index.d.ts +45 -1
  71. package/dist/protocols/evm/maple/index.js +124 -3
  72. package/dist/protocols/evm/maple/index.js.map +1 -1
  73. package/dist/protocols/evm/morpho/index.cjs +34 -7
  74. package/dist/protocols/evm/morpho/index.cjs.map +1 -1
  75. package/dist/protocols/evm/morpho/index.d.ts +23 -1
  76. package/dist/protocols/evm/morpho/index.js +34 -8
  77. package/dist/protocols/evm/morpho/index.js.map +1 -1
  78. package/dist/protocols/evm/sky/index.cjs +52 -0
  79. package/dist/protocols/evm/sky/index.cjs.map +1 -1
  80. package/dist/protocols/evm/sky/index.d.ts +16 -1
  81. package/dist/protocols/evm/sky/index.js +50 -1
  82. package/dist/protocols/evm/sky/index.js.map +1 -1
  83. package/package.json +1 -1
@@ -13,7 +13,7 @@ Aave v4 organizes liquidity into **hubs** (market segments) and **spokes** (on-c
13
13
  |---------|------------|---------------------|
14
14
  | **Hub** | Off-chain market segment (Core, Plus, Prime) | Maps to UI `marketId`: `main` → Plus, `core` → Core, `bluechip` → Prime |
15
15
  | **Spoke** | On-chain contract (`supply`, `withdraw`, `borrow`, `repay`) | **Do not guess.** The MCP server resolves spoke from the Aave v4 API using `chainId` + `underlying` + `marketId` |
16
- | **Reserve** | One asset in one hub (underlying + APY + spoke) | Use `get_defi_protocol_supported_tokens` for valid underlyings |
16
+ | **Reserve** | One asset in one hub (underlying + APY + spoke) | From `ctm_aave_v4_fetch_markets` do not web-search rates |
17
17
  | **Position** | User’s supplies/debt on a spoke | Withdraw/borrow/repay risk depends on health factor on that spoke |
18
18
 
19
19
  **Important:** The UI market (`main`) and the hub that lists an asset can differ. Example on Ethereum: WETH is in **Core**, not Plus, even when the user picks “main”. The server auto-picks the hub that actually lists the asset.
@@ -24,17 +24,22 @@ Aave v4 organizes liquidity into **hubs** (market segments) and **spokes** (on-c
24
24
  2. `get_defi_protocol_supported_chains` — intersect with `get_chain_registry` (node must have `rpcGateway` per chain)
25
25
  3. `get_defi_protocol_supported_tokens({ protocolId: "aave-v4", chainId })` — listed underlyings + `nativeWrapped`
26
26
  4. `get_token_registry` — map symbols (USDC, WETH, stETH) to addresses
27
+ 5. `ctm_aave_v4_fetch_markets` — live supply/borrow APY per reserve (not web search)
27
28
 
28
29
  ## Tool selection
29
30
 
31
+ Do **not** web-search Aave APRs, APYs, or reserves. Load the protocol and use the fetch tools below.
32
+
30
33
  | User intent | MCP tool |
31
34
  |-------------|----------|
35
+ | List reserves / lending APRs / compare rates | `ctm_aave_v4_fetch_markets` |
36
+ | One asset’s APY (optionally one hub) | `ctm_aave_v4_fetch_market` |
32
37
  | Supply / deposit (lend) | `ctm_aave_v4_build_deposit_multisign` |
33
38
  | Withdraw supplied balance | `ctm_aave_v4_build_withdraw_multisign` |
34
39
  | Borrow against collateral | `ctm_aave_v4_build_borrow_multisign` |
35
40
  | Repay debt | `ctm_aave_v4_build_repay_multisign` |
36
41
 
37
- ## Common inputs (all four tools)
42
+ ## Common write inputs
38
43
 
39
44
  | Field | Required | Notes |
40
45
  |-------|----------|-------|
@@ -75,11 +80,21 @@ Aave v4 organizes liquidity into **hubs** (market segments) and **spokes** (on-c
75
80
 
76
81
  ## Basic workflows (teach users)
77
82
 
83
+ ### Compare lending APRs (read-only)
84
+
85
+ Example: “How do Aave lending APRs compare to Compound on Ethereum?”
86
+
87
+ 1. `load_defi_protocol({ protocolId: "aave-v4" })` then `get_defi_protocol_skill`.
88
+ 2. `ctm_aave_v4_fetch_markets` with `chainId` 1. Optional `marketId` (`main` / `core` / `bluechip`) or `underlying` to filter.
89
+ 3. Each row is one live spoke on a hub (unused zero-liquidity listings omitted): `supplyApyPercent`, `borrowApyPercent`, `utilizationPercent`, `availableLiquidity`. The same asset can appear on more than one spoke.
90
+ 4. Aave reports **APY** (compounded). Compound v3 reports **APR** — say so when comparing.
91
+ 5. Copy `underlying` + `marketId` for a later deposit/borrow. Do not invent rates from the web.
92
+
78
93
  ### Lend only (supply)
79
94
 
80
95
  1. Confirm chain in registry and Aave-supported.
81
- 2. Resolve token address (registry or `get_defi_protocol_supported_tokens`).
82
- 3. `ctm_aave_v4_build_deposit_multisign` with `underlying`, `amountHuman`, `marketId` (default `main`).
96
+ 2. Resolve token address (`ctm_aave_v4_fetch_markets` or `get_defi_protocol_supported_tokens`).
97
+ 3. `ctm_aave_v4_build_deposit_multisign` with `underlying`, `amountHuman`, `marketId` from the fetch row.
83
98
  4. Complete sign lifecycle → `{ requestId }`.
84
99
 
85
100
  ### Borrow against collateral
@@ -11,7 +11,7 @@ Native ETH in the app and MCP is **`0x0000000000000000000000000000000000000000`*
11
11
 
12
12
  ## Quote first (Coinbase B20 / AAPLc)
13
13
 
14
- **Do not** dump listed tokens or `ctm_aerodrome_fetch_pools`. There is no Sugar token directory on MCP. Tickers resolve inside quote / discover.
14
+ **Do not** dump LpSugar or paginate factories. `ctm_aerodrome_fetch_pools` and `ctm_aerodrome_fetch_lp_yields` return **at most ~100 important pairs**. Optional `query` only shrinks that set. B20 stock LP yields are `ctm_aerodrome_fetch_stock_lp_yields` only. Tickers resolve inside quote / discover.
15
15
 
16
16
  For a price, **call `ctm_aerodrome_quote` immediately**:
17
17
 
@@ -47,7 +47,7 @@ Do not create the request until they confirm both.
47
47
 
48
48
  | Pack | Tools | Sign request? |
49
49
  |------|-------|----------------|
50
- | market-data | `ctm_aerodrome_discover_pools`, `ctm_aerodrome_quote`, `ctm_aerodrome_fetch_positions`, `ctm_aerodrome_fetch_pools` (Sugar dump avoid) | No |
50
+ | market-data | `ctm_aerodrome_discover_pools`, `ctm_aerodrome_quote`, `ctm_aerodrome_fetch_positions`, `ctm_aerodrome_fetch_pools` / `fetch_lp_yields` (~100 main pairs), `fetch_stock_lp_yields` (B20 only) | No |
51
51
  | swaps | `ctm_aerodrome_build_swap_multisign` | Yes |
52
52
  | lp | `quote_add_liquidity`, `quote_cl_deposit`, add/remove liquidity, CL mint/increase/decrease/burn, gauge stake/unstake | Quotes no; builds yes |
53
53
  | rewards | claim fees, CL collect, claim emissions | Yes |
@@ -27,12 +27,12 @@ Each Compound III market is an isolated **Comet**. You always call the **Comet p
27
27
 
28
28
  ## Tool selection
29
29
 
30
- Do **not** web-search Compound III markets, collaterals, or APRs. Load the protocol and use the fetch tools below.
30
+ Do **not** web-search Compound III markets, collaterals, or APRs. Load the protocol and use the fetch tools below. Each market row has **base** `supplyAprPercent` / `borrowAprPercent` plus optional `supplyRewardAprPercent` / `borrowRewardAprPercent` (COMP incentive; extra and variable; null if unpriced).
31
31
 
32
32
  | User intent | MCP tool |
33
33
  |-------------|----------|
34
34
  | List markets / what can I borrow against X | `ctm_compound_v3_fetch_markets` |
35
- | Market detail (CFs, prices, APR) | `ctm_compound_v3_fetch_market` |
35
+ | Market detail (CFs, prices, base APR + COMP incentive APR) | `ctm_compound_v3_fetch_market` |
36
36
  | Position + liquidation risk + claimable | `ctm_compound_v3_fetch_account` |
37
37
  | Supply collateral or base (earn / repay) | `ctm_compound_v3_build_supply_multisign` |
38
38
  | Withdraw or borrow base | `ctm_compound_v3_build_withdraw_multisign` |
@@ -18,6 +18,20 @@ Curve swaps on Continuum use **Curve Router NG** (`@curvefi/api`): the SDK loads
18
18
 
19
19
  There is no separate “hub” or “spoke” — routing is entirely determined by Curve’s pool connectivity on that chain.
20
20
 
21
+ ## Important pools and LP (not a factory dump)
22
+
23
+ Do **not** call `fetchAllCurvePools`, invent a “list all Curve pools” tool, or paginate factories. The only list tools are:
24
+
25
+ | Goal | Tool |
26
+ |------|------|
27
+ | ~100 TVL-ranked pools + APY/TVL | `ctm_curve_dao_fetch_important_pools` |
28
+ | Same set with `baseApy` / `gauge_crv_apy` | `ctm_curve_dao_fetch_lp_yields` |
29
+ | Quote add / remove LP | `ctm_curve_dao_quote_add_liquidity` / `_remove_liquidity` |
30
+ | Build add / remove | `ctm_curve_dao_build_add_liquidity_multisign` / `_remove_liquidity_multisign` |
31
+ | Gauge stake (needed for advertised `gauge_crv_apy`) | `ctm_curve_dao_build_gauge_deposit_multisign` (`withdraw: true` to unstake) |
32
+
33
+ Optional `query` / `pool` only **shrink** the ~100-row set. `gauge_crv_apy` requires staking the LP token in the gauge; otherwise quote fee APY only.
34
+
21
35
  ## Before any swap
22
36
 
23
37
  1. `load_defi_protocol({ protocolId: "curve-dao" })`
@@ -7,4 +7,6 @@ description: Ethena USDe stake, redeem, cooldown, and claim on Ethereum mainnet.
7
7
 
8
8
  Stake/redeem MCP tools target **mainnet (chainId 1)**. USDe/sUSDe are also listed on several L2s including **Robinhood Chain (4663)** for asset recognition/transfers — use `get_defi_protocol_supported_tokens` for addresses.
9
9
 
10
- Tools: `ctm_ethena_build_stake_multisign`, `_redeem_`, `_cooldown_`, `_claim_`. Each returns `{ requestId }` on success (shared gas/submit section appended by the server).
10
+ Do **not** web-search sUSDe APY. Use `ctm_ethena_fetch_susde_apy` (Ethena yield feed + vault share price). Unstake has a cooldown (`cooldownDurationSec`).
11
+
12
+ Tools: `ctm_ethena_fetch_susde_apy`, `ctm_ethena_build_stake_multisign`, `_redeem_`, `_cooldown_`, `_claim_`. Write tools return `{ requestId }` on success (shared gas/submit section appended by the server).
@@ -5,6 +5,6 @@ description: Euler v2 isolated lend/borrow, vault withdraw, and collateral opera
5
5
 
6
6
  # Euler v2 (MCP)
7
7
 
8
- Supported chains from `get_defi_protocol_supported_chains` (Euler V3 API, Goldsky `euler-simple-*` fallback). Underlyings from `get_defi_protocol_supported_tokens` (V3 EVK / Earn vaults) pass `address` as `underlyingAddress` to `ctm_euler_v2_fetch_lend_vaults`, then use the returned `evaultAddress` on build tools.
8
+ Supported chains from `get_defi_protocol_supported_chains` (Euler V3 API, Goldsky `euler-simple-*` fallback). Underlyings from `get_defi_protocol_supported_tokens` (V3 EVK / Earn vaults). Isolated lend: `ctm_euler_v2_fetch_lend_vaults`. Earn vaults (curated APY): `ctm_euler_v2_fetch_earn_vaults`. Do **not** web-search Euler APYs. Copy `evaultAddress` onto build tools.
9
9
 
10
10
  Tools include isolated lend/borrow, collateral deposit/withdraw, vault withdraw, borrow repay. All `ctm_euler_v2_build_*_multisign` tools return `{ requestId }` on success (shared gas/submit section appended by the server).
@@ -13,7 +13,7 @@ Perpetuals on Arbitrum (42161) and Avalanche (43114) via `@gmx-io/sdk` v2 **clas
13
13
 
14
14
  1. `load_defi_protocol({ protocolId: "gmx" })`
15
15
  2. `ctm_gmx_fetch_markets({ chainId })` — pick `symbol` e.g. `ETH/USD [WETH-USDC]`; each row includes `maxLeverageLabel`
16
- 3. `ctm_gmx_fetch_market_prices({ chainId, symbol, collateralSymbol })` — index/collateral USD mark
16
+ 3. `ctm_gmx_fetch_market_prices({ chainId, symbol, collateralSymbol })` — index/collateral USD mark plus official funding (`fundingFactorPerSecond`, `longsPayShorts`, hourly/APR labels; borrow-per-second is a cost caveat)
17
17
  4. `ctm_gmx_fetch_ohlcv({ chainId, symbol, timeframe: "15m" })` — tabular OHLCV candles (USD index); then **`continuum__prepare_chart_from_rows`** if the operator wants a chart
18
18
  5. `ctm_gmx_fetch_positions({ chainId, executorAddress })` — for close flows
19
19
  6. `get_multi_sign_gas_options({ chainId })` — confirm `useCustomGas` with the user
@@ -42,7 +42,7 @@ Positions and orders from MCP reflect **live HyperCore state** after prior txs a
42
42
  2. `get_defi_protocol_skill` — this file (+ shared gas/submit section appended)
43
43
  3. Confirm chain **999** or **998** in `get_chain_registry` with RPC
44
44
  4. `ctm_hyperliquid_search_markets({ chainId: 999, query: "AAPL" })` or `query: "Apple"` — resolves canonical `coin` (e.g. `xyz:AAPL`); use when user gives a ticker or company name
45
- 5. `ctm_hyperliquid_fetch_market_snapshot({ chainId, coin: "AAPL" })` — **`livePrice.midUsd`** is the current price; `latestCandle` is the most recent bar; `candles` is capped (default 48). Throws if live price cannot be fetched.
45
+ 5. `ctm_hyperliquid_fetch_market_snapshot({ chainId, coin: "AAPL" })` — **`livePrice.midUsd`** is the current price; **`funding`** is official hourly HyperCore funding; `latestCandle` is the most recent bar; `candles` is capped (default 48). Throws if live price cannot be fetched.
46
46
  6. `ctm_hyperliquid_fetch_open_context({ chainId, executorAddress, coin: "Apple" })` — same resolution
47
47
  7. `ctm_hyperliquid_fetch_usd_class_balances({ chainId, executorAddress })` — spot vs perp USD if needed
48
48
  8. **Gas** — `get_multi_sign_gas_options({ chainId })` + `useCustomGas` for **CoreWriter** tools only (plain limit, close, cancel, transfers, vault, stake). **Skip gas** for `build_update_leverage_multisign`, `build_bridge_withdraw_multisign`, and limit orders **with TP/SL triggers** (EIP-712 `/exchange`).
@@ -55,15 +55,17 @@ Positions and orders from MCP reflect **live HyperCore state** after prior txs a
55
55
 
56
56
  | User intent | MCP tool |
57
57
  |-------------|----------|
58
- | List all perp markets + HIP-3 dexes | `ctm_hyperliquid_fetch_markets` |
58
+ | List native crypto perp markets | `ctm_hyperliquid_fetch_markets` |
59
+ | List HIP-3 stock perps (AAPL, TSLA, …) | `ctm_hyperliquid_fetch_stock_markets` |
59
60
  | **Find market by ticker or name** (AAPL, Apple, BTC) | `ctm_hyperliquid_search_markets` |
60
- | **Live price** (mark/mid) + short recent bars | `ctm_hyperliquid_fetch_market_snapshot` — use **`snapshot.livePrice.midUsd`** |
61
+ | **Live price** (mark/mid) + hourly **funding** + short recent bars | `ctm_hyperliquid_fetch_market_snapshot` — use **`snapshot.livePrice.midUsd`** and **`snapshot.funding`** |
61
62
  | **OHLCV history** (e.g. 15m for last 7 days) | `ctm_hyperliquid_fetch_ohlcv` — then **`continuum__prepare_chart_from_rows`** if user wants a chart |
62
63
  | Account + capacity for one coin | `ctm_hyperliquid_fetch_open_context` |
63
64
  | Open positions | `ctm_hyperliquid_fetch_positions` |
64
65
  | Open orders | `ctm_hyperliquid_fetch_open_orders` |
65
66
  | Spot vs perp USDC | `ctm_hyperliquid_fetch_usd_class_balances` |
66
- | Vault catalog (+ APR) | `ctm_hyperliquid_fetch_vaults` |
67
+ | Vault catalog (+ APR, TVL-sorted) | `ctm_hyperliquid_fetch_vaults` |
68
+ | Vault APRs for yield compare (APR desc, HLP first) | `ctm_hyperliquid_fetch_vault_apys` |
67
69
  | User vault equity | `ctm_hyperliquid_fetch_user_vault_equities` |
68
70
  | HYPE stake summary | `ctm_hyperliquid_fetch_staking_summary` |
69
71
  | Validator delegations | `ctm_hyperliquid_fetch_delegations` |
@@ -289,7 +291,7 @@ Default overlays (EMA 50, RSI 14, volume pane) are applied inside `prepare_chart
289
291
 
290
292
  ## HIP-3 dexes
291
293
 
292
- HIP-3 builder perps (e.g. **XYZ** dex) are **not** in the default native meta alone. `fetch_markets` without `dex` returns **native + every listed HIP-3 dex** in one response.
294
+ HIP-3 builder perps (e.g. **XYZ** / `xyz:AAPL`) are **trading**, not a savings APR. `ctm_hyperliquid_fetch_markets` is **native crypto only**. Use `ctm_hyperliquid_fetch_stock_markets` for equities. `search_markets` still searches **both**. Idle USDC vault yield: `ctm_hyperliquid_fetch_vault_apys` (not HIP-3).
293
295
 
294
296
  - Coin names use `{dex}:{symbol}` — e.g. **`xyz:AAPL`**, not `xyzAAPL` or bare `AAPL` on the wire.
295
297
  - **`search_markets`** is the right tool when the user says a ticker or company name (`AAPL`, `Apple`, `Tesla`). It searches **all dexes** using Hyperliquid annotations (display names + keywords).
@@ -14,8 +14,11 @@ Use `get_defi_protocol_supported_chains` / `get_defi_protocol_supported_tokens`
14
14
 
15
15
  ## Tools
16
16
 
17
+ Do **not** web-search Lido staking APRs. Use `ctm_lido_fetch_steth_apr` (official Lido API, recent stETH APR).
18
+
17
19
  | Intent | Tool |
18
20
  |--------|------|
21
+ | stETH staking APR | `ctm_lido_fetch_steth_apr` |
19
22
  | Stake ETH | `ctm_lido_build_submit_multisign` |
20
23
  | Queue stETH withdrawal | `ctm_lido_build_request_withdrawals_multisign` |
21
24
  | Claim withdrawal | `ctm_lido_build_claim_withdrawal_multisign` |
@@ -1,10 +1,42 @@
1
1
  ---
2
2
  name: maple-syrup
3
- description: Maple Syrup pool deposit and redeem request flows.
3
+ description: Maple Syrup pool deposit and redeem live APY from fetch tools, then multisign.
4
4
  ---
5
5
 
6
6
  # Maple Syrup (MCP)
7
7
 
8
- Chains: mainnet and Sepolia. Pass `syrupRouter`, `pool`, and `asset` from Maple UI/GraphQL.
8
+ Syrup pools (syrupUSDC, syrupUSDT, syrupUSDG) on **Ethereum (1)** and Sepolia (11155111). Yield is **APY** from Maple GraphQL (`weeklyApy` / `monthlyApy`, formula `raw / 1e28`).
9
9
 
10
- Tools: `ctm_maple_build_deposit_multisign`, `ctm_maple_build_request_redeem_multisign`. Each returns `{ requestId }` on success (shared gas/submit section appended by the server).
10
+ ## Before any action
11
+
12
+ 1. `load_defi_protocol({ protocolId: "maple-syrup" })`
13
+ 2. `get_defi_protocol_skill({ protocolId: "maple-syrup" })`
14
+ 3. `get_defi_protocol_supported_chains` — intersect with `get_chain_registry` (`rpcGateway` required for writes)
15
+ 4. `ctm_maple_fetch_markets` — live APY + `pool` / `syrupRouter` / `asset` (not web search)
16
+
17
+ ## Tool selection
18
+
19
+ Do **not** web-search Maple APYs or pool addresses. Load the protocol and use the fetch tools below.
20
+
21
+ | User intent | MCP tool |
22
+ |-------------|----------|
23
+ | List Syrup pools / lending APYs | `ctm_maple_fetch_markets` |
24
+ | One pool (by `pool` or `underlying`) | `ctm_maple_fetch_market` |
25
+ | Deposit underlying | `ctm_maple_build_deposit_multisign` |
26
+ | Request redeem | `ctm_maple_build_request_redeem_multisign` |
27
+
28
+ ## Compare lending APYs (read-only)
29
+
30
+ 1. `load_defi_protocol({ protocolId: "maple-syrup" })` then `get_defi_protocol_skill`.
31
+ 2. `ctm_maple_fetch_markets` with `chainId` 1. Optional `underlying` to filter (e.g. USDC).
32
+ 3. Each row is one live Syrup pool: `weeklyApyPercent`, `monthlyApyPercent`, `totalAssets`.
33
+ 4. Unused zero-TVL listings are omitted. Maple reports **APY**.
34
+ 5. Copy `pool`, `syrupRouter`, and `asset` for a later deposit/redeem.
35
+
36
+ ## Write inputs
37
+
38
+ Deposit: `keyGenId`, `chainId`, `purposeText`, `syrupRouter`, `pool`, `asset`, `amountHuman` from the fetch row.
39
+
40
+ Redeem: `keyGenId`, `chainId`, `purposeText`, `pool`, `sharesHuman`, `receiver`.
41
+
42
+ Each build tool returns `{ requestId }` on success.
@@ -23,7 +23,7 @@ Morpho integration: **listed earn vaults** (V1 + V2, unified), **Blue** variable
23
23
  `underlying` accepts **symbol** (e.g. `USDC`, `WETH`) or **ERC-20 address**.
24
24
  `query` is **case-insensitive** on vault name, symbol, address, and underlying symbol.
25
25
 
26
- Use returned `vaultAddress` and `underlyingAddress` for deposit multisign. Each row includes `totalDepositsUsd`, `liquidityUsd`, `netApy` / `netApy7d` / `netApy30d` / `netApy90d`, `performanceFee`, and `exposure[]` (allocated markets/strategies with % of TVL).
26
+ Use returned `vaultAddress` and `underlyingAddress` for deposit multisign. Each row includes `totalDepositsUsd`, `liquidityUsd`, `netApy` / `netApy7d` / `netApy30d` / `netApy90d`, `performanceFee`, `rewards[]` (extra incentive APR from Morpho `allRewards`), and `exposure[]` (allocated markets/strategies with % of TVL). Blue rows also include `netSupplyApyLabel` and `rewards[]`. Incentive APR is extra and variable.
27
27
 
28
28
  ## Robinhood Earn (USDG yield on chain 4663)
29
29
 
@@ -7,4 +7,6 @@ description: Sky Lockstake and sUSDS deposit/redeem on Ethereum mainnet.
7
7
 
8
8
  Mainnet only. Tools for Lockstake stake/draw/wipe/close/reward and sUSDS deposit/redeem.
9
9
 
10
+ Do **not** web-search Sky Savings Rate. Use `ctm_sky_fetch_susds_rate` (on-chain `sUSDS.ssr()`). Then `ctm_sky_build_susds_deposit_multisign` to deposit USDS.
11
+
10
12
  Use `get_defi_protocol_supported_chains` and base registry for USDS/SKY addresses. All `ctm_sky_build_*_multisign` tools return `{ requestId }` on success (shared gas/submit section appended by the server).
@@ -0,0 +1,78 @@
1
+ ---
2
+ name: yield-compare
3
+ description: Route ETH and major stables to per-protocol MCP fetch tools. No mega-aggregator. Do not web-search rates.
4
+ ---
5
+
6
+ # Yield compare (routing skill)
7
+
8
+ There is **no** `ctm_defi_fetch_all_yields`. Call the **per-protocol fetch tools** below, then compare APR vs APY, lockups, and incentive extras yourself.
9
+
10
+ Do **not** web-search rates. Do **not** use DefiLlama. HIP-3 / Arcus stock trading is **not** idle-stable yield. Perp funding is optional carry — include it only when the operator asked about perps, funding, HL vaults, or GM pools.
11
+
12
+ ## Plan Mode
13
+
14
+ If the operator started **Best yield** / plan mode `yield`: this thread **authors the plan file**. Ask for the asset first. Then `get_defi_protocol_skill({ protocolId: "yield-compare" })` **once** and write workstreams — do **not** `load_defi_protocol`, search Continuum tools, or spawn specialists on the parent. Execute runs one specialist per listed protocol. Research-only — no `ctm_*_build_*_multisign`. Table categories: `idle` / `lp` / `vault` / `perp_funding`. GMX and Hyperliquid only if they asked. Catalog MCP is context only.
15
+
16
+ Each Execute protocol leaf must list `toolGroups: ["defi_discovery", "defi:<protocol>:market-data", "keygen", "keygen_messaging"]` (canonical ids: `aave-v4`, `compound-v3`, `euler-v2`, `morpho`, `maple-syrup`, `curve-dao`, `aerodrome`) and `budget: { maxRounds: 16, maxWallClockMs: 240000 }`. Slim leaves cannot search/activate packs — without `defi_discovery` they never see `load_defi_protocol` or official `ctm_*` fetch tools. Do **not** use `agent_bash` / `agent_read_file` / `agent_grep` on a yield leaf — call the official fetch (`ctm_aave_v4_fetch_markets`, `ctm_compound_v3_fetch_markets`, `ctm_aerodrome_fetch_lp_yields` on Base `8453`, …) then post `mpc-task-result`. Ticker filters (`underlying: "USDT"`) are valid on Aave/Maple/Morpho fetches — do not invent ERC-20 addresses. Aave v4 is Ethereum-first (`1`; also 10 / 43114). Maple is Ethereum (`1`). Aerodrome is Base (`8453`) only.
17
+
18
+ ## Units and caveats
19
+
20
+ - **APR vs APY** — say which. Aave/Morpho/Maple/Sky/Ethena are typically APY; Compound base is APR; GMX/Hyperliquid vaults publish APR.
21
+ - **Incentives** are extra and variable (Compound `supplyRewardAprPercent`, Morpho `rewards[]`).
22
+ - **Lockups** — Ethena sUSDe cooldown, Maple redeem, Lido withdrawal queue, Curve/Aerodrome gauge stake for advertised gauge APR.
23
+
24
+ ## Perp funding (carry — not idle)
25
+
26
+ Include **only if the operator asked** about perps, funding carry, Hyperliquid vaults, or GMX GM. Not required for idle USDC/USDT lending. Label `perp_funding`. Requires an open perp; the sign can flip.
27
+
28
+ - **Hyperliquid:** `ctm_hyperliquid_fetch_market_snapshot` — official hourly `funding`. HIP-3 funding only if they asked about stocks. Vaults: `ctm_hyperliquid_fetch_vault_apys`.
29
+ - **GMX:** `ctm_gmx_fetch_markets` then `ctm_gmx_fetch_market_prices` for funding; `ctm_gmx_fetch_gm_apy` for GM pools.
30
+ - Do **not** invent Arcus funding.
31
+
32
+ ## Asset → tools
33
+
34
+ Call `get_defi_protocol_skill({ protocolId: "yield-compare" })` for this map, then `load_defi_protocol` for each protocol you actually fetch. Ethereum unless noted.
35
+
36
+ ### ETH / WETH
37
+
38
+ 1. `ctm_lido_fetch_steth_apr` — stETH staking APR
39
+ 2. `ctm_aave_v4_fetch_markets` / `ctm_compound_v3_fetch_markets` / `ctm_euler_v2_fetch_lend_vaults` / `ctm_morpho_fetch_earn_vaults` (WETH)
40
+ 3. `ctm_gmx_fetch_gm_apy` — GM ETH-sided (Arbitrum) **only if they asked about GMX / GM / LP**
41
+ 4. `ctm_curve_dao_fetch_lp_yields` — ETH/stETH-style pools in the ~100 catalog
42
+ 5. `ctm_aerodrome_fetch_lp_yields` — WETH pairs on **Base**
43
+ 6. Perp funding / HL vaults — **only if they asked** (see Perp funding)
44
+
45
+ ### USDC / USDT
46
+
47
+ 1. Aave / Compound / Euler lend / Morpho earn / Maple (`ctm_maple_fetch_markets`)
48
+ 2. `ctm_aerodrome_fetch_lp_yields` (Base) and `ctm_curve_dao_fetch_lp_yields` if they want DEX LP
49
+ 3. `ctm_gmx_fetch_gm_apy` / `ctm_hyperliquid_fetch_vault_apys` / perp funding — **only if they asked** about GMX, HL vaults, or funding
50
+
51
+ ### USDS
52
+
53
+ 1. `ctm_sky_fetch_susds_rate` first
54
+ 2. Then lending markets that list USDS (Aave / Morpho / Euler)
55
+
56
+ ### USDe
57
+
58
+ 1. `ctm_ethena_fetch_susde_apy` first (cooldown on unstake)
59
+ 2. Then Morpho/Aave if listed
60
+
61
+ ### USDG (Robinhood 4663)
62
+
63
+ 1. `ctm_morpho_fetch_earn_vaults` with `query: "robinhood earn"` — **not** Arcus deposit (trading collateral, no yield)
64
+
65
+ ### DAI / crvUSD
66
+
67
+ Aave / Morpho / Euler / `ctm_curve_dao_fetch_lp_yields`
68
+
69
+ ## DEX / stocks
70
+
71
+ - Main-pair LP only: Aerodrome `fetch_lp_yields`, Curve `fetch_lp_yields` (~100 each).
72
+ - Stock LP: `ctm_aerodrome_fetch_stock_lp_yields` (B20) **only if the user asked about stocks**.
73
+ - Hyperliquid HIP-3: `ctm_hyperliquid_fetch_stock_markets` is **trading**, not idle savings. Include HIP-3 **funding** only if they asked about stocks.
74
+
75
+ ## Euler earn vs isolated lend
76
+
77
+ - Isolated lend: `ctm_euler_v2_fetch_lend_vaults`
78
+ - Curated earn vaults: `ctm_euler_v2_fetch_earn_vaults`
package/dist/index.cjs CHANGED
@@ -1,9 +1,112 @@
1
1
  'use strict';
2
2
 
3
- var continuumNodeSdk = require('@continuumdao/continuum-node-sdk');
4
3
  var viem = require('viem');
4
+ var continuumNodeSdk = require('@continuumdao/continuum-node-sdk');
5
5
 
6
- // src/core/index.ts
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __esm = (fn, res) => function __init() {
8
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
9
+ };
10
+
11
+ // src/core/expiry.ts
12
+ function defiMultisignExpiryUnixSeconds(protocolId, explicitExpiryDate) {
13
+ if (typeof explicitExpiryDate === "number" && Number.isFinite(explicitExpiryDate) && explicitExpiryDate > 0) {
14
+ return Math.floor(explicitExpiryDate);
15
+ }
16
+ if (protocolId && exports.DEFI_PROTOCOLS_WITH_30MIN_EXPIRY.has(protocolId)) {
17
+ return Math.floor(Date.now() / 1e3) + exports.DEFAULT_DEFI_MULTISIGN_EXPIRY_SECONDS;
18
+ }
19
+ return void 0;
20
+ }
21
+ exports.DEFAULT_DEFI_MULTISIGN_EXPIRY_SECONDS = void 0; exports.DEFI_PROTOCOLS_WITH_30MIN_EXPIRY = void 0;
22
+ var init_expiry = __esm({
23
+ "src/core/expiry.ts"() {
24
+ exports.DEFAULT_DEFI_MULTISIGN_EXPIRY_SECONDS = 30 * 60;
25
+ exports.DEFI_PROTOCOLS_WITH_30MIN_EXPIRY = /* @__PURE__ */ new Set([
26
+ "uniswap-v4",
27
+ "gmx",
28
+ "hyperliquid",
29
+ "arcus",
30
+ "curve-dao",
31
+ "aerodrome"
32
+ ]);
33
+ }
34
+ });
35
+ function isAerodromeChainSupported(chainId) {
36
+ const n = typeof chainId === "number" ? chainId : Number.parseInt(String(chainId), 10);
37
+ return n === AERODROME_CHAIN_ID;
38
+ }
39
+ var AERODROME_PROTOCOL_ID, AERODROME_CHAIN_ID, AERODROME_WETH_BASE, AERODROME_USDC_BASE;
40
+ var init_support = __esm({
41
+ "src/protocols/evm/aerodrome/support.ts"() {
42
+ AERODROME_PROTOCOL_ID = "aerodrome";
43
+ AERODROME_CHAIN_ID = 8453;
44
+ AERODROME_WETH_BASE = "0x4200000000000000000000000000000000000006";
45
+ AERODROME_USDC_BASE = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
46
+ }
47
+ });
48
+ var AERODROME_BASE_ADDRESSES_FALLBACK;
49
+ var init_addresses = __esm({
50
+ "src/protocols/evm/aerodrome/addresses.ts"() {
51
+ init_support();
52
+ AERODROME_BASE_ADDRESSES_FALLBACK = {
53
+ chainId: AERODROME_CHAIN_ID,
54
+ aero: "0x940181a94A35A4569E4529A3CDfB74e38FD98631",
55
+ router: "0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43",
56
+ poolFactory: "0x420DD381b31aEf6683db6B902084cB0FFECe40Da",
57
+ factoryRegistry: "0x5C3F18F06CC09CA1910767A34a20F771039E37C0",
58
+ voter: "0x16613524e02ad97eDfeF371bC883F2F5d6C480A5",
59
+ votingEscrow: "0xeBf418Fe2512e7E6bd9b87a8F0f294aCDC67e6B4",
60
+ rewardsDistributor: "0x227f65131A261548b057215bB1D5Ab2997964C7d",
61
+ mixedQuoter: "0x0A5aA5D3a4d28014f967Bf0f29EAA3FF9807D5c6",
62
+ /** MixedRouteQuoterV3 — v2 + all three CL factories (bitmask path encoding). */
63
+ mixedQuoterV3: "0xCd2A7D98e82D6107eac1828ce8DeAA6acB65b555",
64
+ nfpm: "0x827922686190790b37229fd06084350E74485b72",
65
+ /** Oldest Slipstream CL factory (Gauges V1). Path bit 1<<20. */
66
+ clFactory: "0x5e7BB104d84c7CB9B682AaC2F3d509f5F406809A",
67
+ /** Slipstream CL factory 2 (gauge caps). Raw tickSpacing in MixedQuoterV3. */
68
+ clFactory2: "0xaDe65c38CD4849aDBA595a4323a8C7DdfE89716a",
69
+ /** Newest Slipstream CL factory (Gauges V3) — Coinbase B20 stock pools. Path bit 1<<19. */
70
+ clFactory3: "0xf8f2eB4940CFE7d13603DDDD87f123820Fc061Ef",
71
+ universalRouter: "0x6Cb442acF35158D5eDa88fe602221b67B400Be3E",
72
+ swapRouter: "0xBE6D8f0d05cC4be24d5167a3eF062215bE6D18a5",
73
+ swapRouter2: "0xcbBb8035cAc7D4B3Ca7aBb74cF7BdF900215Ce0D",
74
+ swapRouter3: "0x698Cb2b6dd822994581fEa6eA4Fc755d1363A92F",
75
+ pricesOracle: "0xee717411f6E44F9feE011835C8E6FAaC5dEfF166",
76
+ slipstreamHelper: "0x0AD09A66af0154a84e86F761313d02d0abB6edd5",
77
+ lpSugar: "0x69dD9db6d8f8E7d83887A704f447b1a584b599A1",
78
+ sugarSlipstreamHelper: "0x9c62ab10577fB3C20A22E231b7703Ed6D456CC7a",
79
+ swapper: "0x91616a7B9CF6D23f8C17845581051EBdC4BcB916",
80
+ weth: AERODROME_WETH_BASE
81
+ };
82
+ }
83
+ });
84
+ var init_stockTokens = __esm({
85
+ "src/protocols/evm/aerodrome/stockTokens.ts"() {
86
+ }
87
+ });
88
+ var init_discover = __esm({
89
+ "src/protocols/evm/aerodrome/discover.ts"() {
90
+ }
91
+ });
92
+ var init_yields = __esm({
93
+ "src/protocols/evm/aerodrome/yields.ts"() {
94
+ init_addresses();
95
+ init_support();
96
+ new Set(
97
+ [
98
+ AERODROME_WETH_BASE,
99
+ AERODROME_USDC_BASE,
100
+ AERODROME_BASE_ADDRESSES_FALLBACK.aero,
101
+ "0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb",
102
+ "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2",
103
+ "0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34",
104
+ "0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22",
105
+ "0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452"
106
+ ].map((a) => a.toLowerCase())
107
+ );
108
+ }
109
+ });
7
110
 
8
111
  // src/core/purpose.ts
9
112
  function mergePurposeText(purposeText, purposeSuffix) {
@@ -298,25 +401,8 @@ function buildPayloadSignEd25519MultisignBody(args) {
298
401
  });
299
402
  }
300
403
 
301
- // src/core/expiry.ts
302
- var DEFAULT_DEFI_MULTISIGN_EXPIRY_SECONDS = 30 * 60;
303
- var DEFI_PROTOCOLS_WITH_30MIN_EXPIRY = /* @__PURE__ */ new Set([
304
- "uniswap-v4",
305
- "gmx",
306
- "hyperliquid",
307
- "arcus",
308
- "curve-dao",
309
- "aerodrome"
310
- ]);
311
- function defiMultisignExpiryUnixSeconds(protocolId, explicitExpiryDate) {
312
- if (typeof explicitExpiryDate === "number" && Number.isFinite(explicitExpiryDate) && explicitExpiryDate > 0) {
313
- return Math.floor(explicitExpiryDate);
314
- }
315
- if (protocolId && DEFI_PROTOCOLS_WITH_30MIN_EXPIRY.has(protocolId)) {
316
- return Math.floor(Date.now() / 1e3) + DEFAULT_DEFI_MULTISIGN_EXPIRY_SECONDS;
317
- }
318
- return void 0;
319
- }
404
+ // src/core/index.ts
405
+ init_expiry();
320
406
  function isEvmNativeToken(address) {
321
407
  try {
322
408
  return viem.getAddress(address) === viem.zeroAddress;
@@ -3430,6 +3516,22 @@ var curveDaoProtocolModule = {
3430
3516
  amountHuman: { type: "string", required: true, description: "Human-readable input amount" },
3431
3517
  slippagePercent: { type: "number", required: true, description: "Slippage percent (0\u2013100 exclusive)" }
3432
3518
  }
3519
+ },
3520
+ {
3521
+ id: "curve-dao.add-liquidity",
3522
+ protocolId: CURVE_DAO_PROTOCOL_ID,
3523
+ chainCategory: "evm",
3524
+ description: "Add liquidity to an important Curve pool (optional gauge stake)",
3525
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
3526
+ params: {}
3527
+ },
3528
+ {
3529
+ id: "curve-dao.remove-liquidity",
3530
+ protocolId: CURVE_DAO_PROTOCOL_ID,
3531
+ chainCategory: "evm",
3532
+ description: "Remove liquidity from an important Curve pool",
3533
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
3534
+ params: {}
3433
3535
  }
3434
3536
  ]
3435
3537
  };
@@ -3439,14 +3541,14 @@ var curveDao = {
3439
3541
  isChainSupported: isCurveApiChainSupported,
3440
3542
  loadSession: loadFullCurveSessionForRpc
3441
3543
  };
3442
- var AERODROME_PROTOCOL_ID = "aerodrome";
3443
- var AERODROME_CHAIN_ID = 8453;
3444
- function isAerodromeChainSupported(chainId) {
3445
- const n = typeof chainId === "number" ? chainId : Number.parseInt(String(chainId), 10);
3446
- return n === AERODROME_CHAIN_ID;
3447
- }
3448
3544
 
3449
3545
  // src/protocols/evm/aerodrome/index.ts
3546
+ init_support();
3547
+ init_support();
3548
+ init_addresses();
3549
+ init_stockTokens();
3550
+ init_discover();
3551
+ init_yields();
3450
3552
  var aerodromeProtocolModule = {
3451
3553
  id: AERODROME_PROTOCOL_ID,
3452
3554
  chainCategory: "evm",
@@ -3565,8 +3667,6 @@ Object.defineProperty(exports, "firstClientIdFromKeyGen", {
3565
3667
  get: function () { return continuumNodeSdk.getClientIdFromKeyGenResult; }
3566
3668
  });
3567
3669
  exports.COINGECKO_PLATFORM_BY_CHAIN_ID = COINGECKO_PLATFORM_BY_CHAIN_ID;
3568
- exports.DEFAULT_DEFI_MULTISIGN_EXPIRY_SECONDS = DEFAULT_DEFI_MULTISIGN_EXPIRY_SECONDS;
3569
- exports.DEFI_PROTOCOLS_WITH_30MIN_EXPIRY = DEFI_PROTOCOLS_WITH_30MIN_EXPIRY;
3570
3670
  exports.EIP712_SIGN_REQUEST_KIND = EIP712_SIGN_REQUEST_KIND;
3571
3671
  exports.NEAR_CHAIN_CATEGORY = NEAR_CHAIN_CATEGORY;
3572
3672
  exports.PAYLOAD_SIGN_ED25519_REQUEST_KIND = PAYLOAD_SIGN_ED25519_REQUEST_KIND;