{"uid":"cap_5MoQ6sZtrJzwhlKyVI6Sw","slug":"delx-mev-sandwich-upper-bound-calculator-11981dce","name":"Delx MEV Sandwich Upper Bound Calculator","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/mev-sandwich-upper?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"amount_in":{"type":"number","description":"Trade size in input asset units"},"reserve_in":{"type":"number","description":"Pool reserve of input asset"},"reserve_out":{"type":"number","description":"Pool reserve of output asset"}}},"responseSchema":{"type":"json","example":{"schema":"delx/util-mev-sandwich-upper/v1","loss_notional":0.990099009900991,"impact_fraction":0.00990099009900991}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_YWm6QR61HFfTVBOI4biM8","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the upper-bound loss and price impact fraction a trade would suffer from a MEV sandwich attack given pool reserves and trade size","exampleAgentPrompt":"I'm about to swap 1000 USDC on a pool with 500000 USDC reserve in and 450000 ETH reserve out — what's the worst-case loss I could take from a sandwich attack?","exampleUseCases":[{"title":"Pre-trade MEV risk check","prompt":"Before I submit this swap of 5000 tokens on a pool with 200000 tokens reserve in and 180000 tokens reserve out, tell me the maximum notional loss and impact fraction a sandwich bot could extract from me."},{"title":"Comparing trade sizes for MEV safety","prompt":"I'm deciding between swapping 1000 or 10000 units on a pool with 300000 reserve in and 270000 reserve out — what's the upper-bound sandwich loss for the 10000-unit trade?"},{"title":"MEV profitability analysis for a bot builder","prompt":"Given a pool with 1000000 reserve in and 950000 reserve out, and a victim trade of 50000 units, what's the maximum notional profit and impact fraction a sandwich attacker could achieve?"}],"resultDescription":"Returns a JSON object with schema tag 'delx/util-mev-sandwich-upper/v1', the upper-bound notional loss the trade would suffer (loss_notional, in input asset units), and the fractional price impact (impact_fraction as a decimal between 0 and 1) that a sandwich attacker could extract.","failureModes":["Missing required fields (amount_in, reserve_in, reserve_out) returns a validation error","Non-positive reserve or trade values may produce undefined or infinite results","Payment failure via x402 protocol results in 402 Payment Required response","Extremely large or small floating point inputs may cause precision issues"],"whenToPreferThis":"Use this endpoint when you need a fast, pay-per-call computation of the maximum value a sandwich attacker could extract from a specific AMM trade, without setting up any infrastructure. Prefer this over building custom AMM math when you want a verifiable, auditable result with exact pricing and no subscription.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:50.508Z","isFirstParty":false,"canonicalSlug":"delx-mev-sandwich-upper-bound-calculator-11981dce"}