# StealthMark ERC-4626 Inflation Guard Formal Verifier

> StealthMark ERC-4626 Inflation Guard Formal Verifier is a paid API for AI agents from gateway.stealthmark.io, paid per call via x402, $0.03/call, status unknown (last checked 2026-11-19).

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.

## Facts

- Endpoint: POST https://gateway.stealthmark.io/x402/verify-erc4626-inflation-guard?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/stealthmark-erc-4626-inflation-guard-formal-verifier-7c062b2a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BG-ByrQpBrE9RW2ZKCty1

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability stealthmark-erc-4626-inflation-guard-formal-verifier-7c062b2a -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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).

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "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"
   ]
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stealthmark-erc-4626-inflation-guard-formal-verifier-7c062b2a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gateway.stealthmark.io](https://www.zero.xyz/host/gateway.stealthmark.io/llms.txt)
