@arcadia-finance/mcp-server 0.4.5 → 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 +5 -10
- package/dist/clients/api.js +23 -0
- package/dist/config/addresses.js +49 -188
- package/dist/index.js +4 -2
- package/dist/prompts/workflows.js +15 -13
- package/dist/resources/guides.js +1 -1
- package/dist/tools/dev/send.js +7 -5
- package/dist/tools/index.js +4 -14
- package/dist/tools/output-schemas.js +42 -6
- package/dist/tools/read/account.js +80 -42
- package/dist/tools/read/asset-managers.js +138 -113
- package/dist/tools/read/guides.js +3 -3
- package/dist/tools/write/asset-managers/automations.js +241 -0
- package/dist/tools/write/asset-managers/intents.js +247 -0
- package/dist/tools/write/asset-managers/shared.js +0 -26
- package/dist/utils/http-config.js +37 -0
- package/dist/utils/validation.js +16 -0
- package/llms-full.txt +39 -80
- package/llms.txt +9 -14
- package/package.json +1 -1
- package/server.json +2 -2
- package/skills/clamm-liquidity/SKILL.md +90 -69
- package/skills/clamm-liquidity/automation.md +153 -76
- package/skills/clamm-liquidity/selection.md +6 -5
- package/skills/clamm-liquidity/strategies.md +40 -34
- package/skills/openclaw/SKILL.md +3 -3
- package/skills/openclaw/contracts.md +29 -16
- package/dist/tools/write/asset-managers/compounder.js +0 -113
- package/dist/tools/write/asset-managers/cow-swapper.js +0 -50
- package/dist/tools/write/asset-managers/encoding.js +0 -162
- package/dist/tools/write/asset-managers/merkl-operator.js +0 -52
- package/dist/tools/write/asset-managers/rebalancer.js +0 -109
- package/dist/tools/write/asset-managers/set-asset-managers.js +0 -76
- package/dist/tools/write/asset-managers/yield-claimer.js +0 -117
package/llms-full.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
Arcadia lets users deploy concentrated liquidity positions with automated rebalancing, compounding, yield optimization, and leverage, or provide single-sided liquidity to lending pools to earn borrower interest. This MCP server exposes the full protocol as
|
|
7
|
+
Arcadia lets users deploy concentrated liquidity positions with automated rebalancing, compounding, yield optimization, and leverage, or provide single-sided liquidity to lending pools to earn borrower interest. This MCP server exposes the full protocol as 35 tools:
|
|
8
8
|
|
|
9
9
|
- **Account management**: health factor, collateral, debt, positions, PnL, history
|
|
10
10
|
- **Wallet**: ERC20 balances, allowances, owned accounts, points
|
|
@@ -24,7 +24,7 @@ npx -y @arcadia-finance/mcp-server
|
|
|
24
24
|
|
|
25
25
|
Or connect to the remote server: `https://mcp.arcadia.finance/mcp`
|
|
26
26
|
|
|
27
|
-
## Read Tools (
|
|
27
|
+
## Read Tools (18)
|
|
28
28
|
|
|
29
29
|
### read.account.info
|
|
30
30
|
|
|
@@ -153,10 +153,20 @@ Parameters:
|
|
|
153
153
|
|
|
154
154
|
### read.asset_manager.intents
|
|
155
155
|
|
|
156
|
-
List
|
|
156
|
+
List the automation intents Arcadia supports with the parameters each accepts. Pass `account_address` to also get live per-account availability, including the compatibility rule blocking anything unavailable.
|
|
157
157
|
|
|
158
158
|
Parameters:
|
|
159
|
-
- `
|
|
159
|
+
- `account_address` (string, optional): Include it to get live per-account availability
|
|
160
|
+
- `position_id` (number, optional): Scope availability to one LP position. Requires account_address
|
|
161
|
+
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
|
|
162
|
+
|
|
163
|
+
### read.asset_manager.current
|
|
164
|
+
|
|
165
|
+
Read which asset managers are enabled on an account, with their decoded on-chain configuration, the intents they map to, Merkl claim state, and any superseded managers that should be cleared.
|
|
166
|
+
|
|
167
|
+
Parameters:
|
|
168
|
+
- `account_address` (string, required): Arcadia account address
|
|
169
|
+
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
|
|
160
170
|
|
|
161
171
|
### read.guides
|
|
162
172
|
|
|
@@ -165,7 +175,7 @@ Get Arcadia workflow guides and reference documentation.
|
|
|
165
175
|
Parameters:
|
|
166
176
|
- `topic` (enum, optional): overview | automation | strategies | selection
|
|
167
177
|
|
|
168
|
-
## Write Tools (
|
|
178
|
+
## Write Tools (16)
|
|
169
179
|
|
|
170
180
|
All write tools return unsigned transactions as `{ to, data, value, chainId }`.
|
|
171
181
|
|
|
@@ -345,91 +355,40 @@ Parameters:
|
|
|
345
355
|
- `slippage` (number, default: 100): Basis points, 100 = 1%
|
|
346
356
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
|
|
347
357
|
|
|
348
|
-
### write.account.
|
|
349
|
-
|
|
350
|
-
Build an unsigned setAssetManagers transaction from encoded intent args.
|
|
351
|
-
|
|
352
|
-
Parameters:
|
|
353
|
-
- `account_address` (string, required): Arcadia account address
|
|
354
|
-
- `asset_managers` (string[], required): Asset manager addresses from intent tools
|
|
355
|
-
- `statuses` (boolean[], required): Enable/disable flags from intent tools
|
|
356
|
-
- `datas` (string[], required): Encoded callback data from intent tools (hex)
|
|
357
|
-
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
|
|
358
|
-
|
|
359
|
-
### write.asset_manager.rebalancer
|
|
360
|
-
|
|
361
|
-
Encode args for the rebalancer automation.
|
|
362
|
-
|
|
363
|
-
Parameters:
|
|
364
|
-
- `dex_protocol` (enum, required): slipstream | slipstream_v2 | staked_slipstream | staked_slipstream_v2 | uniV3 | uniV4
|
|
365
|
-
- `enabled` (boolean, default: true): Enable or disable
|
|
366
|
-
- `compound_leftovers` (enum, default: "all"): all | none | token0 | token1
|
|
367
|
-
- `optimal_token0_ratio` (number, default: 500000): Target token0 ratio scaled by 1e6 (500000 = 50%)
|
|
368
|
-
- `trigger_lower_ratio` (number, default: 0): Offset from tick_lower, fraction of tick range, scaled by 1e6
|
|
369
|
-
- `trigger_upper_ratio` (number, default: 0): Offset from tick_upper, fraction of tick range, scaled by 1e6
|
|
370
|
-
- `min_rebalance_time` (number, default: 3600): Min seconds between rebalances
|
|
371
|
-
- `max_rebalance_time` (number, default: 1e12): Max seconds before forced rebalance
|
|
372
|
-
- `strategy_hook` (string, optional): Custom strategy hook address
|
|
373
|
-
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
|
|
374
|
-
|
|
375
|
-
### write.asset_manager.compounder
|
|
376
|
-
|
|
377
|
-
Encode args for the standalone compounder automation.
|
|
378
|
-
|
|
379
|
-
Parameters:
|
|
380
|
-
- `dex_protocol` (enum, required): slipstream | slipstream_v2 | staked_slipstream | staked_slipstream_v2 | uniV3 | uniV4
|
|
381
|
-
- `enabled` (boolean, default: true): Enable or disable
|
|
382
|
-
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
|
|
383
|
-
|
|
384
|
-
### write.asset_manager.compounder_staked
|
|
385
|
-
|
|
386
|
-
Encode args for compounder + CowSwap for staked LP positions.
|
|
358
|
+
### write.account.automations
|
|
387
359
|
|
|
388
|
-
|
|
389
|
-
- `dex_protocol` (enum, required): slipstream | slipstream_v2 | staked_slipstream | staked_slipstream_v2 | uniV3 | uniV4
|
|
390
|
-
- `sell_tokens` (string[], required): Token addresses to sell via CowSwap
|
|
391
|
-
- `buy_token` (string, required): Token address to buy (USDC, WETH, cbBTC)
|
|
392
|
-
- `enabled` (boolean, default: true): Enable or disable
|
|
393
|
-
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
|
|
360
|
+
Configure an account's automations from a list of intents and return the unsigned setAssetManagers transaction. The backend resolves which asset managers each intent needs, validates the combination, encodes the metadata and builds the calldata, so you describe the desired outcome rather than the contracts.
|
|
394
361
|
|
|
395
|
-
|
|
362
|
+
In save mode the `intents` array is the complete desired state: any automation left out is disabled by the returned transaction, and a single intent with `enabled: false` disables everything. When a compatibility rule fires the tool returns an error with the rule name and reason, and no transaction. There is also deliberately no transaction when the account already matches the request (`no_changes_needed`), when the Tenderly simulation predicts a revert (an error), or in preview mode (`preview_only`).
|
|
396
363
|
|
|
397
|
-
|
|
364
|
+
Intent kinds:
|
|
365
|
+
- `compound_fees`: reinvest earned fees/rewards into the LP. Optional `tokens` (token0|token1|reward) scopes it per token
|
|
366
|
+
- `claim_rewards`: claim yield out. `config.mode` as_earned or convert_to, `config.destination` account or wallet, `config.buy_token`, `config.recipient`, `config.tokens`, `config.convert_tokens`
|
|
367
|
+
- `add_to_lp`: fold idle pool-token balances into the LP. Optional `tokens` (token0|token1), opt-in per token
|
|
368
|
+
- `claim_merkl`: auto-claim Merkl incentive rewards. `config.destination`, `config.reward_recipient`. Needs no position context
|
|
369
|
+
- `rebalance`: reposition the LP. `strategy.kind` out_of_range (default), take_profit, or protocol_owned_liquidity, plus optional `max_tolerance` / `min_liquidity_ratio` (1e18-scaled)
|
|
398
370
|
|
|
399
371
|
Parameters:
|
|
400
|
-
- `
|
|
401
|
-
- `
|
|
402
|
-
- `
|
|
403
|
-
- `
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
Parameters:
|
|
410
|
-
- `dex_protocol` (enum, required): slipstream | slipstream_v2 | staked_slipstream | staked_slipstream_v2 | uniV3 | uniV4
|
|
411
|
-
- `sell_tokens` (string[], required): Token addresses to sell
|
|
412
|
-
- `buy_token` (string, required): Token address to receive after swap
|
|
413
|
-
- `fee_recipient` (string, required): Address to receive claimed fees
|
|
414
|
-
- `enabled` (boolean, default: true): Enable or disable
|
|
372
|
+
- `account_address` (string, required): Arcadia account address
|
|
373
|
+
- `intents` (object[], required): Complete desired automation state, at least one intent
|
|
374
|
+
- `mode` (enum, default: "save"): save diffs against on-chain state and returns a signable transaction that also disables anything omitted; preview resolves and validates only, returning a plan and no transaction
|
|
375
|
+
- `position_id` (number, optional): LP position id. Supply it and the backend fetches protocol, staked flag, tokens and reward tokens
|
|
376
|
+
- `protocol` (enum, optional): Only needed without position_id. Accepts slipstream_v1 | slipstream_v2 | slipstream_v3 | uniswap_v3 | uniswap_v4, or the dex_protocol spellings (slipstream, staked_slipstream_v3, uniV3, ...) which imply is_staked
|
|
377
|
+
- `is_staked` (boolean, optional): Whether the LP position is staked
|
|
378
|
+
- `token0` / `token1` (string, optional): Pool token addresses
|
|
379
|
+
- `reward_tokens` (string[], optional): Staking reward token addresses
|
|
380
|
+
- `owner` (string, optional): Account owner EOA, used to resolve wallet payout targets
|
|
415
381
|
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
|
|
416
382
|
|
|
417
|
-
### write.
|
|
383
|
+
### write.account.automations_delta
|
|
418
384
|
|
|
419
|
-
|
|
385
|
+
Apply an explicit change to an account's automations and return the unsigned setAssetManagers transaction. A delta, not a full desired state: automations not mentioned are left untouched. Superseded managers still set on the account are force-disabled regardless.
|
|
420
386
|
|
|
421
387
|
Parameters:
|
|
422
|
-
- `
|
|
423
|
-
- `
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
Encode args for the Merkl operator automation.
|
|
428
|
-
|
|
429
|
-
Parameters:
|
|
430
|
-
- `reward_recipient` (string, required): Address to receive Merkl rewards
|
|
431
|
-
- `enabled` (boolean, default: true): Enable or disable
|
|
432
|
-
- `chain_id` (number, default: 8453): Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)
|
|
388
|
+
- `account_address` (string, required): Arcadia account address
|
|
389
|
+
- `enable` (object[], default: []): Intents to switch on, same shapes as write.account.automations
|
|
390
|
+
- `disable` (string[], default: []): Asset-manager addresses to switch off, as returned by read.asset_manager.current
|
|
391
|
+
- position context params and `chain_id`: same as write.account.automations
|
|
433
392
|
|
|
434
393
|
## Dev Tools (1)
|
|
435
394
|
|
package/llms.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
Arcadia lets users deploy concentrated liquidity positions with automated rebalancing, compounding, yield optimization, and leverage, or provide single-sided liquidity to lending pools to earn borrower interest. This MCP server exposes the full protocol as
|
|
7
|
+
Arcadia lets users deploy concentrated liquidity positions with automated rebalancing, compounding, yield optimization, and leverage, or provide single-sided liquidity to lending pools to earn borrower interest. This MCP server exposes the full protocol as 35 tools:
|
|
8
8
|
|
|
9
9
|
- **Account management**: health factor, collateral, debt, positions, PnL, history
|
|
10
10
|
- **Wallet**: ERC20 balances, allowances, owned accounts, points
|
|
@@ -12,7 +12,7 @@ Arcadia lets users deploy concentrated liquidity positions with automated rebala
|
|
|
12
12
|
- **Single-sided liquidity**: deposit a single asset into a lending pool (ERC-4626 tranche) to earn borrower interest
|
|
13
13
|
- **LP strategies**: concentrated liquidity strategies with APY per range width, recommendations
|
|
14
14
|
- **Transaction building**: unsigned calldata for deposits, borrows, swaps, LP minting/closing, staking
|
|
15
|
-
- **Automation**: configure
|
|
15
|
+
- **Automation**: configure automations from intents (compound fees, claim rewards, add to LP, rebalance, claim Merkl); the backend resolves the asset managers and returns the calldata
|
|
16
16
|
|
|
17
17
|
All write tools return unsigned transactions (`{ to, data, value, chainId }`). Signing is the client's responsibility.
|
|
18
18
|
|
|
@@ -24,9 +24,9 @@ npx -y @arcadia-finance/mcp-server
|
|
|
24
24
|
|
|
25
25
|
Or connect to the remote server: `https://mcp.arcadia.finance/mcp`
|
|
26
26
|
|
|
27
|
-
## Tools (
|
|
27
|
+
## Tools (35 total)
|
|
28
28
|
|
|
29
|
-
### Read (
|
|
29
|
+
### Read (18)
|
|
30
30
|
|
|
31
31
|
- read.account.info: account overview with health factor, collateral, debt, positions, liquidation price, automation status
|
|
32
32
|
- read.account.history: historical account value over time
|
|
@@ -44,9 +44,10 @@ Or connect to the remote server: `https://mcp.arcadia.finance/mcp`
|
|
|
44
44
|
- read.strategy.info: full detail for a specific LP strategy
|
|
45
45
|
- read.strategy.recommendation: rebalancing recommendation for an account
|
|
46
46
|
- read.guides: reference guides for automation, strategies, addresses
|
|
47
|
-
- read.asset_manager.intents:
|
|
47
|
+
- read.asset_manager.intents: automation intents and their params; pass account_address for live per-account availability
|
|
48
|
+
- read.asset_manager.current: automations enabled on an account, with decoded per-manager config, mapped intents, Merkl state, and superseded managers
|
|
48
49
|
|
|
49
|
-
### Write (
|
|
50
|
+
### Write (16)
|
|
50
51
|
|
|
51
52
|
- write.wallet.approve: approve ERC20/ERC721 for spending
|
|
52
53
|
- write.pool.deposit: deposit the pool's underlying asset into an ERC-4626 tranche to earn lender yield
|
|
@@ -62,14 +63,8 @@ Or connect to the remote server: `https://mcp.arcadia.finance/mcp`
|
|
|
62
63
|
- write.account.deleverage: repay debt by selling collateral
|
|
63
64
|
- write.account.close: atomic close that burns LP, swaps, and repays in one tx
|
|
64
65
|
- write.account.stake: stake, unstake, or claim LP rewards
|
|
65
|
-
- write.account.
|
|
66
|
-
- write.
|
|
67
|
-
- write.asset_manager.compounder: encode standalone compounder args
|
|
68
|
-
- write.asset_manager.compounder_staked: encode compounder + CowSwap for staked positions
|
|
69
|
-
- write.asset_manager.yield_claimer: encode yield claimer args
|
|
70
|
-
- write.asset_manager.yield_claimer_cowswap: encode yield claimer + CowSwap args
|
|
71
|
-
- write.asset_manager.cow_swapper: encode direct CowSwap mode args
|
|
72
|
-
- write.asset_manager.merkl_operator: encode Merkl reward claimer args
|
|
66
|
+
- write.account.automations: configure automations from an intents array (complete desired state), returns the unsigned setAssetManagers tx
|
|
67
|
+
- write.account.automations_delta: switch individual automations on or off, leaving the rest untouched
|
|
73
68
|
|
|
74
69
|
### Dev (1)
|
|
75
70
|
|
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
|
+
"version": "0.5.0",
|
|
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.
|
|
6
|
+
"version": "0.5.0",
|
|
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.
|
|
16
|
+
"version": "0.5.0",
|
|
17
17
|
"transport": {
|
|
18
18
|
"type": "stdio"
|
|
19
19
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: clamm-liquidity
|
|
3
|
-
description: Agent guide for clAMM management on Arcadia Finance. Covers
|
|
3
|
+
description: Agent guide for clAMM management on Arcadia Finance. Covers 34 MCP tools (+1 dev), intent-based automation setup (compound fees, claim rewards, add to LP, rebalance, claim Merkl), single-sided liquidity via ERC-4626 tranches, strategy selection framework, and strategy templates including delta neutral leveraged LP and protocol-owned liquidity.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -14,6 +14,8 @@ Arcadia is a platform for managing concentrated liquidity positions with automat
|
|
|
14
14
|
- **Automation strategy config** (tick range, rebalance thresholds) is not currently settable via MCP — this requires Arcadia platform access.
|
|
15
15
|
- **Health factor** = `1 - (used_margin / liquidation_value)`. Higher is safer. `1` = no debt, `>0` = healthy, `0` = liquidation threshold, `<0` = past liquidation. Keep above 0.5 for leveraged positions; act immediately below 0.2.
|
|
16
16
|
- **Minimum margin** — each lending pool enforces a fixed minimum margin denominated in the pool's numeraire (e.g. WETH for the WETH pool, USDC for the USDC pool), typically a few dollars in value. This gets **added to the debt** when computing `used_margin` (i.e. `used_margin = open_debt + minimum_margin`). It ensures liquidations remain profitable (covering gas costs) and prevents dust attacks. For small positions the fixed minimum margin dominates the used margin, pushing health factor lower than the leverage ratio alone would suggest (e.g. HF ~0.3 at 2× leverage). Increase position size for a healthier starting HF. `write.account.add_liquidity` also validates deposits against per-asset minimum amounts from strategy risk factors.
|
|
17
|
+
- **`asset_id`** is always an integer (NFT token ID for LP positions, 0 for ERC20 tokens).
|
|
18
|
+
- **Wrapping ETH** — ETH must be wrapped to WETH before depositing. Call WETH's `deposit()` function (payable) with the ETH amount. No MCP tool for this, use your wallet.
|
|
17
19
|
|
|
18
20
|
## Transaction Signing
|
|
19
21
|
|
|
@@ -45,7 +47,7 @@ Arcadia's flash-action tools can batch multiple DeFi operations into a single at
|
|
|
45
47
|
|
|
46
48
|
**Batched write tools (`write.account.add_liquidity`, `write.account.close`, `write.account.deleverage`, `write.account.swap`, `write.account.remove_liquidity`, `write.account.stake`) return time-sensitive calldata** — sign and broadcast promptly; calldata may expire after 30–60 seconds depending on market conditions. If a transaction reverts due to price movement, rebuild and retry at least once before falling back to individual tools.
|
|
47
49
|
|
|
48
|
-
## MCP Tools (
|
|
50
|
+
## MCP Tools (34 + 1 dev)
|
|
49
51
|
|
|
50
52
|
### Read Tools
|
|
51
53
|
|
|
@@ -66,7 +68,8 @@ Arcadia's flash-action tools can batch multiple DeFi operations into a single at
|
|
|
66
68
|
| `read.strategy.info` | Detail for a specific strategy by `strategy_id`, including range-width APY breakdown. |
|
|
67
69
|
| `read.point_leaderboard` | Points leaderboard. No `chain_id` needed — points are cross-chain. |
|
|
68
70
|
| `read.strategy.recommendation` | Rebalancing recommendation for an account. Uses 1d APY (not 7d like `read.strategy.list`), so numbers may differ. |
|
|
69
|
-
| `read.asset_manager.intents` | List
|
|
71
|
+
| `read.asset_manager.intents` | List the automation intents and their params. Pass `account_address` for live per-account availability plus the rule blocking anything unavailable. |
|
|
72
|
+
| `read.asset_manager.current` | What is enabled on an account now: decoded per-manager config, the intents it maps to, Merkl claim state, and superseded managers to clear. |
|
|
70
73
|
| `read.guides` | Reference guides: `automation` (AM setup), `selection` (pool evaluation), `strategies` (step-by-step templates). |
|
|
71
74
|
|
|
72
75
|
### Preferred Write Tools (atomic/multi-step — use these first)
|
|
@@ -78,7 +81,7 @@ These tools batch multiple operations into ONE atomic transaction. Always prefer
|
|
|
78
81
|
| `write.account.add_liquidity` | deposit + swap + mint LP + optional borrow | Open LP position. Do NOT call `write.account.deposit` separately — this handles wallet transfer atomically. |
|
|
79
82
|
| `write.account.close` | burn LP + swap + repay debt (up to 3 steps) | Close/exit a position. ALWAYS try this first. Tokens stay in account — follow up with `write.account.withdraw`. |
|
|
80
83
|
| `write.account.deleverage` | swap collateral + repay debt | Repay debt using account collateral (no wallet tokens needed). Preferred for health factor fixes. |
|
|
81
|
-
| `write.account.
|
|
84
|
+
| `write.account.automations` | resolve intents + validate + build setAssetManagers tx | Configure automations. Pass the full desired intents array; the backend picks the managers and encodes them. |
|
|
82
85
|
|
|
83
86
|
### Individual Write Tools (use when batched tools fail or for standalone operations)
|
|
84
87
|
|
|
@@ -95,7 +98,7 @@ These tools batch multiple operations into ONE atomic transaction. Always prefer
|
|
|
95
98
|
| `write.account.stake` | Stake, unstake, or claim rewards for an LP position. Direction auto-detected from `asset_address`. |
|
|
96
99
|
| `write.pool.deposit` | **Lend to earn yield.** Deposit the pool's underlying asset (USDC / WETH / cbBTC) into the ERC-4626 tranche, receive tranche shares that accrue interest from borrowers. Requires prior `write.wallet.approve` to the tranche. **Different from `write.account.deposit`**: that deposits collateral into your Arcadia account; this deposits as a lender. |
|
|
97
100
|
| `write.pool.redeem` | **Lender exit.** Burn tranche shares and redeem the underlying asset, including accrued interest. Pass the owner's share balance (or a partial amount) in `shares`. |
|
|
98
|
-
| `write.
|
|
101
|
+
| `write.account.automations_delta` | Change one automation without restating the rest: `enable` takes intents, `disable` takes asset-manager addresses from `read.asset_manager.current`. Prefer `write.account.automations` when setting the full desired state. See automation.md. |
|
|
99
102
|
|
|
100
103
|
### Dev Tools (only available when `PK` env var is set)
|
|
101
104
|
|
|
@@ -103,69 +106,94 @@ These tools batch multiple operations into ONE atomic transaction. Always prefer
|
|
|
103
106
|
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
104
107
|
| `dev.send` | Sign and broadcast an unsigned transaction using a local private key. Pass the `{ to, data, value, chainId }` from any `write.*` tool. **Not for production** — use a dedicated wallet MCP server (Fireblocks, Safe, Turnkey, etc.) instead. |
|
|
105
108
|
|
|
106
|
-
##
|
|
107
|
-
|
|
108
|
-
| Token | Address | Decimals |
|
|
109
|
-
| ----- | -------------------------------------------- | -------- |
|
|
110
|
-
| WETH | `0x4200000000000000000000000000000000000006` | 18 |
|
|
111
|
-
| USDC | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` | 6 |
|
|
112
|
-
| cbBTC | `0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf` | 8 |
|
|
113
|
-
| AERO | `0x940181a94A35A4569E4529A3CDfB74e38FD98631` | 18 |
|
|
114
|
-
| AAA | `0xaaa843fb2916c0B57454270418E121C626402AAa` | 18 |
|
|
115
|
-
| stAAA | `0xDeA1531d8a1505785eb517C7A28526443df223F3` | 18 |
|
|
116
|
-
|
|
117
|
-
**Wrapping ETH:** ETH must be wrapped to WETH before depositing. Call WETH's `deposit()` function (payable) with the ETH amount. No MCP tool for this — use your wallet.
|
|
118
|
-
|
|
119
|
-
## Contract Addresses (Base 8453)
|
|
109
|
+
## Shared Addresses
|
|
120
110
|
|
|
121
111
|
| Contract | Address |
|
|
122
112
|
| -------- | -------------------------------------------- |
|
|
123
113
|
| Factory | `0xDa14Fdd72345c4d2511357214c5B89A919768e59` |
|
|
124
114
|
|
|
125
|
-
|
|
115
|
+
### Lending Pools
|
|
116
|
+
|
|
117
|
+
Use as `pool_address` in `write.account.borrow` / `write.account.repay`, as `creditor` in `write.account.create` / `write.account.deleverage`. Same CREATE2 addresses on Base and Optimism. Unichain has no lending pools.
|
|
126
118
|
|
|
127
|
-
|
|
119
|
+
| Asset | Pool Address | Chains |
|
|
120
|
+
| ----- | -------------------------------------------- | -------------- |
|
|
121
|
+
| WETH | `0x803ea69c7e87D1d6C86adeB40CB636cC0E6B98E2` | Base, Optimism |
|
|
122
|
+
| USDC | `0x3ec4a293Fb906DD2Cd440c20dECB250DeF141dF1` | Base, Optimism |
|
|
123
|
+
| cbBTC | `0xa37E9b4369dc20940009030BfbC2088F09645e3B` | Base only |
|
|
128
124
|
|
|
129
|
-
|
|
125
|
+
### Asset Manager Addresses
|
|
130
126
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
127
|
+
Asset-manager addresses are resolved by the backend, not by this server, and are not passed to or returned by the automation tools. All require V3/V4 accounts. Older asset-manager versions remain on-chain for users who registered before the latest version shipped: `read.asset_manager.current` reports those as `deprecated` so they can be disabled, and reports the dex_protocol with no version suffix.
|
|
128
|
+
|
|
129
|
+
The addresses below are for reference and orientation only. The one you may actually need is the gas relayer, for paying for extra rebalances with AAA.
|
|
130
|
+
|
|
131
|
+
Standalone AMs (not tied to a DEX protocol, same address on all supported chains):
|
|
132
|
+
|
|
133
|
+
| Type | Address | Chains |
|
|
134
|
+
| -------------- | -------------------------------------------- | ------------------------ |
|
|
135
|
+
| Merkl Operator | `0x969F0251360b9Cf11c68f6Ce9587924c1B8b42C6` | Base, Optimism, Unichain |
|
|
136
|
+
| Gas Relayer | `0xD938C8d04cF91094fecAF0A2018EAac483a40137` | Base, Optimism, Unichain |
|
|
137
|
+
| CoW Swapper | `0xb988a32DeF54821Dde0D7382e8a74f1BE4da1f23` | Base only |
|
|
138
|
+
|
|
139
|
+
Protocol-specific AMs (rebalancer, compounder, yield claimer). Slipstream V2 is Base-only. All other addresses apply to every chain where the protocol exists:
|
|
140
|
+
|
|
141
|
+
| Type | Protocol | Address |
|
|
142
|
+
| ------------- | ------------- | -------------------------------------------- |
|
|
143
|
+
| Rebalancer | Slipstream V1 | `0x5802454749cc0c4A6F28D5001B4cD84432e2b79F` |
|
|
144
|
+
| Rebalancer | Slipstream V2 | `0x953Ff365d0b562ceC658dc46B394E9282338d9Ea` |
|
|
145
|
+
| Rebalancer | Slipstream V3 | `0x37c6258aEe125d520B6f03fc2cb490955050D557` |
|
|
146
|
+
| Rebalancer | Uniswap V3 | `0xbA1D0c99c261F94b9C8b52465890Cca27dd993Bd` |
|
|
147
|
+
| Rebalancer | Uniswap V4 | `0x01EDaF0067a10D18c88D2876c0A85Ee0096a5Ac0` |
|
|
148
|
+
| Compounder | Slipstream V1 | `0x467837f44A71e3eAB90AEcfC995c84DC6B3cfCF7` |
|
|
149
|
+
| Compounder | Slipstream V2 | `0x35e59448C7145482E56212510cC689612AB4F61f` |
|
|
150
|
+
| Compounder | Slipstream V3 | `0xd42A3Ac56456bD5422835B36C35Cacb6448ddCd9` |
|
|
151
|
+
| Compounder | Uniswap V3 | `0x02e1fa043214E51eDf1F0478c6D0d3D5658a2DC3` |
|
|
152
|
+
| Compounder | Uniswap V4 | `0xAA95c9c402b195D8690eCaea2341a76e3266B189` |
|
|
153
|
+
| Yield Claimer | Slipstream V1 | `0x5a8278D37b7a787574b6Aa7E18d8C02D994f18Ba` |
|
|
154
|
+
| Yield Claimer | Slipstream V2 | `0xc8bF4B2c740FF665864E9494832520f18822871C` |
|
|
155
|
+
| Yield Claimer | Slipstream V3 | `0x8c1Fbf38118fD5A704b6E7babcB7AF1a9A291980` |
|
|
156
|
+
| Yield Claimer | Uniswap V3 | `0x75Ed28EA8601Ce9F5FbcAB1c2428f04A57aFaA16` |
|
|
157
|
+
| Yield Claimer | Uniswap V4 | `0xD8aa21AB7f9B8601CB7d7A776D3AFA1602d5D8D4` |
|
|
158
|
+
|
|
159
|
+
Slipstream V3 on Optimism uses different addresses (exception to the deterministic deployment pattern):
|
|
160
|
+
|
|
161
|
+
| Type | Address (Optimism) |
|
|
162
|
+
| ------------- | -------------------------------------------- |
|
|
163
|
+
| Rebalancer | `0x33442fC10a20Aad0ddD73F6ae24500F5B370DC51` |
|
|
164
|
+
| Compounder | `0x3e7b6997399eC402491c4A049e4CD727d3aA1738` |
|
|
165
|
+
| Yield Claimer | `0x3630bDb1Ac7cF8A435411391db75450350814F42` |
|
|
166
|
+
|
|
167
|
+
**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. For automations, prefer passing the position's id as `position_id` to `write.account.automations`, which resolves the protocol and tokens for you. If you have no position id, that value (`slipstream`, `slipstream_v2`, `slipstream_v3`, or their `staked_*` variants) is also accepted directly as the `protocol` param.
|
|
168
|
+
|
|
169
|
+
## Account Versions
|
|
170
|
+
|
|
171
|
+
Spot vs margin is determined by whether a **creditor** (lending pool) is set at account creation, not by version number.
|
|
136
172
|
|
|
137
|
-
|
|
173
|
+
- `account_version: 3` — **margin account** (created with a `creditor`). Can borrow, leverage, and mint LP. Uses an onchain whitelist of allowed collateral tokens.
|
|
174
|
+
- `account_version: 4` or `0` (latest) — **spot account** (no creditor, no borrowing). Can hold assets and mint LP with `leverage: 0`. Accepts any ERC20 (no onchain whitelist).
|
|
175
|
+
- `account_version: 1` or `2` — legacy. Not supported by current MCP tools (the automation tools require V3/V4).
|
|
176
|
+
- For **leveraged LP strategies**, use `account_version: 3` with a creditor.
|
|
177
|
+
- To check an existing account's version: call `read.account.info` — the response includes the account version.
|
|
138
178
|
|
|
139
|
-
|
|
179
|
+
## Chain-Specific Addresses
|
|
140
180
|
|
|
141
|
-
|
|
142
|
-
| -------------- | ------------- | -------------------------------------------- |
|
|
143
|
-
| Rebalancer | Slipstream V1 | `0x5802454749cc0c4A6F28D5001B4cD84432e2b79F` |
|
|
144
|
-
| Rebalancer | Slipstream V2 | `0x953Ff365d0b562ceC658dc46B394E9282338d9Ea` |
|
|
145
|
-
| Rebalancer | Slipstream V3 | `0x37c6258aEe125d520B6f03fc2cb490955050D557` |
|
|
146
|
-
| Rebalancer | Uniswap V3 | `0xbA1D0c99c261F94b9C8b52465890Cca27dd993Bd` |
|
|
147
|
-
| Rebalancer | Uniswap V4 | `0x01EDaF0067a10D18c88D2876c0A85Ee0096a5Ac0` |
|
|
148
|
-
| Compounder | Slipstream V1 | `0x467837f44A71e3eAB90AEcfC995c84DC6B3cfCF7` |
|
|
149
|
-
| Compounder | Slipstream V2 | `0x35e59448C7145482E56212510cC689612AB4F61f` |
|
|
150
|
-
| Compounder | Slipstream V3 | `0xd42A3Ac56456bD5422835B36C35Cacb6448ddCd9` |
|
|
151
|
-
| Compounder | Uniswap V3 | `0x02e1fa043214E51eDf1F0478c6D0d3D5658a2DC3` |
|
|
152
|
-
| Compounder | Uniswap V4 | `0xAA95c9c402b195D8690eCaea2341a76e3266B189` |
|
|
153
|
-
| Yield Claimer | Slipstream V1 | `0x5a8278D37b7a787574b6Aa7E18d8C02D994f18Ba` |
|
|
154
|
-
| Yield Claimer | Slipstream V2 | `0xc8bF4B2c740FF665864E9494832520f18822871C` |
|
|
155
|
-
| Yield Claimer | Slipstream V3 | `0x8c1Fbf38118fD5A704b6E7babcB7AF1a9A291980` |
|
|
156
|
-
| Yield Claimer | Uniswap V3 | `0x75Ed28EA8601Ce9F5FbcAB1c2428f04A57aFaA16` |
|
|
157
|
-
| Yield Claimer | Uniswap V4 | `0xD8aa21AB7f9B8601CB7d7A776D3AFA1602d5D8D4` |
|
|
158
|
-
| Merkl Operator | All | `0x969F0251360b9Cf11c68f6Ce9587924c1B8b42C6` |
|
|
159
|
-
| CoW Swapper | Base only | `0xFfC742E68D41389BE9Ef1aFD518F036064DA2Bb6` |
|
|
160
|
-
| Gas Relayer | All | `0xD938C8d04cF91094fecAF0A2018EAac483a40137` |
|
|
181
|
+
### Base (8453)
|
|
161
182
|
|
|
162
|
-
|
|
183
|
+
Protocols: Slipstream V1, Slipstream V2, Slipstream V3, Uniswap V3, Uniswap V4.
|
|
163
184
|
|
|
164
|
-
|
|
185
|
+
| Token | Address | Decimals |
|
|
186
|
+
| ----- | -------------------------------------------- | -------- |
|
|
187
|
+
| WETH | `0x4200000000000000000000000000000000000006` | 18 |
|
|
188
|
+
| USDC | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` | 6 |
|
|
189
|
+
| cbBTC | `0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf` | 8 |
|
|
190
|
+
| AERO | `0x940181a94A35A4569E4529A3CDfB74e38FD98631` | 18 |
|
|
191
|
+
| AAA | `0xaaa843fb2916c0B57454270418E121C626402AAa` | 18 |
|
|
192
|
+
| stAAA | `0xDeA1531d8a1505785eb517C7A28526443df223F3` | 18 |
|
|
165
193
|
|
|
166
|
-
|
|
194
|
+
### Optimism (10)
|
|
167
195
|
|
|
168
|
-
|
|
196
|
+
Protocols: Slipstream V1 (Velodrome), Slipstream V3, Uniswap V3, Uniswap V4. No Slipstream V2, no cbBTC pool.
|
|
169
197
|
|
|
170
198
|
| Token | Address | Decimals |
|
|
171
199
|
| ------ | -------------------------------------------- | -------- |
|
|
@@ -176,24 +204,17 @@ On Optimism, only Slipstream V1 (Velodrome), Uniswap V3, and Uniswap V4 are supp
|
|
|
176
204
|
| WBTC | `0x68f180fcCe6836688e9084f035309E29Bf0A2095` | 8 |
|
|
177
205
|
| wstETH | `0x1F32b1c2345538c0c6f582fCB022739c4A194Ebb` | 18 |
|
|
178
206
|
|
|
179
|
-
|
|
207
|
+
### Unichain (130)
|
|
180
208
|
|
|
181
|
-
|
|
182
|
-
| ----- | -------------------------------------------- |
|
|
183
|
-
| WETH | `0x803ea69c7e87D1d6C86adeB40CB636cC0E6B98E2` |
|
|
184
|
-
| USDC | `0x3ec4a293Fb906DD2Cd440c20dECB250DeF141dF1` |
|
|
209
|
+
Protocols: Slipstream V1, Uniswap V3, Uniswap V4. No Slipstream V2/V3. No lending pools.
|
|
185
210
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
- `account_version: 4` or `0` (latest) — **spot account** (no creditor, no borrowing). Can hold assets and mint LP with `leverage: 0`. Accepts any ERC20 (no onchain whitelist).
|
|
194
|
-
- `account_version: 1` or `2` — legacy. Not supported by current MCP tools (`write.asset_manager.*` and `write.account.set_asset_managers` require V3/V4).
|
|
195
|
-
- For **leveraged LP strategies**, use `account_version: 3` with a creditor.
|
|
196
|
-
- To check an existing account's version: call `read.account.info` — the response includes the account version.
|
|
211
|
+
| Token | Address | Decimals |
|
|
212
|
+
| ----- | -------------------------------------------- | -------- |
|
|
213
|
+
| WETH | `0x4200000000000000000000000000000000000006` | 18 |
|
|
214
|
+
| USDC | `0x078D782b760474a361dDA0AF3839290b0EF57AD6` | 6 |
|
|
215
|
+
| WBTC | `0x0555E30da8f98308EdB960aa94C0Db47230d2B9c` | 8 |
|
|
216
|
+
| UNI | `0x8f187aA05619a017077f5308904739877ce9eA21` | 18 |
|
|
217
|
+
| VELO | `0x7f9AdFbd38b669F03d1d11000Bc76b9AaEA28A81` | 18 |
|
|
197
218
|
|
|
198
219
|
## Reference Files
|
|
199
220
|
|