executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
amped-defiDeFi operations plugin for OpenClaw enabling cross-chain swaps, bridging, and money market operations via SODAX. Use when building trading bots, DeFi agents, or portfolio management tools that need cross-chain execution.
Independent GitHub snapshot · Automated classification · Original documentation governs
DeFi operations plugin for OpenClaw enabling cross-chain swaps, bridging, and money market operations via the SODAX SDK.
openclaw plugins install amped-defi
Verify with:
openclaw plugins list
openclaw tools list | grep amped_oc
The plugin works without a wallet for read-only operations (quotes, balances, discovery). To execute transactions, install evm-wallet-skill:
git clone https://github.com/amped-finance/evm-wallet-skill.git ~/.openclaw/skills/evm-wallet-skill
cd ~/.openclaw/skills/evm-wallet-skill && npm install
node src/setup.js # Generate a new wallet
Or use Bankr for managed key infrastructure:
export BANKR_API_KEY=your-bankr-api-key
| Tool | Description |
|---|---|
amped_supported_chains | List all supported spoke chains |
amped_supported_tokens | Get supported tokens by module and chain |
amped_cross_chain_positions | ⭐ Unified portfolio view across ALL chains |
amped_money_market_positions | Single-chain position details |
amped_money_market_reserves | Market reserves, APYs, liquidity |
amped_user_intents | Query intent history via SODAX API |
amped_portfolio_summary | Wallet balances + MM positions combined |
| Tool | Description |
|---|---|
amped_swap_quote | Get exact-in/exact-out swap quote |
amped_swap_execute | Execute swap with policy enforcement |
amped_swap_status | Check swap/intent status |
amped_swap_cancel | Cancel pending swap |
amped_bridge_discover | Discover bridge routes |
amped_bridge_quote | Check bridgeability and max amount |
amped_bridge_execute | Execute bridge operation |
| Tool | Description |
|---|---|
amped_mm_supply | Supply tokens as collateral |
amped_mm_withdraw | Withdraw supplied tokens |
amped_mm_borrow | Borrow tokens (cross-chain capable!) |
amped_mm_repay | Repay borrowed tokens |
| Tool | Description |
|---|---|
amped_list_wallets | List all configured wallets |
amped_add_wallet | Add a new wallet with nickname |
amped_rename_wallet | Rename existing wallet |
amped_remove_wallet | Remove wallet from config |
amped_set_default_wallet | Set default wallet |
amped_wallet_address | Get wallet address by nickname |
SODAX uses a hub-spoke architecture:
Rule: Money market operations (supply, borrow, withdraw, repay) must be initiated from spoke chains, NOT the hub chain (Sonic).
🚨 Each spoke chain maintains its OWN independent health factor.
Example of dangerous misinterpretation:
❌ WRONG: "Combined health factor: 2.65"
✅ RIGHT: "Base HF: 4.11 ✅ | Arbitrum HF: 1.2 ⚠️ (at risk!)"
When using amped_cross_chain_positions, always check the chainBreakdown array:
{
"chainBreakdown": [
{ "chainId": "base", "healthFactor": "4.11", "supplyUsd": "17.25", "borrowUsd": "4.20" },
{ "chainId": "arbitrum", "healthFactor": "1.20", "supplyUsd": "100.00", "borrowUsd": "83.00" }
]
}
Never show an aggregated health factor — it could mislead users into thinking they're safe when one chain is at liquidation risk.
"Swap 1000 USDC on Ethereum to USDT on Arbitrum"
Or via tools:
// Get quote
const quote = await agent.call('amped_swap_quote', {
walletId: 'main',
srcChainId: 'ethereum',
dstChainId: 'arbitrum',
srcToken: 'USDC',
dstToken: 'USDT',
amount: '1000',
type: 'exact_input',
slippageBps: 50
});
// Execute
const result = await agent.call('amped_swap_execute', {
walletId: 'main',
quote: quote
});
Supply on Base, borrow on Arbitrum:
// Supply on Base
await agent.call('amped_mm_supply', {
walletId: 'main',
chainId: 'base',
token: 'USDC',
amount: '1000',
useAsCollateral: true
});
// Borrow to Arbitrum (different chain!)
await agent.call('amped_mm_borrow', {
walletId: 'main',
chainId: 'base', // Where collateral lives
dstChainId: 'arbitrum', // Where borrowed tokens go
token: 'USDT',
amount: '500'
});
When displaying portfolio data, always:
const positions = await agent.call('amped_cross_chain_positions', {
walletId: 'main'
});
// Good display:
positions.chainBreakdown.forEach(chain => {
console.log(`${chain.chainId}: Supply ${chain.supplyUsd} | Borrow ${chain.borrowUsd} | HF: ${chain.healthFactor}`);
});
Ethereum, Arbitrum, Base, Optimism, Avalanche, BSC, Polygon, Sonic (hub), LightLink, HyperEVM, Kaia
Bankr wallets have restricted chain support:
| Chain | As Source | As Destination |
|---|---|---|
| Ethereum | ✅ | ✅ |
| Base | ✅ | ✅ |
| Polygon | ✅ | ✅ |
| Solana | ❌ | ✅ (receive only) |
| Arbitrum | ❌ | ❌ |
| Optimism | ❌ | ❌ |
| Other chains | ❌ | ❌ |
Example: Cross-chain swap from Base to Solana works with Bankr:
await agent.call('amped_swap_execute', {
walletId: 'bankr',
srcChainId: 'base', // ✅ Bankr supports as source
dstChainId: 'solana', // ✅ Solana OK as destination
recipient: '8qguBqM4UHQ...', // Solana base58 address
...
});
Will fail: Trying to swap FROM Arbitrum using Bankr wallet.
Swaps and bridges use intent-based execution:
amped_swap_status to check completionsodaxScanUrl in responses shows full intent lifecycleDon't assume completion just because the tool returned success — that means the intent was submitted, not settled.
Solana addresses use base58 encoding, not hex:
8qguBqM4UHQNHgBm18NLPeonSSFEB3RWBdbih6FXhwZu0x8qguBqM4UHQ...When specifying a Solana recipient for cross-chain swaps, use the base58 format.
Default slippage (50 bps / 0.5%) may cause reverts during high volatility:
await agent.call('amped_swap_quote', {
...
slippageBps: 150 // 1.5% for volatile conditions
});
The plugin handles decimals automatically, but be aware:
When displaying amounts, the plugin returns human-readable values (e.g., "100.5" not "100500000").
Use these emoji for consistent chain identification in portfolio displays:
| Chain | Emoji | Hex Code |
|---|---|---|
| LightLink | ⚡ | U+26A1 |
| Base | 🟦 | U+1F7E6 |
| Sonic | ⚪ | U+26AA |
| Arbitrum | 🔽 | U+1F53D |
| Optimism | 🔴 | U+1F534 |
| Polygon | ♾️ | U+267E |
| BSC | 🔶 | U+1F536 |
| Ethereum | 💎 | U+1F48E |
| Avalanche | 🔺 | U+1F53A |
| HyperEVM | 🌀 | U+1F300 |
| Kaia | 🟢 | U+1F7E2 |
Usage Example:
⚡ LightLink │ 0.002 ETH + 5.49 USDC │ $9.78
🟦 Base │ 0.002 ETH + 0.39 USDC │ $4.55
│ 💰 Supply $21.93 Borrow $5.00
│ 🏥 HF: 3.51 🟢