{"uid":"cap_xnEp_8m-8FLkwHqhgXxDu","slug":"stealthmark-liquidation-waterfall-verifier-ce8126b5","name":"StealthMark Liquidation Waterfall 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-liquidation-waterfall?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"debt_value":{"type":"integer"},"close_factor_bps":{"type":"integer","default":5000},"collateral_value":{"type":"integer"},"liquidation_bonus_bps":{"type":"integer","default":500},"insurance_fund_balance":{"type":"integer","default":0},"liquidation_threshold_bps":{"type":"integer","default":8500}}},"responseSchema":{"type":"json","example":{"message":{"type":"string"},"verified":{"type":"boolean"},"check_type":{"type":"string"},"repaid_debt":{"type":"integer"},"liquidatable":{"type":"boolean"},"socialized_loss":{"type":"integer"},"health_factor_bps":{"type":"integer"},"seized_collateral":{"type":"integer"},"bad_debt_remaining":{"type":"integer"},"insurance_fund_sufficient":{"type":"boolean"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.04","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.04/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_9LV1hv6iG3XsKgQvZpxWs","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.04","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Formally verifies DeFi liquidation waterfall mechanics — health factor, repayable debt, seized collateral, bad debt, and insurance fund sufficiency — given loan position parameters.","exampleAgentPrompt":"Can you formally verify the liquidation waterfall for a loan with 10000 units of debt, 8000 units of collateral, a liquidation threshold of 8500 bps, close factor of 5000 bps, liquidation bonus of 500 bps, and no insurance fund — tell me if it's liquidatable, how much debt gets repaid, how much collateral is seized, and whether any bad debt remains?","exampleUseCases":[{"title":"Undercollateralized position check","prompt":"I have a DeFi loan with 15000 units of debt and 12000 units of collateral — using a liquidation threshold of 8500 bps, close factor of 5000 bps, and a 500 bps liquidation bonus. Can you verify the liquidation waterfall and tell me if the position is liquidatable, what gets repaid, and how much bad debt is left?"},{"title":"Insurance fund sufficiency check","prompt":"Can you check if our insurance fund balance of 50000 units is sufficient to cover bad debt on a loan with 20000 debt and 16000 collateral, using an 8500 bps liquidation threshold, 5000 bps close factor, and 500 bps bonus?"},{"title":"DeFi risk monitoring for lending protocol","prompt":"I'm monitoring a lending vault and want to know the health factor in bps for a position with 9000 debt and 10000 collateral at an 8500 bps liquidation threshold — also tell me if it would be liquidatable and whether any loss would be socialized."}],"resultDescription":"Returns a JSON object with: a boolean indicating if the position is liquidatable, the computed health factor in basis points, the amount of debt that would be repaid, the amount of collateral that would be seized, the bad debt remaining after liquidation, the amount of socialized loss (if any), whether the insurance fund is sufficient, a check_type label, a human-readable message, and a top-level verified boolean confirming the formal proof passed.","failureModes":["Missing required fields (debt_value, collateral_value) results in a 400 error","Non-integer input values cause schema validation failure","Extreme or overflow values may produce unexpected computation results","Network or gateway downtime on Base Mainnet returns a 5xx error","x402 payment failure (insufficient USDC, bad payment header) results in a 402 Payment Required response"],"whenToPreferThis":"Use this endpoint when you need a formally verified, deterministic computation of liquidation waterfall mechanics for a DeFi lending position — particularly when you need to know health factor, seizure amounts, bad debt residual, and insurance fund adequacy in a single call. Prefer this over manual off-chain calculation when auditability and formal proof guarantees matter, or when integrating into an on-chain risk monitoring pipeline on Base Mainnet.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T12:36:38.069Z","isFirstParty":false,"canonicalSlug":"stealthmark-liquidation-waterfall-verifier-ce8126b5"}