# StealthMark Differential Specification Verifier

> StealthMark Differential Specification Verifier is a paid API for AI agents from gateway.stealthmark.io, paid per call via x402, $0.05/call, status unknown (last checked 2026-11-16).

Formally verifies behavioral equivalence between two code implementations using Z3 SMT solving and fuzzing, returning whether they are equivalent or diverge

## Facts

- Endpoint: POST https://gateway.stealthmark.io/x402/verify-differential-spec?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/stealthmark-differential-specification-verifier-35af22ae
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_O8_0cR5j9T_GIWWAh3k7l

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-differential-specification-verifier-35af22ae -d '<json body>'
```

Example prompt: Run a differential equivalence check between these two Solidity vault functions — use 512 fuzz iterations and argument names ['shares', 'assets', 'owner'] to find any cases where they diverge.

## When to prefer this

Choose this endpoint when you need formal or semi-formal proof of behavioral equivalence between two code implementations, especially for security-sensitive smart contract logic (ERC-4626 vaults, ZK circuits, DeFi protocols). It combines Z3 SMT solving with fuzzing for a layered verification approach. Prefer it over manual unit testing when you need counterexample witnesses or mathematical guarantees, and over generic fuzzing tools when you need formal invariant checking in a blockchain/DeFi context.

## Known failure modes

- Unparseable code snippets cause solver initialization failure
- Argument name mismatch with actual function signatures produces incorrect results
- Very high fuzz_iterations may hit timeout limits
- Code with side effects or non-determinism may produce false equivalences
- Undecidable theories in Z3 may result in 'unknown' solver mode without a definitive answer

## 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

Returns a JSON object with: 'equivalent' (boolean — whether both code implementations are provably equivalent), 'divergence' (null if equivalent, or an object showing the specific input values that caused divergence), 'solver_mode' (string indicating whether Z3 formal proof or fuzzing was used), and 'checked_cases' (integer count of input cases examined).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "seed": {
   "type": "integer",
   "default": 42
  },
  "code_a": {
   "type": "string"
  },
  "code_b": {
   "type": "string"
  },
  "arg_names": {
   "type": "array",
   "items": {
    "type": "string"
   }
  },
  "fuzz_iterations": {
   "type": "integer",
   "default": 256
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "divergence": {
   "type": [
    "object",
    "null"
   ]
  },
  "equivalent": {
   "type": "boolean"
  },
  "solver_mode": {
   "type": "string"
  },
  "checked_cases": {
   "type": "integer"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stealthmark-differential-specification-verifier-35af22ae/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)
