
Quack AI · 2026-11-11 13:20 UTC
Idle balances, working: yield from an agent wallet on Q402 An agent that pays for things needs a float. I top up its wallet with more than today's spend, because I do not want it stalling on an empty balance halfway through a task. So most of the time, most of that balance does nothing. With people, the usual answer to idle cash is to move it somewhere that pays interest: a savings account, or an exchange's earn product. Both have the same shape: the money leaves your hands and sits in someone else's account until you ask for it back. For an agent wallet that shape is awkward. The whole point of a separate Agent Wallet is a clear boundary around what the agent can touch, and an off-ramp to a third-party account breaks it. Q402 has a section in its docs called "Yield · Curated lending vaults" that takes a different route. Its description: "Supply and withdraw stablecoins straight from an Agent Wallet across curated DeFi lending vaults." On BNB Chain that means USDC or USDT; on Base, a curated USDC vault. The protocols listed are Aave, Morpho and Lista, and the MCP source also names Zircuit Finance as a Base venue. Gas for supply and withdraw is sponsored by the EIP-7702 relay. Who does what Five MCP tools cover the path. Step 1. The agent looks at the market. q402_yield_reserves lists each market's protocol, chain, asset, market address and current supply APY. It needs no auth and moves no funds. Step 2. The agent proposes a deposit. q402_yield_deposit takes a chain (bnb or base), a token, an amount, and optionally a protocol: aave or lista on BNB, morpho or zircuit on Base. Called without confirm, it returns a one-line preview and a consent token. Nothing moves. Step 3. You approve. The tool refuses to execute unless confirm: true is set, and the consent token is bound to chain, token, amount, protocol and wallet. A previewed deposit cannot be swapped for a different one on the confirm call. Step 4. Q402's server signs. Yield runs in Mode C, the server-managed Agent Wallet. In the source's words: "the server holds the encrypted key, signs the supply, and sponsors gas." Step 5. The position appears. q402_yield_positions shows each position's current value and live APY. It does not break out principal and interest separately, and the tool description tells agents not to invent an earnings figure. Step 6. The agent withdraws. q402_yield_withdraw sends funds "back to the Agent Wallet", with the same confirm-and-preview pattern. amount: "max" means the maximum currently redeemable, which vault caps or queues can leave below the full position. The docs say withdraw is "Always allowed, even after a plan downgrade." Zircuit adds one more state. A Zircuit withdrawal is a queued request, not an instant transfer. The result has status pending and a requestId, and USDC arrives "usually within 24 hours, up to 14 days." While it is pending, q402_yield_cancel cancels it and the queued shares return to the position. The source also notes that Zircuit deposits are not available from the US or sanctioned regions. One detail matters for agents. On a timeout, deposit and withdraw return status: "uncertain" and echo the idempotencyKey they used. Re-calling with that key resumes the same operation instead of supplying twice. What keeps this path bounded Funds go from the Agent Wallet into a curated vault, and come back to the same wallet. There is no transfer to an exchange account and no address the agent chooses. The protocol is picked from a fixed list, and the consent token pins it. Real funds move under two conditions: a live Multichain key (q402_live_...) and Q402_ENABLE_REAL_PAYMENTS=1. Without both, confirm: true returns a sandbox preview. The docs also mark deposit as a paid feature: "Trial cannot deposit." Mode C is custodial, and the docs say so: "Q402 custodies an AES-256-GCM-encrypted key you can export or archive anytime." Your personal wallet stays out of this path. The docs list per-transaction and daily caps as the Agent Wallet's spend limits; they do not say whether those caps also count yield deposits, so I would not treat them as the limit on this path. How to wire it up Step 1. Install the MCP server in Claude Code: claude mcp add q402 -- npx -y @quackai/q402-mcp Step 2. Restart, then ask your agent to "Set up Q402". It runs q402_doctor, which creates ~/.q402/mcp.env and walks you through pasting keys into the file, not into the chat. Step 3. Configure Mode C. Leave both private key lines blank and set a Multichain key: Q402_MULTICHAIN_API_KEY=q402_live_... (paid Multichain key) Q402_PRIVATE_KEY= (blank for Mode C) Q402_AGENTIC_PRIVATE_KEY= (blank for Mode C) Q402_ENABLE_REAL_PAYMENTS=1 (0 forces sandbox) Step 4. Restart, run q402_doctor again, then try a prompt like: Show me the Q402 Yield markets on BNB, then preview a 100 USDC deposit. The agent should call q402_yield_reserves, then preview the deposit without confirm. Closing Idle cash is an old problem. What changes with agents is who is allowed to move it, and where it is allowed to go. Here the answer is narrow: from the agent's own wallet, into a vault on a fixed list, after you approve the exact amount, and back to the same wallet. That narrowness is what makes it reasonable to let an agent do it at all.
Loading the story on Tree News…