{"uid":"cap_UdHK4prvnxN8LvY-TGTSl","slug":"defi-yield-transaction-builder-aave-v3-compound-v3-erc-4626-0cdd701f","name":"DeFi Yield Transaction Builder (Aave v3 / Compound v3 / ERC-4626)","description":"X402 micropayments server — AI agents pay USDC for OFAC screening, rates, and billing verification.","url":"https://x402helper.xyz/89e509/yield/build?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["protocol","amount","recipient"],"properties":{"asset":{"type":"string","default":null,"description":"For aave-v3/compound-v3: the asset symbol (USDC, WETH, ...) or a 0x ERC-20 address. Compound III earns only on its base asset."},"vault":{"type":"string","default":null,"description":"For erc4626: the vault 0x address (ANY Base ERC-4626) or a seed slug. Resolved on-chain."},"action":{"enum":["deposit","redeem"],"type":"string","default":null,"description":"deposit (supply) or redeem (withdraw). Default deposit."},"amount":{"type":"string","default":null,"description":"Raw atomic units. deposit: underlying assets. redeem: aave/comet = underlying (or 'max'); erc4626 = shares (or 'max')."},"protocol":{"enum":["aave-v3","compound-v3","erc4626"],"type":"string","default":null,"description":"Yield protocol: aave-v3, compound-v3 or erc4626."},"recipient":{"type":"string","default":null,"description":"0x address that supplies/receives (baked into calldata)."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"result":{},"success":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.065","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.065/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.065","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.065","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_b4Y9yNxbYZyQxoHHL11DQ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.065","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Builds on-chain calldata for depositing or redeeming assets in Aave v3, Compound v3, or any ERC-4626 vault on Base, paid via x402 USDC micropayment.","exampleAgentPrompt":"Build me the deposit calldata to supply 1000000 USDC (atomic units) into Aave v3 for recipient address 0xAbC1234567890abcdef1234567890abcdef12345 on Base.","exampleUseCases":[{"title":"Aave v3 USDC deposit calldata","prompt":"Generate the calldata to deposit 500000 atomic units of USDC into Aave v3 for my wallet 0xAbC1234567890abcdef1234567890abcdef12345."},{"title":"ERC-4626 vault share redemption","prompt":"Build me a redeem transaction for my ERC-4626 vault at 0xVault1234567890abcdef1234567890abcdef5678 — I want to redeem 250000 shares and send the underlying to 0xMyWallet1234567890abcdef1234567890abcd."},{"title":"Compound v3 max withdrawal","prompt":"Create the calldata to redeem max USDC from Compound v3 for recipient 0xRecip1234567890abcdef1234567890abcdef9999."}],"resultDescription":"Returns a JSON object with a 'success' boolean and a 'result' object containing the encoded transaction calldata ready to be broadcast on Base for the specified yield protocol action (deposit or redeem).","failureModes":["Missing required query params (protocol, amount, recipient) returns an error","Invalid or unsupported asset symbol for the chosen protocol","Vault address not found or not a valid ERC-4626 contract","Payment not completed — x402 micropayment of $0.065 USDC must succeed before response is returned","Malformed recipient address (non-0x or wrong length)","Protocol/asset combination unsupported (e.g. non-base asset on Compound v3)"],"whenToPreferThis":"Choose this endpoint when you need programmatically generated, ready-to-broadcast calldata for DeFi yield operations on Base (Aave v3, Compound v3, or any ERC-4626 vault) and you are operating in an x402-capable agent environment that can pay USDC micropayments automatically. Prefer this over manual ABI encoding when you want a single HTTP call to produce correct calldata without maintaining protocol ABIs.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:42:16.612Z","isFirstParty":false,"canonicalSlug":"defi-yield-transaction-builder-aave-v3-compound-v3-erc-4626-0cdd701f"}