Adversarial & Security Lab
Interactive verification harness testing valid proofs, corrupted pairings, BN254 `n + r` malleability, borrower binding, revoked roots, stale policies, unauthorized markets, replay, exposure caps, and live SAC custody on Stellar Testnet.
Generates a real BN254 Groth16 proof in Web Worker against active Market A policy and verifies on `ZkVerifier`.
Submits forged G1/G2 pairing coordinates to `ZkVerifier.verify()`, rejecting on-chain with zero state mutation.
Injects `BN254_R + 101` into public signal #7 (`nonce`), proving canonical `< R_BE` enforcement.
Simulates `MarketA.borrow()` with proof bound to Market B instead of caller (`Error #5`).
Simulates `MarketA.borrow()` against unapproved root on `CredentialRegistry` (`Error #8`).
Valid active Issuer root paired with outdated `policy_hash` triggers `InactivePolicy` (`Error #9`).
Queries `CreditController.is_market_enabled()` for unregistered contract (`UnknownMarket #12`).
Queries `CreditController.is_nullifier_used()` & verifies consumed replay protection (`Error #10`).
Checks live shared controller exposure vs allowance & Testnet `#11 AllowanceExceeded` proof.
Verifies `sac.balance(market) >= liquidity + locked_collateral` on Market A & Market B plus `proof_domain` parity.