{"uid":"cap_pQd6v2FRvIUyWQXx836SW","slug":"defi-yield-preview-base-6c3b4676","name":"DeFi Yield Preview (Base)","description":"Lightweight yield preview for Base without calldata: give protocol, asset or vault, raw amount and action and get the expected shares or assets and the safety flags (paused/frozen/cap, empty-vault inflation risk). A cheap check before you build the full transaction.","url":"https://api.agentstools.dev/yield/preview","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"],"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."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_RQyisOz9TCbGQSNTTI0cK","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns expected shares/assets and safety flags for a proposed yield deposit or redeem on Base, without building the full transaction calldata.","exampleAgentPrompt":"Before I deposit 1000000 USDC (in raw atomic units) into Aave v3 on Base, can you preview how many shares I'd get and check whether the pool is paused or frozen?","exampleUseCases":[{"title":"Safe Aave deposit preflight check","prompt":"I want to deposit 5000000000 raw USDC into Aave v3 on Base — can you preview the expected aTokens I'd receive and tell me if there are any safety issues like the pool being paused or at cap?"},{"title":"ERC-4626 vault redeem simulation","prompt":"I'm about to redeem 250000 shares from this ERC-4626 vault on Base at address 0xAbC123... — can you simulate what underlying assets I'd get back and flag any inflation or empty-vault risks before I build the transaction?"},{"title":"Compound v3 deposit safety check","prompt":"Check what I'd get depositing 2000000000 raw USDC into Compound v3 on Base and let me know if the market is frozen or at its supply cap before I proceed."}],"resultDescription":"Returns the expected output amount (shares for a deposit, or underlying assets for a redeem) in raw atomic units, along with safety flags indicating whether the protocol or vault is paused, frozen, at capacity, or at risk of share inflation (for empty ERC-4626 vaults). This is a read-only simulation — no transaction is built or submitted.","failureModes":["Unknown or unsupported asset symbol returns an error","Invalid vault address that cannot be resolved on-chain","Amount of zero or non-numeric amount string","Protocol enum value not one of aave-v3, compound-v3, erc4626","Vault is resolvable but empty, triggering inflation risk flag rather than a hard error","Network or RPC timeout when fetching on-chain state","Payment failure (x402) if USDC payment not included"],"whenToPreferThis":"Use this endpoint as a cheap read-only preflight step before calling defiexec-build to construct the actual calldata. It is ideal when you need to verify expected output amounts, check safety flags, or confirm a vault is not paused/frozen/at-cap before committing to a transaction. Prefer it over directly building a transaction when you want to surface risks (e.g. ERC-4626 inflation attacks on empty vaults) without spending gas or exposing private keys. It covers Aave v3, Compound v3, and any Base ERC-4626 vault.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:46:25.701Z","isFirstParty":false}