{"uid":"cap_AUWZPw2gSvuYHvLoEv-c3","slug":"constant-product-swap-output-estimate-single-calculation-db0edf4f","name":"Constant-Product Swap Output Estimate — Single Calculation","description":"Constant-product swap output estimate — Single calculation: Single calculation for Constant-product swap output estimate. Supplied token observations only. Deterministic calculation or caller-threshold verdict, not a live scan, safety proof or trade recommendation. Specialised preset in a shared 50-profile, 20-operation engine. 0.01 USDC includes one bounded single calculation report.","url":"https://market.datapackvibe.com/x402/assistant-bx-token-cp-output-calculate?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"values":{"type":"object","default":{"fee_percent":0.3,"input_tokens":100,"input_reserve":10000,"output_reserve":20000},"required":["input_reserve","output_reserve","input_tokens","fee_percent"],"properties":{"fee_percent":{"type":"number","default":0.3,"maximum":100,"minimum":0},"input_tokens":{"type":"number","default":100,"maximum":10000000000000000,"minimum":0,"exclusiveMinimum":0},"input_reserve":{"type":"number","default":10000,"maximum":10000000000000000,"minimum":0,"exclusiveMinimum":0},"output_reserve":{"type":"number","default":20000,"maximum":10000000000000000,"minimum":0,"exclusiveMinimum":0}},"additionalProperties":false}}},"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_rPE7dDywcOAvA_4YckT6D","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":"Calculates the estimated output token amount for a constant-product AMM swap given input tokens, reserves, and fee percentage.","exampleAgentPrompt":"Calculate how many output tokens I'd get if I swap 100 input tokens, with an input reserve of 10000, output reserve of 20000, and a 0.3% fee using the constant-product formula.","exampleUseCases":[{"title":"Pre-trade AMM output check","prompt":"Before I execute a trade, estimate how many output tokens I'll receive if I put in 500 tokens into a pool with 50000 input reserve and 80000 output reserve at a 0.3% fee."},{"title":"Fee sensitivity analysis for DEX swap","prompt":"Compare the output tokens I'd get swapping 1000 tokens against reserves of 200000 in and 150000 out, first at a 0.25% fee and then at a 1% fee using the constant-product model."},{"title":"Slippage estimation for large trade","prompt":"I'm planning a big swap — 50000 input tokens with an input reserve of 500000 and output reserve of 400000 at 0.3% fee. Use the constant-product formula to tell me my estimated output so I can gauge slippage."}],"resultDescription":"Returns a deterministic numeric estimate of the output token amount produced by a constant-product (x*y=k) AMM swap, given the specified input amount, pool reserves, and fee percentage. The result is a bounded single-calculation report, not a live quote or safety recommendation.","failureModes":["Input tokens or reserves set to zero or negative values — schema enforces exclusiveMinimum > 0","Fee percentage outside 0–100 range — schema validation error","Missing required fields (input_reserve, output_reserve, input_tokens, fee_percent) — request rejected","Extremely large values near the maximum (1e16) may produce numerical precision edge cases"],"whenToPreferThis":"Choose this endpoint when you need a fast, deterministic constant-product AMM swap output estimate for a single set of parameters without requiring live on-chain data, real-time price feeds, or trade execution. Ideal for pre-trade analysis, slippage estimation, educational tools, or building DeFi calculators where x*y=k formula accuracy is sufficient.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-01T07:44:59.422Z","isFirstParty":false,"canonicalSlug":"constant-product-swap-output-estimate-single-calculation-db0edf4f"}