Loading...
Loading...
Deposit and withdraw from Archimedes Finance V2 protected yield vaults (ERC4626) on Ethereum mainnet. Supports WETH and crvFRAX strategies via Convex and Aura.
npx skill4agent add migokg/plugin-store archimedesRun once per session before first use. These checks ensure required tools are installed.
# 1. Install onchainos CLI
onchainos --version 2>/dev/null || curl -fsSL https://raw.githubusercontent.com/okx/onchainos-skills/main/install.sh | sh
# 2. Install onchainos skills (enables AI agent to use onchainos commands)
npx skills add okx/onchainos-skills --yes --global
# 3. Install plugin-store skills (enables plugin discovery and management)
npx skills add MigOKG/plugin-store --skill plugin-store --yes --globalif ! command -v archimedes >/dev/null 2>&1; then
OS=$(uname -s | tr A-Z a-z)
ARCH=$(uname -m)
EXT=""
case "${OS}_${ARCH}" in
darwin_arm64) TARGET="aarch64-apple-darwin" ;;
darwin_x86_64) TARGET="x86_64-apple-darwin" ;;
linux_x86_64) TARGET="x86_64-unknown-linux-gnu" ;;
linux_aarch64) TARGET="aarch64-unknown-linux-gnu" ;;
mingw*_x86_64|msys*_x86_64|cygwin*_x86_64) TARGET="x86_64-pc-windows-msvc"; EXT=".exe" ;;
esac
mkdir -p ~/.local/bin
curl -fsSL "https://github.com/MigOKG/plugin-store/releases/download/plugins/archimedes@0.1.0/archimedes-${TARGET}${EXT}" -o ~/.local/bin/archimedes${EXT}
chmod +x ~/.local/bin/archimedes${EXT}
fiREPORT_FLAG="$HOME/.plugin-store/reported/archimedes"
if [ ! -f "$REPORT_FLAG" ]; then
mkdir -p "$HOME/.plugin-store/reported"
# Device fingerprint → SHA256 → 32-char device ID
DEV_RAW="$(hostname):$(uname -s):$(uname -m):$HOME"
DEV_ID=$(echo -n "$DEV_RAW" | shasum -a 256 | head -c 32)
# HMAC signature (obfuscated key, same as CLI binary)
_K=$(echo 'OE9nNWFRUFdfSVJkektrMExOV2RNeTIzV2JibXo3ZWNTbExJUDFIWnVoZw==' | base64 -d 2>/dev/null || echo 'OE9nNWFRUFdfSVJkektrMExOV2RNeTIzV2JibXo3ZWNTbExJUDFIWnVoZw==' | openssl base64 -d)
HMAC_SIG=$(echo -n "${_K}${DEV_ID}" | shasum -a 256 | head -c 8)
DIV_ID="${DEV_ID}${HMAC_SIG}"
unset _K
# Report to Vercel stats
curl -s -X POST "https://plugin-store-dun.vercel.app/install" \
-H "Content-Type: application/json" \
-d '{"name":"archimedes","version":"0.1.0"}' >/dev/null 2>&1 || true
# Report to OKX API (with HMAC-signed device token)
curl -s -X POST "https://www.okx.com/priapi/v1/wallet/plugins/download/report" \
-H "Content-Type: application/json" \
-d '{"pluginName":"archimedes","divId":"'"$DIV_ID"'"}' >/dev/null 2>&1 || true
touch "$REPORT_FLAG"
fieth_callwithdrawredeemminimumReceivewhich onchainoswhich archimedesplugin-store install archimedesonchainos wallet statusloggedIn: trueonchainos wallet loginarchimedes vaults
archimedes vaults --rpc https://ethereum.publicnode.com--rpcarchimedes vaults
# Returns: [{"name":"WETH ETH+ Strategy (Convex)","address":"0xfA364CB...","tvl":"1.234"}]archimedes positions
archimedes positions --wallet 0xAbCd...1234
archimedes positions --rpc https://ethereum.publicnode.com--wallet--rpcarchimedes positions
# Returns: [{"vault":"WETH ETH+ Strategy","shares":"0.001","underlying_value":"0.001 WETH"}]archimedes deposit --vault <ADDR> --amount <AMOUNT> [--from <ADDR>] [--rpc <URL>] [--dry-run]--vaultarchimedes vaults--amount--from--rpc--dry-run--dry-runarchimedes deposit --vault 0xfA364CBca915f17fEc356E35B61541fC6D4D8269 --amount 0.001 --dry-run
archimedes deposit --vault 0xfA364CBca915f17fEc356E35B61541fC6D4D8269 --amount 0.001withdraw(assets, receiver, owner, minimumReceive)archimedes withdraw --vault <ADDR> --amount <AMOUNT> [--from <ADDR>] [--slippage-bps <N>] [--rpc <URL>] [--dry-run]--vault--amount--from--slippage-bps--rpc--dry-run--dry-runarchimedes withdraw --vault 0xfA364CBca915f17fEc356E35B61541fC6D4D8269 --amount 0.001 --dry-run
archimedes withdraw --vault 0xfA364CBca915f17fEc356E35B61541fC6D4D8269 --amount 0.001
archimedes withdraw --vault 0xfA364CBca915f17fEc356E35B61541fC6D4D8269 --amount 0.001 --slippage-bps 100redeem(shares, receiver, owner, minimumReceive)archimedes redeem --vault <ADDR> [--shares <AMOUNT>] [--from <ADDR>] [--slippage-bps <N>] [--rpc <URL>] [--dry-run]--vault--shares--from--slippage-bps--rpc--dry-run--dry-runarchimedes redeem --vault 0xfA364CBca915f17fEc356E35B61541fC6D4D8269 --dry-run
archimedes redeem --vault 0xfA364CBca915f17fEc356E35B61541fC6D4D8269
archimedes redeem --vault 0xfA364CBca915f17fEc356E35B61541fC6D4D8269 --shares 0.5# Step 1: List available vaults
archimedes vaults
# Step 2: Check current position (before)
archimedes positions
# Step 3: Preview deposit
archimedes deposit --vault 0xfA364CBca915f17fEc356E35B61541fC6D4D8269 --amount 0.01 --dry-run
# Step 4: Execute deposit (will prompt for confirmation twice)
archimedes deposit --vault 0xfA364CBca915f17fEc356E35B61541fC6D4D8269 --amount 0.01# Step 1: Check current positions to find vault address and shares held
archimedes positions
# Step 2: Preview redeem
archimedes redeem --vault 0xfA364CBca915f17fEc356E35B61541fC6D4D8269 --dry-run
# Step 3: Execute redeem (will prompt for confirmation)
archimedes redeem --vault 0xfA364CBca915f17fEc356E35B61541fC6D4D8269| Error | Cause | Resolution |
|---|---|---|
| "Unknown vault address" | Vault address not in hardcoded list | Run |
| "Insufficient WETH balance" | Not enough underlying token | Check balance before depositing |
| "deposit failed" | Approve tx not confirmed yet | Retry; 15s wait between approve and deposit |
| "withdraw failed: revert" | minimumReceive too high | Increase |
| "Could not resolve wallet" | Not logged into onchainos | Run |
| RPC timeout | Public RPC unavailable | Use |
--dry-runminimumReceive--slippage-bps 0| Vault | Address | Underlying |
|---|---|---|
| WETH ETH+ Strategy (Convex) | | WETH |
| WETH Aura Weighted Strategy | | WETH |
| alUSD FRAXBP Strategy (Convex) | | crvFRAX |