{"uid":"cap_i0taOdliqmY9sP6CxRDvh","slug":"stealthmark-collateral-cycle-detector-e56cf105","name":"StealthMark Collateral Cycle Detector","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/detect-collateral-cycles?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"edges":{"type":"array","items":{"type":"object","required":["source_asset","target_asset"],"properties":{"protocol":{"type":"string"},"max_ltv_bps":{"type":"integer"},"source_asset":{"type":"string"},"target_asset":{"type":"string"}}}}}},"responseSchema":{"type":"json","example":{"status":{"type":"string"},"message":{"type":"string"},"cycle_count":{"type":"integer"},"request_digest":{"type":"string","description":"SHA-256 of fields in this response; unsigned, not an attestation"},"detected_cycles":{"type":"array"},"has_circular_risk":{"type":"boolean"}}},"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_VR02Am0rfXsLnEUD1tcHA","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":"Detects circular collateral dependencies in DeFi lending graphs using formal Z3 theorem proving, returning cycle counts and risk attestation.","exampleAgentPrompt":"Check my DeFi collateral graph for circular borrowing cycles — I have three edges: WETH→stETH on Aave at 8000 bps LTV, stETH→rETH on Compound at 7500 bps, and rETH→WETH on Morpho at 7000 bps. Tell me if there's a circular risk and how many cycles exist.","exampleUseCases":[{"title":"Audit multi-protocol lending basket","prompt":"I'm deploying a yield strategy that uses wstETH as collateral to borrow USDC on Aave, then uses that USDC to mint a vault token used as collateral elsewhere — can you check these edges for circular collateral risks before I go live?"},{"title":"Pre-launch DeFi vault safety check","prompt":"Before we launch our ERC-4626 vault, check if our collateral dependency graph has any cycles: cbETH→WETH on Morpho at 8500 bps, WETH→cbETH on Compound at 7800 bps, and cbETH→rETH on Aave at 7000 bps."},{"title":"Polymarket basket collateral risk scan","prompt":"My prediction market basket uses multiple correlated assets as cross-collateral — scan these five asset edges for any circular dependency loops that could cause a cascade liquidation, and give me the attestation digest I can use for the audit trail."}],"resultDescription":"Returns a JSON object with: a status string, human-readable message, integer cycle_count of detected loops, an array of detected_cycles describing each circular path, a boolean has_circular_risk flag, and an attestation_digest for cryptographic auditability of the result.","failureModes":["Malformed edge objects missing required source_asset or target_asset fields return validation errors","Empty edges array may return zero cycles with no meaningful analysis","Very large graphs may time out or return incomplete cycle detection","Invalid asset identifiers or protocol names may cause prover to skip edges","Network or gateway errors return non-200 HTTP responses with error messages"],"whenToPreferThis":"Use this endpoint when you need formal, provably correct cycle detection in DeFi collateral graphs — especially for ERC-4626 vaults, multi-protocol lending stacks, or Polymarket baskets where circular collateral dependencies could cause cascade liquidations. Prefer over heuristic graph scanners when you need a cryptographic attestation digest for audit trails or compliance. Best suited for pre-deployment safety validation of complex DeFi strategies involving cross-protocol collateral.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-20T12:37:48.581Z","isFirstParty":false,"canonicalSlug":"stealthmark-collateral-cycle-detector-e56cf105"}