q402_yield_deposit
Supply stablecoins to Q402 Yield's lending market to earn APY. Preview the exact deposit for approval; sandbox mode prevents real transfers until enabled.
Instructions
WRITE - MOVES FUNDS. Supplies the Agent Wallet's stablecoin (USDC / USDT) into Q402 Yield's curated lending market for the chosen chain so it starts earning supply APY. Server-managed Agent Wallet path (Mode C): authenticated by the configured live Multichain API key - the server holds the encrypted key, signs the supply, and sponsors gas. CHAINS: 'bnb' supports USDC or USDT; 'base' supports USDC only. The actual lending venue is the chain's curated market and is reported in the markets feed and the receipt. Other chains are not yet available.
REQUIRES CONFIRMATION - like q402_pay, this tool refuses to execute unless confirm: true is set. Call it FIRST without confirm to get a one-line preview of exactly what will happen (amount, token, chain, wallet); show that to the user, get explicit approval, THEN re-call with confirm:true. Never set confirm:true on the user's behalf without that approval.
SANDBOX BY DEFAULT - like q402_pay, no funds move unless a live Multichain key (q402_live_*) is configured AND Q402_ENABLE_REAL_PAYMENTS=1. Without both, confirm:true returns a sandbox preview (no on-chain supply) with a setup hint - confirm:true alone does NOT move real funds.
RETRY SAFETY - on a timeout or an unconfirmed broadcast the tool returns status="uncertain" and echoes back the idempotencyKey it used. The deposit MAY have settled, so do NOT blindly call again - that starts a NEW deposit and can double-supply. To resume the SAME operation, re-call with idempotencyKey set to the echoed value; the server dedupes on it and replays the original result.
Use q402_yield_reserves first to show available markets + APY, and q402_yield_positions afterward to confirm the supplied balance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | Chain to supply on. 'bnb' (USDC or USDT) or 'base' (USDC only); the venue is the chain's curated lending market, reported in the receipt. | |
| token | Yes | Stablecoin to supply. USDC or USDT on bnb; USDC only on base. | |
| amount | Yes | Human-readable decimal amount to supply, e.g. "100.00". | |
| confirm | No | MUST be true to actually supply funds - set only after the user explicitly approved this exact deposit in chat. Omit (or false) to preview without moving funds. | |
| protocol | No | Optional deposit venue. 'aave' or 'lista' on bnb; 'morpho' on base. Omit for the chain's default venue. Bound into the consent token so a previewed venue can't be swapped. See q402_yield_reserves for each market's venue + APY. | |
| walletId | No | Optional Agent Wallet address to supply from when the owner holds multiple wallets. Defaults to Q402_AGENT_WALLET_ADDRESS env, then the owner's default wallet on the server. | |
| consentToken | No | Two-phase consent token. Leave unset on the first call to get a preview + token; re-call with confirm:true AND this token after the user approves. Bound to (chain, token, amount, protocol, wallet) and refused on mismatch. | |
| idempotencyKey | No | Optional durable idempotency key. Omit and the tool generates a FRESH random key per invocation, so every call executes a distinct deposit. Pass your own STABLE key only for opt-in retry-safety - re-calling with the same key replays the first result instead of double-supplying. If a call returns status="uncertain", it echoes the idempotencyKey it used - pass that exact value back here to resume the same deposit rather than start a new one. |