@arcadia-finance/mcp-server 0.4.3 → 0.4.4
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/config/addresses.js +80 -29
- package/dist/prompts/workflows.js +1 -1
- package/dist/tools/read/account.js +1 -1
- package/dist/tools/write/asset-managers/compounder.js +1 -1
- package/dist/tools/write/asset-managers/cow-swapper.js +2 -1
- package/dist/tools/write/asset-managers/merkl-operator.js +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/skills/clamm-liquidity/SKILL.md +3 -3
- package/skills/openclaw/SKILL.md +1 -1
- package/skills/openclaw/contracts.md +1 -1
package/dist/config/addresses.js
CHANGED
|
@@ -62,29 +62,72 @@ export const TOKENS = {
|
|
|
62
62
|
WSTETH: { address: "0x1F32b1c2345538c0c6f582fCB022739c4A194Ebb", decimals: 18 },
|
|
63
63
|
},
|
|
64
64
|
};
|
|
65
|
-
//
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
65
|
+
// Rebalancers — V2.1.1 (current, unified rebalancer + profit taker), V2.1.0
|
|
66
|
+
// (split architecture, still active on Base + Unichain), V2.0.1 (legacy, Base).
|
|
67
|
+
const REBALANCERS_V2_1_1 = {
|
|
68
|
+
slipstreamV1: "0x5802454749cc0c4A6F28D5001B4cD84432e2b79F",
|
|
69
|
+
slipstreamV2: "0x953Ff365d0b562ceC658dc46B394E9282338d9Ea",
|
|
70
|
+
slipstreamV3: "0x37c6258aEe125d520B6f03fc2cb490955050D557",
|
|
71
|
+
uniV3: "0xbA1D0c99c261F94b9C8b52465890Cca27dd993Bd",
|
|
72
|
+
uniV4: "0x01EDaF0067a10D18c88D2876c0A85Ee0096a5Ac0",
|
|
73
|
+
};
|
|
74
|
+
const REBALANCERS_V2_1_0 = {
|
|
75
|
+
slipstreamV1: "0xE07A9383AF8E0B1320419dFeF205bb9bA75f3Ef2",
|
|
76
|
+
slipstreamV2: "0xc0dBb5443689E40E4b58b627F82f468Ef1Ad7561",
|
|
77
|
+
uniV3: "0xbb22cdbfFF5a263E85917803692db3630bF860c4",
|
|
78
|
+
uniV4: "0x9E466179c46eB098B564cbE319bA4b3EAd6476C1",
|
|
79
|
+
};
|
|
80
|
+
const REBALANCERS_V2_0_1 = {
|
|
81
|
+
slipstreamV1: "0xEfe600366e9847D405f2238cF9196E33780B3A42",
|
|
82
|
+
uniV3: "0xD8285fC23eFF687B8b618b78d85052f1eD17236E",
|
|
83
|
+
uniV4: "0xa8676C8c197E12a71AE82a08B02DD9e666312cF1",
|
|
84
|
+
};
|
|
85
|
+
const COMPOUNDERS_V2_1_1 = {
|
|
86
|
+
slipstreamV1: "0x467837f44A71e3eAB90AEcfC995c84DC6B3cfCF7",
|
|
87
|
+
slipstreamV2: "0x35e59448C7145482E56212510cC689612AB4F61f",
|
|
88
|
+
slipstreamV3: "0xd42A3Ac56456bD5422835B36C35Cacb6448ddCd9",
|
|
89
|
+
uniV3: "0x02e1fa043214E51eDf1F0478c6D0d3D5658a2DC3",
|
|
90
|
+
uniV4: "0xAA95c9c402b195D8690eCaea2341a76e3266B189",
|
|
91
|
+
};
|
|
92
|
+
const COMPOUNDERS_V2_0_1 = {
|
|
93
|
+
slipstreamV1: "0x4694c34d153EE777CC07d01AC433bcC010A20EBd",
|
|
94
|
+
uniV3: "0x80D3548bc54710d46201D554712E8638fD51326D",
|
|
95
|
+
uniV4: "0xCfF15E24a453aFAd454533E6D10889A84e2A68e1",
|
|
96
|
+
};
|
|
97
|
+
const YIELD_CLAIMERS_V2_1_1 = {
|
|
98
|
+
slipstreamV1: "0x5a8278D37b7a787574b6Aa7E18d8C02D994f18Ba",
|
|
99
|
+
slipstreamV2: "0xc8bF4B2c740FF665864E9494832520f18822871C",
|
|
100
|
+
slipstreamV3: "0x8c1Fbf38118fD5A704b6E7babcB7AF1a9A291980",
|
|
101
|
+
uniV3: "0x75Ed28EA8601Ce9F5FbcAB1c2428f04A57aFaA16",
|
|
102
|
+
uniV4: "0xD8aa21AB7f9B8601CB7d7A776D3AFA1602d5D8D4",
|
|
103
|
+
};
|
|
104
|
+
const YIELD_CLAIMERS_V2_0_1 = {
|
|
105
|
+
slipstreamV1: "0x1f75aBF8a24782053B351D9b4EA6d1236ED59105",
|
|
106
|
+
uniV3: "0x40462e71Effd9974Fee04B6b327B701D663f753e",
|
|
107
|
+
uniV4: "0x3BC2B398eEEE9807ff76fdb4E11526dE0Ee80cEa",
|
|
108
|
+
};
|
|
109
|
+
// Deployed versions per chain, newest first. The first entry is treated as
|
|
110
|
+
// the "current" version (used for new registrations). Older entries are
|
|
111
|
+
// probed in read.account.info so users registered on older versions are
|
|
112
|
+
// reported as active. See multichain-deploy-scripts Arcadia.sol for source.
|
|
113
|
+
const CHAIN_AM_VERSIONS = {
|
|
114
|
+
8453: {
|
|
115
|
+
rebalancers: [REBALANCERS_V2_1_1, REBALANCERS_V2_1_0, REBALANCERS_V2_0_1],
|
|
116
|
+
compounders: [COMPOUNDERS_V2_1_1, COMPOUNDERS_V2_0_1],
|
|
117
|
+
yieldClaimers: [YIELD_CLAIMERS_V2_1_1, YIELD_CLAIMERS_V2_0_1],
|
|
73
118
|
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
uniV3: "0x02e1fa043214E51eDf1F0478c6D0d3D5658a2DC3",
|
|
79
|
-
uniV4: "0xAA95c9c402b195D8690eCaea2341a76e3266B189",
|
|
119
|
+
130: {
|
|
120
|
+
rebalancers: [REBALANCERS_V2_1_1, REBALANCERS_V2_1_0],
|
|
121
|
+
compounders: [COMPOUNDERS_V2_1_1],
|
|
122
|
+
yieldClaimers: [YIELD_CLAIMERS_V2_1_1],
|
|
80
123
|
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
uniV3: "0x75Ed28EA8601Ce9F5FbcAB1c2428f04A57aFaA16",
|
|
86
|
-
uniV4: "0xD8aa21AB7f9B8601CB7d7A776D3AFA1602d5D8D4",
|
|
124
|
+
10: {
|
|
125
|
+
rebalancers: [REBALANCERS_V2_1_1],
|
|
126
|
+
compounders: [COMPOUNDERS_V2_1_1],
|
|
127
|
+
yieldClaimers: [YIELD_CLAIMERS_V2_1_1],
|
|
87
128
|
},
|
|
129
|
+
};
|
|
130
|
+
const STANDALONE_AM_ADDRESSES = {
|
|
88
131
|
merklOperator: "0x969F0251360b9Cf11c68f6Ce9587924c1B8b42C6",
|
|
89
132
|
gasRelayer: "0xD938C8d04cF91094fecAF0A2018EAac483a40137",
|
|
90
133
|
cowSwapper: "0xc928013A219EC9F18dE7B2dee6A50Ba626811854",
|
|
@@ -150,7 +193,12 @@ export function getAmProtocolAddress(chainId, category, protocol) {
|
|
|
150
193
|
.join(", ");
|
|
151
194
|
throw new Error(`${AM_KEY_TO_POOL_PROTOCOL[protocol]} is not available on ${CHAIN_NAMES[chainId]} (${chainId}). Available protocols: ${available}.`);
|
|
152
195
|
}
|
|
153
|
-
|
|
196
|
+
// Write tools always target the current (newest) version for that chain.
|
|
197
|
+
const current = CHAIN_AM_VERSIONS[chainId][category][0][protocol];
|
|
198
|
+
if (!current) {
|
|
199
|
+
throw new Error(`No ${category} address for ${AM_KEY_TO_POOL_PROTOCOL[protocol]} on ${CHAIN_NAMES[chainId]} (${chainId}).`);
|
|
200
|
+
}
|
|
201
|
+
return current;
|
|
154
202
|
}
|
|
155
203
|
const STANDALONE_TO_USER_FACING = {
|
|
156
204
|
merklOperator: "merkl_operator",
|
|
@@ -165,7 +213,7 @@ export function getStandaloneAmAddress(chainId, am) {
|
|
|
165
213
|
.join(", ");
|
|
166
214
|
throw new Error(`${STANDALONE_TO_USER_FACING[am]} is not available on ${CHAIN_NAMES[chainId]} (${chainId}). Supported chains: ${supportedChains}.`);
|
|
167
215
|
}
|
|
168
|
-
return
|
|
216
|
+
return STANDALONE_AM_ADDRESSES[am];
|
|
169
217
|
}
|
|
170
218
|
const CATEGORY_TO_GROUP = {
|
|
171
219
|
rebalancers: "rebalancer",
|
|
@@ -181,20 +229,23 @@ export function getChainAmChecks(chainId) {
|
|
|
181
229
|
const protocols = CHAIN_PROTOCOLS[chainId];
|
|
182
230
|
const standalone = CHAIN_STANDALONE_AMS[chainId];
|
|
183
231
|
const checks = [];
|
|
232
|
+
// Fan out across every deployed version so users registered on an older
|
|
233
|
+
// version (e.g. V2.1.0 on Base) are still reported as active.
|
|
184
234
|
for (const category of ["rebalancers", "compounders", "yieldClaimers"]) {
|
|
185
|
-
for (const
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
235
|
+
for (const versionMap of CHAIN_AM_VERSIONS[chainId][category]) {
|
|
236
|
+
for (const protocol of protocols) {
|
|
237
|
+
const address = versionMap[protocol];
|
|
238
|
+
if (!address)
|
|
239
|
+
continue;
|
|
240
|
+
checks.push({ group: CATEGORY_TO_GROUP[category], protocol, address });
|
|
241
|
+
}
|
|
191
242
|
}
|
|
192
243
|
}
|
|
193
244
|
for (const am of standalone) {
|
|
194
245
|
checks.push({
|
|
195
246
|
group: STANDALONE_TO_GROUP[am],
|
|
196
247
|
protocol: null,
|
|
197
|
-
address:
|
|
248
|
+
address: STANDALONE_AM_ADDRESSES[am],
|
|
198
249
|
});
|
|
199
250
|
}
|
|
200
251
|
return checks;
|
|
@@ -82,7 +82,7 @@ export function registerWorkflowPrompts(server) {
|
|
|
82
82
|
"",
|
|
83
83
|
"Steps:",
|
|
84
84
|
"1. Call read.account.info to check current positions and which asset managers are already enabled",
|
|
85
|
-
"2. Identify the LP protocol (Slipstream V1/V2
|
|
85
|
+
"2. Identify the LP protocol (Slipstream V1/V2/V3 or Uniswap V3/V4) from the position",
|
|
86
86
|
"3. Call read.asset_manager.intents to see available automations",
|
|
87
87
|
"4. For each automation to enable, call the matching write.asset_manager.* tool:",
|
|
88
88
|
" - Rebalancer: write.asset_manager.rebalancer (set dex_protocol, trigger ratios, compound_leftovers)",
|
|
@@ -62,7 +62,7 @@ export function registerAccountTools(server, api, chains) {
|
|
|
62
62
|
idempotentHint: true,
|
|
63
63
|
openWorldHint: true,
|
|
64
64
|
},
|
|
65
|
-
description: "Get full overview of an Arcadia account: health factor, collateral value, debt, deposited assets, liquidation price, and automation status. Health factor = 1 - (used_margin / liquidation_value): 1 = no debt (safest), >0 = healthy, 0 = liquidation threshold, <0 = past liquidation. Higher is safer. On
|
|
65
|
+
description: "Get full overview of an Arcadia account: health factor, collateral value, debt, deposited assets, liquidation price, and automation status. Health factor = 1 - (used_margin / liquidation_value): 1 = no debt (safest), >0 = healthy, 0 = liquidation threshold, <0 = past liquidation. Higher is safer. On all supported chains returns an `automation` object showing which asset managers are enabled (rebalancer, compounder, yield_claimer, merkl_operator, gas_relayer, cow_swapper). Automation detection spans every asset-manager version deployed on the selected chain, so registrations made on older versions are still reported as active; the returned value is the user-facing dex_protocol (e.g. 'slipstream') with no version suffix. LP positions in assets[] include a dex_protocol field (slipstream, slipstream_v2, slipstream_v3, staked_slipstream, staked_slipstream_v2, staked_slipstream_v3, uniV3, uniV4) — use this as the dex_protocol param for write.asset_manager.* tools. Slipstream V2 and V3 pools are Base-only; Unichain and Optimism support only Slipstream V1, uniV3, and uniV4. The automation object uses internal AM key names (slipstreamV1, slipstreamV2, slipstreamV3, uniV3, uniV4): map slipstreamV1 → 'slipstream'/'staked_slipstream', slipstreamV2 → 'slipstream_v2'/'staked_slipstream_v2', slipstreamV3 → 'slipstream_v3'/'staked_slipstream_v3', uniV3 → 'uniV3', uniV4 → 'uniV4'. Numeric fields without a _usd suffix are in the account's numeraire token raw units (divide by 10^decimals: 6 for USDC, 18 for WETH, 8 for cbBTC). Fields ending in _usd are in USD with 18 decimals (divide by 1e18). health_factor is unitless. Asset amounts are raw token units. To list all accounts for a wallet, use read.wallet.accounts.",
|
|
66
66
|
inputSchema: {
|
|
67
67
|
account_address: z.string().describe("Arcadia account address"),
|
|
68
68
|
chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION),
|
|
@@ -57,7 +57,7 @@ export function registerCompounderTools(server, _chains) {
|
|
|
57
57
|
idempotentHint: true,
|
|
58
58
|
openWorldHint: false,
|
|
59
59
|
},
|
|
60
|
-
description: "Encode args for compounder coupled with CowSwap for staked LP positions (e.g. staked Slipstream/Aerodrome). Staked positions earn staking emission rewards (e.g. AERO
|
|
60
|
+
description: "Encode args for compounder coupled with CowSwap for staked LP positions (e.g. staked Slipstream/Aerodrome). Staked positions earn staking emission rewards (e.g. AERO on Aerodrome) — not LP fees. Claims these staking rewards, swaps them to a target token via CowSwap batch auctions (MEV-protected), then compounds back into the LP position. Sets metadata on BOTH the CowSwapper and the Compounder in a single call. sell_tokens is the list of reward token addresses (e.g. [AERO_address]). buy_token should be a major token in the pair (USDC, WETH, cbBTC). Returns { asset_managers, statuses, datas } with 2 entries (cowswapper + compounder). Base only. Combinable with other intent tools.",
|
|
61
61
|
outputSchema: IntentOutput,
|
|
62
62
|
inputSchema: {
|
|
63
63
|
dex_protocol: DEX_PROTOCOL_SCHEMA,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { CHAIN_ID_DESCRIPTION } from "../../../config/chains.js";
|
|
2
3
|
import { getStandaloneAmAddress } from "../../../config/addresses.js";
|
|
3
4
|
import { validateChainId } from "../../../utils/validation.js";
|
|
4
5
|
import { encodeOuterMetadata, disabledIntent } from "./encoding.js";
|
|
@@ -17,7 +18,7 @@ export function registerCowSwapperTool(server, _chains) {
|
|
|
17
18
|
outputSchema: IntentOutput,
|
|
18
19
|
inputSchema: {
|
|
19
20
|
enabled: z.boolean().default(true).describe("True to enable, false to disable"),
|
|
20
|
-
chain_id: z.number().default(8453).describe(
|
|
21
|
+
chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION),
|
|
21
22
|
},
|
|
22
23
|
}, async (params) => {
|
|
23
24
|
try {
|
|
@@ -14,7 +14,7 @@ export function registerMerklOperatorTool(server, _chains) {
|
|
|
14
14
|
idempotentHint: true,
|
|
15
15
|
openWorldHint: false,
|
|
16
16
|
},
|
|
17
|
-
description: "Encode args for the Merkl operator automation. Claims external Merkl protocol incentive rewards into the account — additional rewards paid by token teams on top of regular LP fees. Enable when the pool has active Merkl campaigns (check APY breakdown in read.strategy.list). Always combine with rebalancer when both are relevant — no conflict, extra free yield. Returns { asset_managers, statuses, datas } — pass to write.account.set_asset_managers. Combinable with other intent tools.",
|
|
17
|
+
description: "Encode args for the Merkl operator automation. Claims external Merkl protocol incentive rewards into the account — additional rewards paid by token teams on top of regular LP fees. Enable when the pool has active Merkl campaigns (check APY breakdown in read.strategy.list). Always combine with rebalancer when both are relevant — no conflict, extra free yield. Available on all supported chains. Returns { asset_managers, statuses, datas } — pass to write.account.set_asset_managers. Combinable with other intent tools.",
|
|
18
18
|
outputSchema: IntentOutput,
|
|
19
19
|
inputSchema: {
|
|
20
20
|
reward_recipient: z.string().describe("Address to receive Merkl rewards"),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcadia-finance/mcp-server",
|
|
3
3
|
"mcpName": "io.github.arcadia-finance/mcp-server",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.4",
|
|
5
5
|
"description": "MCP server for Arcadia Finance. Deploy concentrated liquidity on Uniswap, Aerodrome, and Velodrome with automated rebalancing, compounding, yield optimization, and leverage, or single-sided liquidity into lending pools. Base, Unichain, and Optimism.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "AGPL-3.0",
|
package/server.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "io.github.arcadia-finance/mcp-server",
|
|
4
4
|
"title": "Arcadia Finance",
|
|
5
5
|
"description": "Concentrated liquidity on Uniswap/Aerodrome (rebalance, compound, leverage) or single-sided lending.",
|
|
6
|
-
"version": "0.4.
|
|
6
|
+
"version": "0.4.4",
|
|
7
7
|
"websiteUrl": "https://arcadia.finance",
|
|
8
8
|
"repository": {
|
|
9
9
|
"url": "https://github.com/arcadia-finance/mcp-server",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{
|
|
14
14
|
"registryType": "npm",
|
|
15
15
|
"identifier": "@arcadia-finance/mcp-server",
|
|
16
|
-
"version": "0.4.
|
|
16
|
+
"version": "0.4.4",
|
|
17
17
|
"transport": {
|
|
18
18
|
"type": "stdio"
|
|
19
19
|
},
|
|
@@ -134,9 +134,9 @@ Use as `pool_address` in `write.account.borrow` / `write.account.repay`, as `cre
|
|
|
134
134
|
| USDC | `0x3ec4a293Fb906DD2Cd440c20dECB250DeF141dF1` |
|
|
135
135
|
| cbBTC | `0xa37E9b4369dc20940009030BfbC2088F09645e3B` |
|
|
136
136
|
|
|
137
|
-
## Asset Manager Addresses
|
|
137
|
+
## Asset Manager Addresses
|
|
138
138
|
|
|
139
|
-
Addresses are auto-resolved by `write.asset_manager.*` intent tools based on `dex_protocol
|
|
139
|
+
Addresses are auto-resolved by `write.asset_manager.*` intent tools based on `dex_protocol`, targeting the latest deployed version on the selected chain. Listed here for reference. All require V3/V4 accounts. Older asset-manager versions remain on-chain for users who registered before the latest version shipped; `read.account.info` detects active registrations across every deployed version and reports the dex_protocol with no version suffix.
|
|
140
140
|
|
|
141
141
|
| Type | Protocol | Address |
|
|
142
142
|
| -------------- | ------------- | -------------------------------------------- |
|
|
@@ -159,7 +159,7 @@ Addresses are auto-resolved by `write.asset_manager.*` intent tools based on `de
|
|
|
159
159
|
| CoW Swapper | Base only | `0xc928013A219EC9F18dE7B2dee6A50Ba626811854` |
|
|
160
160
|
| Gas Relayer | All | `0xD938C8d04cF91094fecAF0A2018EAac483a40137` |
|
|
161
161
|
|
|
162
|
-
|
|
162
|
+
The addresses above are deployed deterministically and apply to every chain where the protocol exists. Slipstream V2 and V3 are not deployed on Unichain or Optimism, so only the Slipstream V1, Uniswap V3, and Uniswap V4 rows apply there. CoW Swapper is Base-only as noted in the table.
|
|
163
163
|
|
|
164
164
|
**Slipstream V1 vs V2 vs V3:** The pool determines the version — each pool is bound to a specific Slipstream version. `read.account.info` returns a `dex_protocol` field on LP positions (derived from the position manager address), so you can read the protocol directly from the account overview. Pass this value (`slipstream`, `slipstream_v2`, `slipstream_v3`, or their `staked_*` variants) as `dex_protocol` to `write.asset_manager.*` intent tools to auto-resolve the correct AM address.
|
|
165
165
|
|
package/skills/openclaw/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: arcadia-finance
|
|
3
|
-
version: 1.1.
|
|
3
|
+
version: 1.1.2
|
|
4
4
|
description: "DeFi liquidity management on Uniswap and Aerodrome, live on Base, Unichain, and Optimism. Deploy concentrated liquidity positions with automated rebalancing, compounding, yield optimization, and leverage, or provide single-sided liquidity to lending pools."
|
|
5
5
|
metadata:
|
|
6
6
|
openclaw:
|
|
@@ -47,4 +47,4 @@ Supported chains: Base (8453), Unichain (130), Optimism (10).
|
|
|
47
47
|
|
|
48
48
|
## Asset Managers
|
|
49
49
|
|
|
50
|
-
Rebalancers, compounders, and yield claimers are deployed per DEX protocol. Slipstream V3
|
|
50
|
+
Rebalancers, compounders, and yield claimers are deployed per DEX protocol and share the same address on every chain where the protocol exists. Slipstream V2 and V3 are Base-only; Unichain and Optimism support Slipstream V1, Uniswap V3, and Uniswap V4. CoW Swap is Base-only. Use `read.asset_manager.intents` to discover available automations and their addresses per chain.
|