{"uid":"cap_hHadsgM9YHrldL7nBL8PX","slug":"defiexec-build-cf526250","name":"defiexec-build","description":"Non-custodial yield deposit/redeem calldata for Base: give protocol (aave-v3, compound-v3 or erc4626), asset or vault, raw amount, action and recipient; we read the protocol on-chain state and return ready-to-sign transaction calldata plus the ERC-20 approval (deposit only) and the expected shares or assets. You sign with your own wallet — we never hold or move funds.","url":"https://api.agentstools.dev/yield/build","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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["protocol","amount","recipient"],"properties":{"asset":{"type":"string","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","description":"For erc4626: the vault 0x address (ANY Base ERC-4626) or a seed slug. Resolved on-chain."},"action":{"enum":["deposit","redeem"],"type":"string","description":"deposit (supply) or redeem (withdraw). Default deposit."},"amount":{"type":"string","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","description":"Yield protocol: aave-v3, compound-v3 or erc4626."},"recipient":{"type":"string","description":"0x address that supplies/receives (baked into calldata)."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_iE5jPSj34jDEIWth8DhQw","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates ready-to-sign EVM calldata for depositing into or redeeming from Aave v3, Compound v3, or any ERC-4626 vault on Base, including ERC-20 approval calldata and expected output amounts.","exampleAgentPrompt":"Build me the deposit calldata to supply 1000000000 USDC (raw units) into Aave v3 on Base for my wallet 0xAbC123...def456 — I need the approval tx and the expected aTokens too.","exampleUseCases":[{"title":"Aave v3 USDC yield deposit","prompt":"Generate the calldata to deposit 500000000 raw USDC into Aave v3 on Base, with recipient 0xDEAD...BEEF — I want the ERC-20 approval data and how many aTokens I should expect back."},{"title":"Compound v3 max redeem","prompt":"Build me the redeem calldata for Compound v3 on Base to withdraw max USDC to my wallet 0x1234...5678 — I want to pull everything out at once."},{"title":"ERC-4626 vault share redemption","prompt":"I want to redeem 200000000 shares from the ERC-4626 vault at 0xVault...Addr on Base back to 0xMyWallet...here — can you give me the ready-to-sign transaction calldata?"}],"resultDescription":"Returns ready-to-sign transaction calldata for the deposit or redeem action, an ERC-20 approval calldata object (for deposits), and the expected number of shares (on deposit) or underlying assets (on redeem) based on current on-chain protocol state.","failureModes":["Unsupported protocol specified — only aave-v3, compound-v3, erc4626 accepted","Invalid or unrecognized asset symbol for the specified protocol","Vault address not resolvable on-chain for erc4626","Amount of zero or malformed raw amount string","Invalid recipient address format","Compound III requested with non-base asset — only base asset earns yield","On-chain state read failure or RPC timeout","Payment not received — x402 payment required before response"],"whenToPreferThis":"Use this endpoint when you need non-custodial, ready-to-sign calldata for Base yield protocols (Aave v3, Compound v3, or any ERC-4626 vault) without connecting to a wallet SDK or writing contract interaction code. Ideal for AI agents that need to automate DeFi yield strategies while keeping the user in full custody of their funds.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:47:28.062Z","isFirstParty":false}