q402_stake
Stake Q (QuackAI) tokens on BNB Chain gaslessly, selecting lock tiers from 30 to 180 days for APRs between 10% and 40%. Preview the stake first, then confirm to execute.
Instructions
WRITE - MOVES FUNDS. Stakes the Agent Wallet's Q (QuackAI) token into QuackAiStake on BNB Chain, gaslessly. Server-managed Agent Wallet path (Mode C): the server holds the encrypted key, signs the stake, and sponsors gas. Pick a lock tier (stakeType 0-3): 0=30d/10%, 1=60d/15%, 2=120d/32%, 3=180d/40% APR - longer lock, higher APR. Q is BNB-only. amount accepts "max" (stake the wallet's whole Q balance).
REQUIRES CONFIRMATION - like q402_pay, refuses to execute unless confirm:true. Call FIRST without confirm to preview (amount, tier, lock, wallet); show the user, get approval, THEN re-call with confirm:true + the consentToken.
SANDBOX BY DEFAULT - no funds move unless a live Multichain key (q402_live_*) is configured AND Q402_ENABLE_REAL_PAYMENTS=1.
RETRY SAFETY - on status="uncertain" (broadcast unconfirmed) the stake MAY have settled; do NOT blindly retry. The server dedupes identical (tier, amount) calls for 15 min.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Human-readable Q amount to stake, e.g. "1000", or "max" for the whole Q balance. | |
| confirm | No | MUST be true to actually stake - only after the user approved this exact stake. Omit to preview. | |
| walletId | No | Optional Agent Wallet address to stake from. Defaults to the owner's default wallet. | |
| stakeType | Yes | Lock tier 0-3 (0=30d/10% … 3=180d/40% APR). Longer lock = higher APR. | |
| consentToken | No | Two-phase consent token. Leave unset on the first call to preview + get a token; re-call with confirm:true + this token. |