{"uid":"cap_JMVb8smxugaiIZdW2YguQ","slug":"halowerk-defiwerk-mev-risk-analyzer-1b075383","name":"HALOWERK defiwerk MEV Risk Analyzer","description":"Takes chain, token pair, input amount and slippage tolerance, finds the pool the trade would most likely use and reads its live state. The maximum the caller can lose is arithmetic and exact: the gap between the quoted output and the minimum output their own tolerance permits. The attacker profit is an estimate and labelled as one — the profit-maximising front-run size is searched for inside a constant-liquidity pool model, bounded by the largest front-run the caller own tolerance still permits,","url":"https://defi.halowerk.com/mev/risk","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"chain":{"enum":["base","ethereum","arbitrum","optimism","polygon"],"type":"string"},"route":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Optional pool address to assess instead of the automatically chosen one."},"token_in":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"amount_in":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Input amount in whole token units as a decimal string."},"token_out":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"scan_history":{"type":"boolean","default":true,"description":"Scan past Swap events for actual sandwiches. Costs time; switch off for a faster answer."},"slippage_bps":{"type":"integer","default":50,"maximum":5000,"minimum":1}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.006","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.006/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm__pJVo1AqP9odIaPQFjtOj","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.006","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Assesses MEV sandwich attack risk for a DEX swap by finding the likely pool, reading its live state, and computing the exact maximum loss and estimated attacker profit from front-running.","exampleAgentPrompt":"Before I swap 5000 USDC for WETH on Base with 50 basis points of slippage tolerance, can you check my MEV sandwich risk — how much could I lose at most, and what's the estimated profit an attacker could extract?","exampleUseCases":[{"title":"Pre-trade MEV check on Arbitrum","prompt":"I'm about to swap 20000 USDC into WBTC on Arbitrum with 30 bps slippage — can you run a sandwich attack risk check and tell me the worst-case loss and estimated attacker profit before I send the transaction?"},{"title":"Slippage tolerance calibration on Ethereum","prompt":"I want to trade 1 ETH for DAI on Ethereum and I'm considering 100 bps slippage. What's my sandwich risk at that tolerance level — what's the maximum I could lose and how profitable would front-running me be for an attacker?"},{"title":"Historical sandwich scan for a pool","prompt":"Can you check whether the USDC/ETH pool on Polygon has actually been sandwiched recently, and also estimate my MEV exposure if I trade 3000 USDC in with 50 bps slippage — enable the historical scan so I get real past attack data too?"}],"resultDescription":"Returns the exact arithmetic maximum loss (gap between quoted output and minimum output allowed by slippage), the estimated attacker profit from the optimal front-run size under a constant-liquidity pool model bounded by the caller's slippage tolerance, and supporting data including pool state, quoted output, and minimum output. If scan_history is enabled, also returns findings from historical Swap event analysis for actual past sandwiches.","failureModes":["Pool not found for the given chain and token pair — returns error if no liquidity pool can be resolved","Invalid token address format — returns validation error for non-checksummed or malformed addresses","Unsupported chain — only base, ethereum, arbitrum, optimism, polygon are valid","amount_in outside acceptable range — very small or very large amounts may cause computation errors","RPC or on-chain data unavailability — live pool state read may fail if node is unreachable","scan_history=true significantly increases latency and may time out for high-volume pools"],"whenToPreferThis":"Use this endpoint when you need a quantitative, on-chain MEV sandwich risk assessment before executing a DEX swap — specifically when you want the exact worst-case loss bounded by slippage and an estimated attacker profit derived from a constant-liquidity model. Prefer this over generic slippage calculators when MEV exposure (not just price impact) is the concern, or when you need historical sandwich evidence for a specific pool.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:40:24.946Z","isFirstParty":false}