{"uid":"cap_glc321SK_eS6vvy9EtBe7","slug":"stealthmark-vault-rounding-formal-verifier-838e308a","name":"StealthMark Vault & Rounding 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-vault-and-rounding?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"max_assets":{"type":"integer","default":10000},"max_shares":{"type":"integer","default":10000},"redeem_fn_code":{"type":"string","description":"Python/AST code for preview_redeem"},"deposit_fn_code":{"type":"string","description":"Python/AST code for preview_deposit"},"check_zero_share_mint":{"type":"boolean","default":false}}},"responseSchema":{"type":"json","example":{"message":{"type":"string"},"verified":{"type":"boolean"},"check_type":{"type":"string"},"solver_mode":{"type":"string"},"counterexample":{"type":["object","null"]}}},"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_ENK0C3ja3efBi-MjV6lO1","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":"Uses Z3 SMT solver to formally verify ERC-4626 vault rounding invariants (deposit/redeem functions), detecting counterexamples including zero-share minting vulnerabilities.","exampleAgentPrompt":"Run a Z3 formal proof on my ERC-4626 vault — here's the preview_deposit code and preview_redeem code, check up to 10000 assets and 10000 shares, and also check for the zero-share minting vulnerability.","exampleUseCases":[{"title":"Audit vault deposit/redeem rounding","prompt":"I need to formally verify my ERC-4626 vault's rounding invariants — here's the Python AST code for preview_deposit and preview_redeem, with a max of 5000 assets and 5000 shares. Tell me if Z3 can find any counterexample that breaks the invariant."},{"title":"Detect zero-share minting attack vector","prompt":"Can you check my vault's preview_deposit function for the zero-share minting vulnerability? Here's the code — use max_assets of 10000 and max_shares of 10000 and enable the zero-share mint check."},{"title":"Pre-deployment vault security gate","prompt":"Before I deploy this vault, run a formal proof on the preview_redeem function with max_assets 8000 and max_shares 8000 — I want to know if any integer combination produces a rounding counterexample that could be exploited."}],"resultDescription":"Returns a JSON object with: a boolean 'verified' indicating whether all invariants hold, a 'message' describing the result, a 'check_type' identifying which invariant was checked, a 'solver_mode' indicating how Z3 was run, and a 'counterexample' object (or null) showing specific asset/share values that break the invariant if one is found.","failureModes":["Invalid Python/AST code in redeem_fn_code or deposit_fn_code returns parse error","max_assets or max_shares too large may cause solver timeout","Solver returns unknown if the formula is undecidable within resource limits","Missing required function code fields returns 400 validation error","Payment failure via x402 protocol blocks the request"],"whenToPreferThis":"Choose this endpoint when you need automated, formal (mathematically exhaustive) verification of ERC-4626 vault rounding logic rather than property-based testing or manual auditing. It is specifically suited for detecting counterexamples within bounded integer ranges and catching zero-share minting vulnerabilities before deployment, making it ideal as a CI/CD security gate for vault contracts.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-16T18:33:26.720Z","isFirstParty":false,"canonicalSlug":"stealthmark-vault-rounding-formal-verifier-838e308a"}