{"uid":"cap_BG-ByrQpBrE9RW2ZKCty1","slug":"stealthmark-erc-4626-inflation-guard-formal-verifier-7c062b2a","name":"StealthMark ERC-4626 Inflation Guard Formal 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-erc4626-inflation-guard?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"redeem_fn_code":{"type":"string"},"victim_deposit":{"type":"integer","default":9999},"deposit_fn_code":{"type":"string"},"attacker_donation":{"type":"integer","default":10000},"virtual_assets_offset":{"type":"integer","default":0},"virtual_shares_offset":{"type":"integer","default":0},"attacker_initial_deposit":{"type":"integer","default":1}}},"responseSchema":{"type":"json","example":{"message":{"type":"string"},"verified":{"type":"boolean"},"check_type":{"type":"string"},"solver_mode":{"type":"string"},"counterexample":{"type":["object","null"]},"inflation_vulnerable":{"type":"boolean"},"victim_shares_minted":{"type":"integer"},"recommended_virtual_offset":{"type":"integer"},"min_donation_for_zero_shares":{"type":["integer","null"]}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.03","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.03/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_NByds0dolId6qga2oc2Z2","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.03","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Uses Z3 SMT solver to formally verify whether an ERC-4626 vault implementation is vulnerable to share-price inflation attacks, returning a proof or counterexample.","exampleAgentPrompt":"Run a Z3 formal proof on my ERC-4626 vault — use this deposit function code and this redeem function code, simulate an attacker making an initial deposit of 1 and donating 10000 assets against a victim deposit of 9999, with no virtual offset, and tell me if inflation is possible and what the minimum donation for zero shares would be.","exampleUseCases":[{"title":"Pre-deployment vault inflation audit","prompt":"Before I deploy my new ERC-4626 vault, run a formal Z3 verification on these deposit and redeem functions with an attacker initial deposit of 1 and a donation of 10000 against a victim of 9999 — tell me if the vault is inflation-vulnerable and what virtual offset I should add to fix it."},{"title":"Validating virtual offset mitigation","prompt":"I've added a virtual assets offset of 1000 and virtual shares offset of 1000 to my vault — can you formally prove with Z3 that these offsets are sufficient to prevent an attacker with an initial deposit of 1 and a donation of 50000 from causing a victim depositing 9999 to receive zero shares?"},{"title":"Finding griefing threshold for a live vault","prompt":"For this vault's deposit and redeem code, what is the minimum donation amount an attacker needs to make a victim depositing 9999 receive zero shares, assuming the attacker's initial deposit is 1 and there's no virtual offset?"}],"resultDescription":"A JSON object containing: a boolean 'inflation_vulnerable' flag, the number of 'victim_shares_minted' in the simulated scenario, a 'verified' boolean indicating proof success, a 'counterexample' object (or null) showing concrete attack parameters if vulnerable, a 'recommended_virtual_offset' integer suggesting a safe mitigation value, the 'min_donation_for_zero_shares' integer (or null), the solver mode used, and a human-readable 'message' and 'check_type' describing the result.","failureModes":["Invalid or unparseable Solidity function code returns an error message","Z3 solver timeout for extremely complex vault logic","Missing required fields (deposit_fn_code or redeem_fn_code) causes 400 error","Payment failure via x402 protocol returns 402 Payment Required","Solver returns unknown result for undecidable invariants","Malformed integer inputs cause validation errors"],"whenToPreferThis":"Choose this endpoint when you need a formal, mathematically rigorous proof (not a heuristic scan) that an ERC-4626 vault's share minting logic is free from inflation/griefing attacks. It is specifically designed for the ERC-4626 standard's deposit/redeem pattern and returns actionable remediation (recommended virtual offset), making it ideal for pre-deployment security checks or post-incident root cause analysis of vault share manipulation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T12:36:12.076Z","isFirstParty":false,"canonicalSlug":"stealthmark-erc-4626-inflation-guard-formal-verifier-7c062b2a"}