@continuumdao/ctm-mpc-defi 0.2.25 → 0.2.26
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/dist/agent/catalog.cjs +400 -8
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.d.ts +266 -1
- package/dist/agent/catalog.js +387 -9
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/arcus/SKILL.md +4 -0
- package/dist/agent/skills/morpho/SKILL.md +39 -0
- package/dist/agent/skills/venice/SKILL.md +29 -0
- package/dist/protocols/evm/arcus/index.cjs +9 -2
- package/dist/protocols/evm/arcus/index.cjs.map +1 -1
- package/dist/protocols/evm/arcus/index.d.ts +3 -1
- package/dist/protocols/evm/arcus/index.js +9 -3
- package/dist/protocols/evm/arcus/index.js.map +1 -1
- package/dist/protocols/evm/morpho/index.cjs +76 -2
- package/dist/protocols/evm/morpho/index.cjs.map +1 -1
- package/dist/protocols/evm/morpho/index.d.ts +22 -1
- package/dist/protocols/evm/morpho/index.js +68 -3
- package/dist/protocols/evm/morpho/index.js.map +1 -1
- package/dist/protocols/evm/venice/index.cjs +936 -0
- package/dist/protocols/evm/venice/index.cjs.map +1 -0
- package/dist/protocols/evm/venice/index.d.ts +238 -0
- package/dist/protocols/evm/venice/index.js +901 -0
- package/dist/protocols/evm/venice/index.js.map +1 -0
- package/package.json +6 -1
|
@@ -31,6 +31,10 @@ Perp margin lives in Arcus collateral, not in the wallet alone. **Register the A
|
|
|
31
31
|
|
|
32
32
|
Withdraw: `ctm_arcus_build_withdraw_multisign` with `product: perp|spot` (EIP-712 → `POST /v1/withdraw`, async). Refresh with `ctm_arcus_fetch_account` afterward.
|
|
33
33
|
|
|
34
|
+
## USDG yield (Robinhood Earn — not Arcus)
|
|
35
|
+
|
|
36
|
+
**Arcus deposit does not earn yield** — it moves USDG into perp/spot trading collateral. For **Robinhood Earn** (~variable APY on USDG via Morpho on chain 4663), use **`load_defi_protocol morpho`** and `ctm_morpho_build_vault_deposit_multisign` with `robinhoodEarn: true` or fetch `query: "robinhood earn"`. See morpho SKILL § Robinhood Earn.
|
|
37
|
+
|
|
34
38
|
## Perp leverage
|
|
35
39
|
|
|
36
40
|
Leverage is **per market**, set on Arcus via `POST /v1/setLeverage` — not embedded in `placeOrder`.
|
|
@@ -23,6 +23,45 @@ Morpho integration: **listed earn vaults** (V1 + V2, unified), **Blue** variable
|
|
|
23
23
|
|
|
24
24
|
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).
|
|
25
25
|
|
|
26
|
+
## Robinhood Earn (USDG yield on chain 4663)
|
|
27
|
+
|
|
28
|
+
Robinhood Earn in the Robinhood app deposits USDG into the **same onchain Morpho vault** below. Use **Morpho multisign**, not Arcus deposit (Arcus `initiateDeposit` is trading collateral only).
|
|
29
|
+
|
|
30
|
+
| Field | Value |
|
|
31
|
+
|-------|-------|
|
|
32
|
+
| Chain | Robinhood Chain **4663** |
|
|
33
|
+
| Product alias | `robinhood earn`, `robinhoodEarn: true` |
|
|
34
|
+
| Vault | Steakhouse USDG (`steakUSDG`) |
|
|
35
|
+
| `vaultAddress` | `0xBeEff033F34C046626B8D0A041844C5d1A5409dd` |
|
|
36
|
+
| `underlyingAddress` (USDG) | `0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168` |
|
|
37
|
+
|
|
38
|
+
Yield is variable lending APY from Morpho borrower interest (not automatic on idle wallet USDG).
|
|
39
|
+
|
|
40
|
+
### Discover
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
ctm_morpho_fetch_earn_vaults({ chainId: 4663, query: "robinhood earn" })
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Aliases `robinhood earn`, `robinhood`, and `steakhouse usdg` resolve to the Steakhouse USDG vault on 4663.
|
|
47
|
+
|
|
48
|
+
### Deposit workflow (MPC multisign, no private key)
|
|
49
|
+
|
|
50
|
+
1. `load_defi_protocol morpho` → chain **4663** (same chain as Arcus custody).
|
|
51
|
+
2. `get_preferred_key_gen` → secp256k1 KeyGen with USDG on 4663.
|
|
52
|
+
3. Optional: `ctm_morpho_fetch_earn_vaults({ chainId: 4663, query: "robinhood earn" })` — confirm `netApy`.
|
|
53
|
+
4. `ctm_morpho_build_vault_deposit_multisign` — either pass fetch row addresses **or** shortcut:
|
|
54
|
+
```
|
|
55
|
+
{
|
|
56
|
+
keyGenId, chainId: 4663, robinhoodEarn: true,
|
|
57
|
+
amountHuman: "1000"
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
5. Submit/sign/broadcast multisign request as usual.
|
|
61
|
+
6. Withdraw (principal + accrued yield): `ctm_morpho_build_vault_withdraw_multisign` with same vault or `robinhoodEarn: true`.
|
|
62
|
+
|
|
63
|
+
Do **not** use `ctm_arcus_build_deposit_multisign` for yield — that funds perp/spot margin, not Morpho lending.
|
|
64
|
+
|
|
26
65
|
## MCP multisign tools
|
|
27
66
|
|
|
28
67
|
| Tool | Action |
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: venice
|
|
3
|
+
description: Venice VVV/sVVV/DIEM staking on Base and Venice model catalog reads.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Venice (MCP)
|
|
7
|
+
|
|
8
|
+
On-chain tools target **Base (chainId 8453)** only. Funding ladder: **VVV → stake → sVVV → mint DIEM → stake DIEM → API credits** (~$1/day per staked DIEM when linked to a Venice API key). USDC pay-per-request uses a separate future KeyGen x402 flow — not these tools.
|
|
9
|
+
|
|
10
|
+
## Read tools
|
|
11
|
+
|
|
12
|
+
- `ctm_venice_list_models` — Venice model catalog (`type` filter optional). Requires `VENICE_API_KEY` in Node → AI Agent → Variables (server injects — do not pass `apiKey`).
|
|
13
|
+
- `ctm_venice_read_staking_state` — wallet VVV/sVVV/DIEM balances, staked DIEM, cooldown fields.
|
|
14
|
+
- `ctm_venice_read_mint_diem_preview` — mint rate + expected DIEM out for an sVVV lock amount.
|
|
15
|
+
|
|
16
|
+
## Multisign build tools
|
|
17
|
+
|
|
18
|
+
Each returns `{ requestId }` on success (shared gas/submit section appended by the server):
|
|
19
|
+
|
|
20
|
+
- `ctm_venice_build_stake_vvv_multisign` — VVV approve + stake → sVVV
|
|
21
|
+
- `ctm_venice_build_initiate_unstake_svvv_multisign` — start sVVV unstake (7-day cooldown)
|
|
22
|
+
- `ctm_venice_build_complete_unstake_svvv_multisign` — claim VVV after cooldown
|
|
23
|
+
- `ctm_venice_build_mint_diem_multisign` — lock sVVV, mint DIEM
|
|
24
|
+
- `ctm_venice_build_burn_diem_multisign` — burn DIEM, unlock sVVV
|
|
25
|
+
- `ctm_venice_build_stake_diem_multisign` — stake DIEM for API credits
|
|
26
|
+
- `ctm_venice_build_initiate_unstake_diem_multisign` — start DIEM unstake (1-day cooldown)
|
|
27
|
+
- `ctm_venice_build_complete_unstake_diem_multisign` — claim DIEM after cooldown
|
|
28
|
+
|
|
29
|
+
Use `load_defi_protocol` / `get_defi_protocol_supported_tokens` for VVV and DIEM addresses on Base.
|
|
@@ -219,7 +219,7 @@ async function arcusFetchAccountLeverages(args) {
|
|
|
219
219
|
async function arcusFetchAllMids(args) {
|
|
220
220
|
const base = arcusPerpApiBaseUrl(args.chainId);
|
|
221
221
|
const data = await arcusJsonGet(`${base}/v1/mids`);
|
|
222
|
-
return data ?? {};
|
|
222
|
+
return data?.mids ?? {};
|
|
223
223
|
}
|
|
224
224
|
async function arcusFetchAccount(args) {
|
|
225
225
|
const base = arcusPerpApiBaseUrl(args.chainId);
|
|
@@ -368,6 +368,12 @@ function formatArcusLeverageLabel(leverage) {
|
|
|
368
368
|
if (leverage == null || !Number.isFinite(leverage) || leverage <= 0) return null;
|
|
369
369
|
return `${Math.round(leverage)}x cross`;
|
|
370
370
|
}
|
|
371
|
+
function arcusLookupMidFromMids(mids, market) {
|
|
372
|
+
const resolved = market.trim();
|
|
373
|
+
if (!resolved) return "";
|
|
374
|
+
const base = resolved.replace(/-USD$/i, "");
|
|
375
|
+
return mids[resolved] ?? mids[base] ?? mids[`${base}-USD`] ?? "";
|
|
376
|
+
}
|
|
371
377
|
function parseArcusLeverageLabel(label) {
|
|
372
378
|
const match = String(label ?? "").match(/(\d+(?:\.\d+)?)/);
|
|
373
379
|
if (!match) return null;
|
|
@@ -523,7 +529,7 @@ async function arcusFetchMarketSnapshotSummary(args) {
|
|
|
523
529
|
const rawMarket = (args.market ?? args.coin ?? "").trim();
|
|
524
530
|
const resolved = arcusResolvePerpMarketDisplayName(markets, rawMarket) ?? (rawMarket.includes("-") ? rawMarket : `${rawMarket.toUpperCase()}-USD`);
|
|
525
531
|
const mids = await arcusFetchAllMids({ chainId: args.chainId });
|
|
526
|
-
const mid = mids
|
|
532
|
+
const mid = arcusLookupMidFromMids(mids, resolved);
|
|
527
533
|
const ohlcv = await arcusFetchPerpOhlcvRange({
|
|
528
534
|
chainId: args.chainId,
|
|
529
535
|
market: resolved,
|
|
@@ -2000,6 +2006,7 @@ exports.arcusFetchSpotOhlcvRange = arcusFetchSpotOhlcvRange;
|
|
|
2000
2006
|
exports.arcusFetchSpotOverview = arcusFetchSpotOverview;
|
|
2001
2007
|
exports.arcusFetchSpotTokenCandles = arcusFetchSpotTokenCandles;
|
|
2002
2008
|
exports.arcusIsPerpMarketOnline = arcusIsPerpMarketOnline;
|
|
2009
|
+
exports.arcusLookupMidFromMids = arcusLookupMidFromMids;
|
|
2003
2010
|
exports.arcusMapOpenOrderDisplayRows = arcusMapOpenOrderDisplayRows;
|
|
2004
2011
|
exports.arcusMapPerpCandles = arcusMapPerpCandles;
|
|
2005
2012
|
exports.arcusMapPositionDisplayRows = arcusMapPositionDisplayRows;
|