{"uid":"cap_48zBN1QcGlitmi6tpYlzI","slug":"amm-invariant-monitor-381d2fd5","name":"AMM Invariant Monitor","description":"AMM Invariant Monitor analyses only the evidence supplied by the caller. It does not claim to query a chain, identify a legal status or replace an independent audit. Missing signals lower confidence and are listed explicitly; every classification includes the exact thresholds used.","url":"https://mev.halowerk.com/v1/amm-invariant-monitor?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"strict":{"type":"boolean","default":false,"description":"Reject unless all documented metrics are supplied."},"context":{"type":"object","description":"Optional non-secret labels returned unchanged for correlation.","maxProperties":20,"additionalProperties":{"type":["string","number","boolean","null"]}},"subject":{"type":"string","maxLength":256,"minLength":1,"description":"Address, transaction, protocol, asset, proposal or other subject being assessed."},"evidence":{"type":"array","items":{"type":"object","required":["metric","value"],"properties":{"note":{"type":"string","maxLength":500},"value":{"type":["number","boolean"]},"metric":{"enum":["invariant_deviation_pct","reserve_mismatch_pct","unexplained_delta_count"],"type":"string"},"source":{"type":"string","maxLength":300,"minLength":1,"description":"Evidence source or query identifier."},"timestamp":{"type":"string","maxLength":40,"minLength":10,"description":"ISO-8601 observation time."}},"additionalProperties":false},"maxItems":50,"minItems":1,"description":"Caller-supplied observations. Repeated metrics form a time series; the newest timestamp is assessed."}}},"responseSchema":null,"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_Q_dH4IxbhnQOFYYZFfzvJ","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":"Analyzes caller-supplied evidence to detect AMM invariant deviations, reserve mismatches, and unexplained deltas, returning a confidence-weighted classification with explicit thresholds.","exampleAgentPrompt":"Check this AMM pool address 0xABC123...def for invariant violations — I have an invariant deviation of 2.3%, a reserve mismatch of 0.8%, and 4 unexplained deltas observed at 2024-06-15T14:32:00Z from my Uniswap subgraph query.","exampleUseCases":[{"title":"Post-swap manipulation check","prompt":"I just saw a suspicious large swap on pool 0xDEAD...BEEF — can you assess it for invariant violations? Invariant deviation is 5.1%, reserve mismatch is 1.4%, and I recorded 7 unexplained deltas at 2024-06-20T09:15:00Z from my Dune query."},{"title":"Pre-trade AMM integrity verification","prompt":"Before I route a $500k trade through this Curve pool at address 0x1234...5678, check its integrity — I've got reserve mismatch at 0.2%, invariant deviation at 0.05%, and zero unexplained deltas as of 2024-06-21T08:00:00Z from my own RPC node."},{"title":"Real-time MEV alert triage","prompt":"We're seeing weird activity on pool 0xCAFE...BABE — run an AMM invariant monitor assessment with strict mode off; invariant deviation is 12.7%, reserve mismatch is 3.2%, and 15 unexplained deltas from our block explorer feed at 2024-06-21T11:45:00Z."}],"resultDescription":"Returns a classification of the AMM pool's invariant health with confidence score, the exact thresholds applied, a list of any missing signals that lowered confidence, and the assessed values for invariant_deviation_pct, reserve_mismatch_pct, and unexplained_delta_count based on the newest-timestamped evidence supplied.","failureModes":["Missing required evidence items cause reduced confidence or rejection in strict mode","Malformed ISO-8601 timestamps result in evidence being ignored or errored","Supplying no evidence or an empty array returns a validation error","Strict mode enabled with incomplete metrics returns a rejection response","Unrecognized metric names are rejected by schema validation"],"whenToPreferThis":"Use this endpoint when you have caller-supplied AMM metric observations and need a fast, explainable invariant-health classification without requiring direct chain access — especially useful for MEV alerting pipelines, pre-trade risk checks, or audit workflows where you already have reserve and delta data extracted from subgraphs, RPC nodes, or block explorers.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T12:32:05.229Z","isFirstParty":false,"canonicalSlug":"amm-invariant-monitor-381d2fd5"}