360 Secure SkillHub
360 安全技能中心

ava

该 Skill 让编码代理在人类设定的 mandate 额度内,通过 Ava 的 HTTP MCP 在 Base 的 Morpho Blue 以及 Aave v3 等链上执行 USDC 借贷:先建立会话取得令牌,再创建 mandate,然后以 previewHash 做两阶段预览,经人类明确同意后执行,最后返回带链上凭据的回执。此外还提供一个明确标注为测试网的模拟循环和本地 Node CLI。

kamalbuilds
kamalbuilds
热度 20.35
最近更新 2026-08-27 23:19:52
分类:自动化依赖:代码执行 / 读写文件 / 第三方 API / MCP 服务应用场景:财务 / API 集成 / 工作流 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add ava
Metadata
name
ava
description
Lend real USDC on Base from your coding agent, inside limits the human sets. Ava handles session, mandate, two-phase preview, execution, and returns a receipt with chain proof. The agent never holds a key. Works from Claude Code, Cursor, Codex, and OpenClaw over HTTP MCP (https://www.getava.xyz/mcp). Fastest connect for Claude Code, Cursor, or Codex: npx @getava-xyz/connect. Live money is ava_lend_execute on Base (Morpho); copilot tools are testnet only. Use when: (1) the human wants their agent to allocate capital under bounds they set, (2) they ask for DeFi yield from a coding session, (3) they want a recomputable track record of agent executions. Triggers: Ava, agentic finance, MCP trading, mandate, agent wallet, OpenClaw DeFi, Claude trade, Cursor finance tools.
metadata
{"openclaw":{"requires":{"env":[],"optionalEnv":["AVA_API_BASE","AVA_USER_ID","AVA_TOKEN","AVA_PORTAL","AVA_ENABLE_LIVE"]},"primaryEnv":"AVA_API_BASE","homepage":"https://getava.xyz","tags":["defi","agentic-finance","trading","mcp","openclaw","multi-chain","mandates"]}}

Ava

Ava lets a coding agent move real money without ever holding a key. The human sets a mandate: asset, chain, cap. The agent works inside it. Every live execution is two-phase: preview first, explicit human yes, then the same previewHash executes. The receipt proves the fill on chain or says plainly that it is unconfirmed.

Live today: USDC lending on Base via Morpho Blue, plus Aave v3 on Monad, BNB, and Avalanche. One session, one bearer token, HTTP MCP.

Why install this

  • The agent never sees a private key. Signing happens server side behind policy.
  • A mandate is a hard cap, not a suggestion. Exceeding it returns a typed refusal such as MANDATE_NOTIONAL_EXCEEDED.
  • Receipts state what they can prove. proof.standing: chain-confirmed means the fill is on chain. Ava never writes a receipt for a fill it cannot show.
  • A free testnet loop is included for rehearsal. It is labeled testnet and is never presented as live.

You (Claude / Cursor / OpenClaw) are one agent under a human userId. You never invent a fill. Always call tools/list on the live server. Adapters are internal settlement engines; never ask the human to pick a venue.

Install

openclaw skills install @kamalbuilds/ava

Do not install from a path inside the private Ava repo. ClawHub is the public pack: @kamalbuilds/ava.

Claude Code / Cursor / Codex, one command (not this OpenClaw pack):

npx @getava-xyz/connect

That writes HTTP MCP config after ava_session. Or add MCP yourself after ava_session:

{
  "mcpServers": {
    "ava": {
      "type": "http",
      "url": "https://www.getava.xyz/mcp",
      "headers": { "Authorization": "Bearer ava_st_YOUR_TOKEN" }
    }
  }
}

Local: http://127.0.0.1:8787/mcp

Hard rules

  1. Live money is ava_lend_execute on Base (Morpho). Never use ava_copilot_turn, ava_preview_tx, or ava_approve_execute for live or mainnet funds.
  2. Session first, and keep the token. Call ava_session once. Send the token as Authorization: Bearer <token> on every later call. A userId in tool arguments is a claim that must match the token.
  3. Default portal is Base. Do not demo Sui. Do not swap USDC to SUI.
  4. ava_create_mandate is an Ava row, not user EIP-712 consent. Say that.
  5. ava_plan_standing returns an unsigned envelope. There is no MCP authorize or revoke. Do not claim hourly rotation is live.
  6. Copilot / preview_tx / approve_execute are testnet only. ava_portfolio is seeded simulation. Never narrate them as live fills.
  7. Fail closed. Typed refusal codes are success of the gate. The LLM is not the signer, policy, or verifier.

Environment

# Defaults: AVA_API_BASE=https://api.getava.xyz, AVA_PORTAL=base.
# Local dev only: export AVA_API_BASE=http://127.0.0.1:8787
# AVA_USER_ID and AVA_TOKEN come from ava_session and are written to
# ~/.config/ava-openclaw/state.json (mode 0600). Never echo the token.

Local API: http://127.0.0.1:8787

Two loops

Loop Tools What it is
Live lend ava_session → ava_create_mandate → ava_lend_execute Morpho Blue on Base. Two-phase previewHash.
Testnet (not live) ava_copilot_turn → ava_preview_tx → ava_approve_execute Simulated quote. Not a live path.

If the user wants real DeFi, use the live lend loop. Copilot is not a fallback and not a rehearsal of ava_lend_execute.

Live lend SOP (Mode A)

1. ava_session                                              → userId + bearer token
2. connect https://www.getava.xyz/mcp with Authorization: Bearer
3. ava_create_mandate { portal: base, lend-only USDC }      → mandateId (unsigned Ava row)
4. ava_lend_execute without previewHash                     → preview artifact + hash
5. show preview; wait for explicit human yes
6. ava_lend_execute with the same mandateId + previewHash
7. return receipt. Success is proof.standing: chain-confirmed

Never retry after an ambiguous sign or submit. A new executionId is a new economic action. Stop on LEND_INSUFFICIENT_BALANCE.

Example

User: "Lend 100 USDC on Base with Morpho, under a tight mandate."

ava_session
→ connect https://www.getava.xyz/mcp with Bearer token
→ ava_create_mandate (portal: base, lend-only USDC on Morpho)
→ ava_lend_execute (no previewHash) → show preview, wait for yes
→ ava_lend_execute (same mandateId + previewHash)
→ receipt with proof.standing: chain-confirmed

verified: true with unconfirmed standing is not a fill. ok: true with filled: false is not a fill.

CLI

node scripts/ava.mjs health
node scripts/ava.mjs session
node scripts/ava.mjs tools
node scripts/ava.mjs call ava_create_mandate '{"portal":"base","message":"Earn on 500 USDC on Base, max 5% drawdown"}'
node scripts/ava.mjs lend <mandateId>
# show preview to the human, then:
node scripts/ava.mjs lend <mandateId> <previewHash>
node scripts/ava.mjs portfolio

Testnet-only (not live capital):

node scripts/ava.mjs turn "Swap 10 USDC to WETH on base with 50 bps slip"
node scripts/ava.mjs approve <executionId>

Proven venues

Re-check with tools/list on the live server. Proven: Morpho Blue on Base, Aave v3 on Monad / BNB / Avalanche. Do not list CoW, Jupiter, Cetus, Hyperliquid, Pendle, or Euler as live.

Docs

  • docs/MCP.md: protocol; tools/list is truth
  • docs/AGENTS.md: coding-agent connect
  • research/progress/AGENTS_ARE_THE_USERS.md: positioning lock