@arcadia-finance/mcp-server 0.3.3 → 0.3.5
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 +3 -2
- package/dist/config/addresses.js +55 -3
- package/dist/config/chains.js +10 -2
- package/dist/index.js +1 -1
- package/dist/tools/dev/send.js +4 -2
- package/dist/tools/read/account.js +5 -4
- package/dist/tools/read/asset-managers.js +9 -2
- package/dist/tools/read/assets.js +3 -2
- package/dist/tools/read/pools.js +3 -2
- package/dist/tools/read/strategy.js +27 -5
- package/dist/tools/read/wallet.js +4 -3
- package/dist/tools/write/account/add-liquidity.js +2 -1
- package/dist/tools/write/account/borrow.js +2 -1
- package/dist/tools/write/account/close.js +2 -1
- package/dist/tools/write/account/create.js +2 -1
- package/dist/tools/write/account/deleverage.js +2 -1
- package/dist/tools/write/account/deposit.js +2 -1
- package/dist/tools/write/account/format-response.js +17 -5
- package/dist/tools/write/account/remove-liquidity.js +2 -1
- package/dist/tools/write/account/repay.js +2 -1
- package/dist/tools/write/account/stake.js +2 -1
- package/dist/tools/write/account/swap.js +2 -1
- package/dist/tools/write/account/withdraw.js +2 -1
- package/dist/tools/write/asset-managers/compounder.js +6 -4
- package/dist/tools/write/asset-managers/merkl-operator.js +2 -1
- package/dist/tools/write/asset-managers/rebalancer.js +2 -1
- package/dist/tools/write/asset-managers/set-asset-managers.js +2 -1
- package/dist/tools/write/asset-managers/shared.js +4 -0
- package/dist/tools/write/asset-managers/yield-claimer.js +6 -4
- package/dist/tools/write/wallet/approve.js +2 -1
- package/dist/utils/validation.js +2 -2
- package/llms-full.txt +35 -35
- package/llms.txt +2 -2
- package/package.json +5 -2
- package/server.json +9 -3
- package/skills/clamm-liquidity/SKILL.md +31 -4
- package/skills/openclaw/SKILL.md +39 -19
- package/skills/openclaw/arcadia.sh +101 -0
- package/skills/openclaw/contracts.md +20 -2
- package/skills/openclaw/wallet-signing.md +2 -22
- package/skills/openclaw/arcadia.mjs +0 -49
|
@@ -6,7 +6,7 @@ user-invocable: true
|
|
|
6
6
|
|
|
7
7
|
# Arcadia Finance — clAMM Agent Guide
|
|
8
8
|
|
|
9
|
-
Arcadia is a platform for managing concentrated liquidity positions
|
|
9
|
+
Arcadia is a platform for managing concentrated liquidity positions with automated rebalancing, compounding, yield optimization, and leverage. Positions live in Arcadia accounts, which can also borrow against their collateral. This skill covers everything needed to manage clAMM positions as an agent.
|
|
10
10
|
|
|
11
11
|
## Key Constraints
|
|
12
12
|
|
|
@@ -20,7 +20,7 @@ Arcadia is a platform for managing concentrated liquidity positions — with bui
|
|
|
20
20
|
Write tools (`write.*`) return unsigned transaction calldata. This server does NOT sign or broadcast. After receiving a transaction object, you must:
|
|
21
21
|
|
|
22
22
|
1. **Sign** the transaction with the account owner's private key or wallet
|
|
23
|
-
2. **Broadcast** it to the appropriate chain (Base 8453 or
|
|
23
|
+
2. **Broadcast** it to the appropriate chain (Base 8453, Unichain 130, or Optimism 10)
|
|
24
24
|
3. **Wait** for the transaction receipt to confirm success
|
|
25
25
|
|
|
26
26
|
How you sign depends on your setup:
|
|
@@ -140,21 +140,48 @@ Addresses are auto-resolved by `write.asset_manager.*` intent tools based on `de
|
|
|
140
140
|
| -------------- | ------------- | -------------------------------------------- |
|
|
141
141
|
| Rebalancer | Slipstream V1 | `0x5802454749cc0c4A6F28D5001B4cD84432e2b79F` |
|
|
142
142
|
| Rebalancer | Slipstream V2 | `0x953Ff365d0b562ceC658dc46B394E9282338d9Ea` |
|
|
143
|
+
| Rebalancer | Slipstream V3 | `0x37c6258aEe125d520B6f03fc2cb490955050D557` |
|
|
143
144
|
| Rebalancer | Uniswap V3 | `0xbA1D0c99c261F94b9C8b52465890Cca27dd993Bd` |
|
|
144
145
|
| Rebalancer | Uniswap V4 | `0x01EDaF0067a10D18c88D2876c0A85Ee0096a5Ac0` |
|
|
145
146
|
| Compounder | Slipstream V1 | `0x467837f44A71e3eAB90AEcfC995c84DC6B3cfCF7` |
|
|
146
147
|
| Compounder | Slipstream V2 | `0x35e59448C7145482E56212510cC689612AB4F61f` |
|
|
148
|
+
| Compounder | Slipstream V3 | `0xd42A3Ac56456bD5422835B36C35Cacb6448ddCd9` |
|
|
147
149
|
| Compounder | Uniswap V3 | `0x02e1fa043214E51eDf1F0478c6D0d3D5658a2DC3` |
|
|
148
150
|
| Compounder | Uniswap V4 | `0xAA95c9c402b195D8690eCaea2341a76e3266B189` |
|
|
149
151
|
| Yield Claimer | Slipstream V1 | `0x5a8278D37b7a787574b6Aa7E18d8C02D994f18Ba` |
|
|
150
152
|
| Yield Claimer | Slipstream V2 | `0xc8bF4B2c740FF665864E9494832520f18822871C` |
|
|
153
|
+
| Yield Claimer | Slipstream V3 | `0x8c1Fbf38118fD5A704b6E7babcB7AF1a9A291980` |
|
|
151
154
|
| Yield Claimer | Uniswap V3 | `0x75Ed28EA8601Ce9F5FbcAB1c2428f04A57aFaA16` |
|
|
152
155
|
| Yield Claimer | Uniswap V4 | `0xD8aa21AB7f9B8601CB7d7A776D3AFA1602d5D8D4` |
|
|
153
156
|
| Merkl Operator | All | `0x969F0251360b9Cf11c68f6Ce9587924c1B8b42C6` |
|
|
154
|
-
| CoW Swapper |
|
|
157
|
+
| CoW Swapper | Base only | `0xc928013A219EC9F18dE7B2dee6A50Ba626811854` |
|
|
155
158
|
| Gas Relayer | All | `0xD938C8d04cF91094fecAF0A2018EAac483a40137` |
|
|
156
159
|
|
|
157
|
-
|
|
160
|
+
Slipstream V3 addresses above are Base-only. Unichain and Optimism have Slipstream V1 only (no V2/V3 position manager deployed).
|
|
161
|
+
|
|
162
|
+
**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.
|
|
163
|
+
|
|
164
|
+
## Token, Contract, and Lending Pool Addresses (Optimism 10)
|
|
165
|
+
|
|
166
|
+
On Optimism, only Slipstream V1 (Velodrome), Uniswap V3, and Uniswap V4 are supported. No cbBTC pool, no CoW Swap.
|
|
167
|
+
|
|
168
|
+
| Token | Address | Decimals |
|
|
169
|
+
| ------ | -------------------------------------------- | -------- |
|
|
170
|
+
| WETH | `0x4200000000000000000000000000000000000006` | 18 |
|
|
171
|
+
| USDC | `0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85` | 6 |
|
|
172
|
+
| OP | `0x4200000000000000000000000000000000000042` | 18 |
|
|
173
|
+
| VELO | `0x9560e827aF36c94D2Ac33a39bCE1Fe78631088Db` | 18 |
|
|
174
|
+
| WBTC | `0x68f180fcCe6836688e9084f035309E29Bf0A2095` | 8 |
|
|
175
|
+
| wstETH | `0x1F32b1c2345538c0c6f582fCB022739c4A194Ebb` | 18 |
|
|
176
|
+
|
|
177
|
+
Lending pools (same CREATE2 addresses as Base):
|
|
178
|
+
|
|
179
|
+
| Asset | Pool Address |
|
|
180
|
+
| ----- | -------------------------------------------- |
|
|
181
|
+
| WETH | `0x803ea69c7e87D1d6C86adeB40CB636cC0E6B98E2` |
|
|
182
|
+
| USDC | `0x3ec4a293Fb906DD2Cd440c20dECB250DeF141dF1` |
|
|
183
|
+
|
|
184
|
+
Available automations on Optimism: rebalancer, compounder, yield_claimer, merkl_operator. `cow_swapper`, `compounder_staked`, and `yield_claimer_cowswap` are Base-only (CoW Swap is not deployed on Optimism).
|
|
158
185
|
|
|
159
186
|
## Account Versions
|
|
160
187
|
|
package/skills/openclaw/SKILL.md
CHANGED
|
@@ -1,69 +1,89 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: arcadia-finance
|
|
3
|
-
description: "
|
|
3
|
+
description: "DeFi liquidity management on Uniswap and Aerodrome, live on Base and Unichain. Deploy LP positions with automated rebalancing, compounding, yield optimization, and leverage via Arcadia Finance."
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
homepage: https://arcadia.finance
|
|
7
|
+
requires:
|
|
8
|
+
bins: [curl, jq]
|
|
4
9
|
---
|
|
5
10
|
|
|
6
11
|
# Arcadia Finance
|
|
7
12
|
|
|
8
|
-
|
|
13
|
+
> **Agent note:** `{baseDir}` refers to the directory containing this SKILL.md file. Resolve all `{baseDir}` paths relative to it.
|
|
14
|
+
|
|
15
|
+
Arcadia helps users deploy and manage concentrated liquidity positions on Uniswap, Aerodrome, and Velodrome with automated rebalancing, compounding, yield optimization, and optional leverage. Supported chains: Base (8453), Unichain (130), Optimism (10).
|
|
9
16
|
|
|
10
17
|
## CLI Usage
|
|
11
18
|
|
|
12
19
|
```bash
|
|
13
|
-
|
|
14
|
-
|
|
20
|
+
# Discover all available tools (run this first)
|
|
21
|
+
{baseDir}/arcadia.sh --list
|
|
22
|
+
|
|
23
|
+
# Call a specific tool
|
|
24
|
+
{baseDir}/arcadia.sh <tool_name> '<json_args>'
|
|
15
25
|
```
|
|
16
26
|
|
|
17
|
-
Requires
|
|
27
|
+
Requires: `curl`, `jq`. No other dependencies.
|
|
18
28
|
|
|
19
29
|
## Read Operations
|
|
20
30
|
|
|
21
31
|
```bash
|
|
22
32
|
# List all accounts for a wallet
|
|
23
|
-
|
|
33
|
+
{baseDir}/arcadia.sh read_wallet_accounts '{"wallet_address":"0x..."}'
|
|
24
34
|
|
|
25
35
|
# Account details (health factor, collateral, debt, positions)
|
|
26
|
-
|
|
36
|
+
{baseDir}/arcadia.sh read_account_info '{"account_address":"0x..."}'
|
|
27
37
|
|
|
28
38
|
# Featured LP strategies with APY
|
|
29
|
-
|
|
39
|
+
{baseDir}/arcadia.sh read_strategy_list '{"featured_only":true}'
|
|
30
40
|
|
|
31
41
|
# Lending pools (TVL, APY, utilization)
|
|
32
|
-
|
|
42
|
+
{baseDir}/arcadia.sh read_pool_list '{}'
|
|
33
43
|
|
|
34
44
|
# Workflow guides (automation setup, strategy selection)
|
|
35
|
-
|
|
45
|
+
{baseDir}/arcadia.sh read_guides '{"topic":"overview"}'
|
|
36
46
|
|
|
37
47
|
# Available automations (rebalancer, compounder, yield claimer)
|
|
38
|
-
|
|
48
|
+
{baseDir}/arcadia.sh read_asset_manager_intents '{}'
|
|
39
49
|
```
|
|
40
50
|
|
|
41
51
|
## Write Operations
|
|
42
52
|
|
|
43
|
-
All write tools return unsigned transactions `{ to, data, value, chainId }`. See `wallet-signing.md` for
|
|
53
|
+
All write tools return unsigned transactions `{ to, data, value, chainId }`. Sign with your wallet before broadcasting. See `{baseDir}/wallet-signing.md` for wallet options.
|
|
44
54
|
|
|
45
55
|
```bash
|
|
46
56
|
# Open LP position (deposits + swaps + mints LP atomically)
|
|
47
|
-
|
|
57
|
+
{baseDir}/arcadia.sh write_account_add_liquidity '{"account_address":"0x...","wallet_address":"0x...","positions":[{"strategy_id":123}],"deposits":[{"asset":"0x...","amount":"1000000","decimals":6}]}'
|
|
48
58
|
|
|
49
59
|
# Close position (burn LP + swap + repay in one tx)
|
|
50
|
-
|
|
60
|
+
{baseDir}/arcadia.sh write_account_close '{"account_address":"0x...","assets":[...],"receive_assets":[...]}'
|
|
61
|
+
|
|
62
|
+
# Create a new account (salt must be unique per wallet)
|
|
63
|
+
{baseDir}/arcadia.sh write_account_create '{"wallet_address":"0x...","salt":1,"chain_id":8453}'
|
|
51
64
|
|
|
52
65
|
# Enable automation
|
|
53
|
-
|
|
54
|
-
|
|
66
|
+
{baseDir}/arcadia.sh write_asset_manager_rebalancer '{"dex_protocol":"slipstream"}'
|
|
67
|
+
{baseDir}/arcadia.sh write_account_set_asset_managers '{"account_address":"0x...","asset_managers":[...],"statuses":[...],"datas":[...]}'
|
|
55
68
|
```
|
|
56
69
|
|
|
57
|
-
##
|
|
70
|
+
## Configuration
|
|
71
|
+
|
|
72
|
+
The CLI connects to `https://mcp.arcadia.finance/mcp` by default. Set `ARCADIA_MCP_URL` to override (e.g. for local development).
|
|
73
|
+
|
|
74
|
+
## Data and Safety
|
|
75
|
+
|
|
76
|
+
This skill connects to Arcadia's public API at `https://mcp.arcadia.finance/mcp` (override via `ARCADIA_MCP_URL`). Tool calls send public wallet addresses, account addresses, and transaction parameters to this server. This is the same data that is publicly visible on-chain. No private keys or signing capabilities are transmitted.
|
|
58
77
|
|
|
59
78
|
- Write tools return unsigned transactions only. Never auto-sign.
|
|
60
79
|
- Always confirm transaction details with the user before signing.
|
|
61
80
|
- Check account health factor with `read_account_info` before risky operations.
|
|
81
|
+
- Do not pass private keys or secrets as tool arguments. Only public addresses and amounts are needed.
|
|
62
82
|
|
|
63
83
|
## References
|
|
64
84
|
|
|
65
85
|
- Full tool documentation: https://mcp.arcadia.finance/llms-full.txt
|
|
66
|
-
- Contract addresses: see `contracts.md`
|
|
67
|
-
- Signing guide: see `wallet-signing.md`
|
|
86
|
+
- Contract addresses: see `{baseDir}/contracts.md`
|
|
87
|
+
- Signing guide: see `{baseDir}/wallet-signing.md`
|
|
68
88
|
- Website: https://arcadia.finance
|
|
69
89
|
- Docs: https://docs.arcadia.finance
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# CLI wrapper for Arcadia Finance MCP server.
|
|
3
|
+
# Uses curl + jq to call tools over Streamable HTTP.
|
|
4
|
+
#
|
|
5
|
+
# Usage:
|
|
6
|
+
# ./arcadia.sh <tool_name> '<json_args>'
|
|
7
|
+
# ./arcadia.sh --list
|
|
8
|
+
#
|
|
9
|
+
# Requires: curl, jq
|
|
10
|
+
|
|
11
|
+
set -euo pipefail
|
|
12
|
+
|
|
13
|
+
MCP_URL="${ARCADIA_MCP_URL:-https://mcp.arcadia.finance/mcp}"
|
|
14
|
+
|
|
15
|
+
for bin in curl jq; do
|
|
16
|
+
if ! command -v "$bin" >/dev/null 2>&1; then
|
|
17
|
+
echo "Required: $bin" >&2
|
|
18
|
+
exit 1
|
|
19
|
+
fi
|
|
20
|
+
done
|
|
21
|
+
|
|
22
|
+
TOOL_NAME="${1:-}"
|
|
23
|
+
ARGS_JSON="${2:-"{}"}"
|
|
24
|
+
|
|
25
|
+
if [[ -z "$TOOL_NAME" ]]; then
|
|
26
|
+
echo "Usage: $0 <tool_name> '<json_args>'"
|
|
27
|
+
echo " $0 --list"
|
|
28
|
+
exit 1
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
HEADERS_FILE=$(mktemp)
|
|
32
|
+
trap 'rm -f "$HEADERS_FILE"' EXIT
|
|
33
|
+
|
|
34
|
+
# Parse SSE response: extract the data: line and parse as JSON
|
|
35
|
+
parse_sse() {
|
|
36
|
+
grep '^data: ' | head -1 | sed 's/^data: //'
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
# Initialize session
|
|
40
|
+
INIT_RESPONSE=$(curl -s -X POST "$MCP_URL" \
|
|
41
|
+
-H "Content-Type: application/json" \
|
|
42
|
+
-H "Accept: application/json, text/event-stream" \
|
|
43
|
+
-D "$HEADERS_FILE" \
|
|
44
|
+
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"arcadia-openclaw","version":"1.0.0"}}}' 2>/dev/null) || true
|
|
45
|
+
|
|
46
|
+
SESSION_ID=$(grep -i 'mcp-session-id' "$HEADERS_FILE" 2>/dev/null | awk '{print $2}' | tr -d '\r') || true
|
|
47
|
+
|
|
48
|
+
if [[ -z "$SESSION_ID" ]]; then
|
|
49
|
+
echo "Failed to connect to $MCP_URL" >&2
|
|
50
|
+
exit 1
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
# Send initialized notification
|
|
54
|
+
curl -sf -X POST "$MCP_URL" \
|
|
55
|
+
-H "Content-Type: application/json" \
|
|
56
|
+
-H "Accept: application/json, text/event-stream" \
|
|
57
|
+
-H "Mcp-Session-Id: $SESSION_ID" \
|
|
58
|
+
-d '{"jsonrpc":"2.0","method":"notifications/initialized"}' \
|
|
59
|
+
-o /dev/null 2>/dev/null || true
|
|
60
|
+
|
|
61
|
+
if [[ "$TOOL_NAME" == "--list" ]]; then
|
|
62
|
+
RESPONSE=$(curl -sf -X POST "$MCP_URL" \
|
|
63
|
+
-H "Content-Type: application/json" \
|
|
64
|
+
-H "Accept: application/json, text/event-stream" \
|
|
65
|
+
-H "Mcp-Session-Id: $SESSION_ID" \
|
|
66
|
+
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}')
|
|
67
|
+
|
|
68
|
+
echo "$RESPONSE" | parse_sse | jq -r '.result.tools | sort_by(.name)[] | "\(.name): \(.description[0:120])"'
|
|
69
|
+
else
|
|
70
|
+
if ! echo "$ARGS_JSON" | jq . >/dev/null 2>&1; then
|
|
71
|
+
echo "ERROR: Invalid JSON arguments: $ARGS_JSON" >&2
|
|
72
|
+
exit 1
|
|
73
|
+
fi
|
|
74
|
+
|
|
75
|
+
PAYLOAD=$(jq -nc --arg name "$TOOL_NAME" --argjson args "$ARGS_JSON" \
|
|
76
|
+
'{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":$name,"arguments":$args}}')
|
|
77
|
+
|
|
78
|
+
RESPONSE=$(curl -sf -X POST "$MCP_URL" \
|
|
79
|
+
-H "Content-Type: application/json" \
|
|
80
|
+
-H "Accept: application/json, text/event-stream" \
|
|
81
|
+
-H "Mcp-Session-Id: $SESSION_ID" \
|
|
82
|
+
-d "$PAYLOAD")
|
|
83
|
+
|
|
84
|
+
RESULT=$(echo "$RESPONSE" | parse_sse)
|
|
85
|
+
IS_ERROR=$(echo "$RESULT" | jq -r '.result.isError // false')
|
|
86
|
+
TEXT=$(echo "$RESULT" | jq -r '.result.content[0].text // empty')
|
|
87
|
+
|
|
88
|
+
if [[ "$IS_ERROR" == "true" ]]; then
|
|
89
|
+
if echo "$TEXT" | grep -qi "internal exception\|500\|internal server error"; then
|
|
90
|
+
echo "ERROR: Request failed. Check that IDs and addresses are valid. Details: $TEXT" >&2
|
|
91
|
+
else
|
|
92
|
+
echo "ERROR: $TEXT" >&2
|
|
93
|
+
fi
|
|
94
|
+
exit 1
|
|
95
|
+
else
|
|
96
|
+
echo "$TEXT"
|
|
97
|
+
fi
|
|
98
|
+
fi
|
|
99
|
+
|
|
100
|
+
# Cleanup session
|
|
101
|
+
curl -sf -X DELETE "$MCP_URL" -H "Mcp-Session-Id: $SESSION_ID" -o /dev/null 2>/dev/null || true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Arcadia Contract Addresses
|
|
2
2
|
|
|
3
|
-
Supported chains: Base (8453), Unichain (130).
|
|
3
|
+
Supported chains: Base (8453), Unichain (130), Optimism (10).
|
|
4
4
|
|
|
5
5
|
## Protocol (same on all chains)
|
|
6
6
|
|
|
@@ -18,6 +18,13 @@ Supported chains: Base (8453), Unichain (130).
|
|
|
18
18
|
| LP_USDC | 0x3ec4a293Fb906DD2Cd440c20dECB250DeF141dF1 |
|
|
19
19
|
| LP_CBBTC | 0xa37E9b4369dc20940009030BfbC2088F09645e3B |
|
|
20
20
|
|
|
21
|
+
## Lending Pools (Optimism)
|
|
22
|
+
|
|
23
|
+
| Pool | Address |
|
|
24
|
+
| ------- | ------------------------------------------ |
|
|
25
|
+
| LP_WETH | 0x803ea69c7e87D1d6C86adeB40CB636cC0E6B98E2 |
|
|
26
|
+
| LP_USDC | 0x3ec4a293Fb906DD2Cd440c20dECB250DeF141dF1 |
|
|
27
|
+
|
|
21
28
|
## Key Tokens (Base)
|
|
22
29
|
|
|
23
30
|
| Token | Address | Decimals |
|
|
@@ -27,6 +34,17 @@ Supported chains: Base (8453), Unichain (130).
|
|
|
27
34
|
| cbBTC | 0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf | 8 |
|
|
28
35
|
| AERO | 0x940181a94A35A4569E4529A3CDfB74e38FD98631 | 18 |
|
|
29
36
|
|
|
37
|
+
## Key Tokens (Optimism)
|
|
38
|
+
|
|
39
|
+
| Token | Address | Decimals |
|
|
40
|
+
| ------ | ------------------------------------------ | -------- |
|
|
41
|
+
| WETH | 0x4200000000000000000000000000000000000006 | 18 |
|
|
42
|
+
| USDC | 0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85 | 6 |
|
|
43
|
+
| OP | 0x4200000000000000000000000000000000000042 | 18 |
|
|
44
|
+
| VELO | 0x9560e827aF36c94D2Ac33a39bCE1Fe78631088Db | 18 |
|
|
45
|
+
| WBTC | 0x68f180fcCe6836688e9084f035309E29Bf0A2095 | 8 |
|
|
46
|
+
| wstETH | 0x1F32b1c2345538c0c6f582fCB022739c4A194Ebb | 18 |
|
|
47
|
+
|
|
30
48
|
## Asset Managers
|
|
31
49
|
|
|
32
|
-
Rebalancers, compounders, and yield claimers are deployed per DEX protocol. Use `read_asset_manager_intents` to discover available automations and their addresses.
|
|
50
|
+
Rebalancers, compounders, and yield claimers are deployed per DEX protocol. Slipstream V3 is Base-only. Optimism supports Slipstream V1 (Velodrome), Uniswap V3, and Uniswap V4. No CoW Swap on Optimism. Use `read_asset_manager_intents` to discover available automations and their addresses per chain.
|
|
@@ -1,31 +1,11 @@
|
|
|
1
1
|
# Signing Unsigned Transactions
|
|
2
2
|
|
|
3
|
-
All Arcadia write tools return unsigned transactions as `{ to, data, value, chainId }`. You need a separate wallet to sign and broadcast.
|
|
3
|
+
All Arcadia write tools return unsigned transactions as `{ to, data, value, chainId }`. You need a separate wallet to sign and broadcast. Never expose private keys to the agent.
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
**Foundry cast (dev/testing):**
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
cast send <to> --data <data> --value <value> --rpc-url $RPC_URL --private-key $PK
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
**Wallet MCP servers (production):**
|
|
5
|
+
## Wallet MCP Servers (recommended)
|
|
14
6
|
|
|
15
7
|
- MCP Wallet Signer (github.com/nikicat/mcp-wallet-signer): routes to browser wallet (MetaMask, Rabby), non-custodial
|
|
16
8
|
- Phantom MCP (@phantom/mcp-server): for Phantom wallet users
|
|
17
9
|
- Privy MCP (github.com/incentivai-io/privy-mcp-server): wallet infrastructure
|
|
18
10
|
- Coinbase AgentKit (github.com/coinbase/agentkit): wallet-agnostic signing
|
|
19
11
|
- Safe MCP (github.com/safer-sh/safer): multi-sig via Safe
|
|
20
|
-
|
|
21
|
-
**viem/ethers (in code):**
|
|
22
|
-
|
|
23
|
-
```javascript
|
|
24
|
-
import { createWalletClient, http } from "viem";
|
|
25
|
-
import { privateKeyToAccount } from "viem/accounts";
|
|
26
|
-
import { base } from "viem/chains";
|
|
27
|
-
|
|
28
|
-
const account = privateKeyToAccount("0x...");
|
|
29
|
-
const client = createWalletClient({ account, chain: base, transport: http() });
|
|
30
|
-
const hash = await client.sendTransaction(tx);
|
|
31
|
-
```
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* CLI wrapper for Arcadia Finance MCP server.
|
|
5
|
-
* Connects to the remote endpoint and calls tools by name.
|
|
6
|
-
*
|
|
7
|
-
* Usage:
|
|
8
|
-
* node arcadia.mjs <tool_name> '<json_args>'
|
|
9
|
-
* node arcadia.mjs --list
|
|
10
|
-
*
|
|
11
|
-
* Requires: npm install @modelcontextprotocol/sdk
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
15
|
-
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
16
|
-
|
|
17
|
-
const ENDPOINT = process.env.ARCADIA_MCP_URL || "https://mcp.arcadia.finance/mcp";
|
|
18
|
-
const [toolName, argsJson] = process.argv.slice(2);
|
|
19
|
-
|
|
20
|
-
if (!toolName) {
|
|
21
|
-
console.error("Usage: node arcadia.mjs <tool_name> '<json_args>'");
|
|
22
|
-
console.error(" node arcadia.mjs --list");
|
|
23
|
-
process.exit(1);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const client = new Client({ name: "arcadia-openclaw", version: "1.0.0" });
|
|
27
|
-
const transport = new StreamableHTTPClientTransport(new URL(ENDPOINT));
|
|
28
|
-
await client.connect(transport);
|
|
29
|
-
|
|
30
|
-
try {
|
|
31
|
-
if (toolName === "--list") {
|
|
32
|
-
const { tools } = await client.listTools();
|
|
33
|
-
for (const t of tools.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
34
|
-
console.log(`${t.name}: ${t.description?.substring(0, 120)}`);
|
|
35
|
-
}
|
|
36
|
-
} else {
|
|
37
|
-
const args = argsJson ? JSON.parse(argsJson) : {};
|
|
38
|
-
const result = await client.callTool({ name: toolName, arguments: args });
|
|
39
|
-
const text = result.content?.[0]?.text ?? "";
|
|
40
|
-
if (result.isError) {
|
|
41
|
-
console.error(`ERROR: ${text}`);
|
|
42
|
-
process.exitCode = 1;
|
|
43
|
-
} else {
|
|
44
|
-
console.log(text);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
} finally {
|
|
48
|
-
await client.close();
|
|
49
|
-
}
|