{"uid":"cap_nx4orWzsFrvNFD_2jsLqA","slug":"stealthmark-mev-sandwich-bound-verifier-7a6a9406","name":"StealthMark MEV Sandwich Bound Verifier","description":"Autonomous Z3 Formal Invariant Prover (ERC-4626 Vaults, Polymarket Baskets, ZK Circuits, Differential Consensus) &amp; 100-Point Perimeter Security Gateway on Base Mainnet (x402 v2).","url":"https://gateway.stealthmark.io/x402/verify-mev-sandwich-bound?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"fee_bps":{"type":"integer","default":30},"reserve_in":{"type":"integer"},"reserve_out":{"type":"integer"},"slippage_bps":{"type":"integer","default":100},"user_amount_in":{"type":"integer"},"attacker_gas_cost_in":{"type":"integer","default":0}}},"responseSchema":{"type":"json","example":{"message":{"type":"string"},"verified":{"type":"boolean"},"check_type":{"type":"string"},"user_min_out":{"type":"integer"},"expected_user_out":{"type":"integer"},"optimal_frontrun_in":{"type":"integer"},"sandwich_profitable":{"type":"boolean"},"victim_sandwiched_out":{"type":"integer"},"attacker_net_profit_in":{"type":"integer"},"attacker_gross_profit_in":{"type":"integer"},"recommended_max_slippage_bps":{"type":"integer"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_aDtghWp7Vl2xSmC_wjAMe","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Formally verifies whether a MEV sandwich attack is profitable against a given AMM trade and computes the optimal frontrun size, victim output, and recommended slippage bound.","exampleAgentPrompt":"Check if my swap of 1,000,000 tokens in a pool with reserve_in 50,000,000 and reserve_out 25,000,000 is vulnerable to a sandwich attack, using a 30 bps fee and 100 bps slippage tolerance, and tell me the recommended max slippage and whether the attack would be profitable.","exampleUseCases":[{"title":"Pre-trade MEV sandwich risk check","prompt":"Before I submit this swap of 500,000 units on a pool with 10,000,000 reserve_in and 8,000,000 reserve_out, can you verify whether a sandwich attack would be profitable and what slippage cap I should use? Fee is 30 bps and my current slippage is 150 bps."},{"title":"Optimal frontrun size calculation for security audit","prompt":"I'm auditing an AMM pool with reserve_in 20,000,000 and reserve_out 15,000,000. For a user trade of 2,000,000 with 30 bps fee, 100 bps slippage, and attacker gas cost of 50,000 units, calculate the optimal frontrun amount and attacker net profit so I can document the worst-case MEV exposure."},{"title":"Recommended slippage setting for a large DeFi swap","prompt":"I'm about to do a large AMM swap of 3,000,000 tokens in a pool with 60,000,000 reserve_in and 40,000,000 reserve_out at 30 bps fee — can you tell me the recommended maximum slippage I should set to prevent being sandwiched, and confirm whether the attack would actually be profitable for a bot?"}],"resultDescription":"Returns a JSON object indicating whether a sandwich attack is profitable (sandwich_profitable), the optimal frontrun input size, expected and minimum user output, victim output under attack, attacker gross and net profit, and a recommended maximum slippage in basis points to protect the user's trade. Also includes a check_type label and a human-readable message.","failureModes":["Missing required fields (reserve_in, reserve_out, user_amount_in) return 400 validation error","Integer overflow or zero-reserve inputs may produce undefined computation results","Network or gateway errors return 5xx with no result body","Payment failure via x402 protocol returns 402 Payment Required","Extremely large integer inputs may time out or return computation errors"],"whenToPreferThis":"Use this endpoint when you need a fast, formal computation of MEV sandwich attack feasibility and bounds for a specific AMM trade before submission. It is ideal for DeFi wallets, trading bots, and security tools that want to recommend optimal slippage or flag sandwichable transactions. Prefer this over heuristic slippage estimators when you need explicit attacker profit modeling and a formally verified sandwich bound.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T12:34:36.715Z","isFirstParty":false,"canonicalSlug":"stealthmark-mev-sandwich-bound-verifier-7a6a9406"}