1. Executive Summary
This document captures the binding operational decisions for the ZK Compliance (ZKC) subsystem of JIL Sovereign. It resolves five open questions that remained after the original ZKC specification was published: per-circuit gas benchmarks, jurisdictional conflict resolution hierarchy, proof validity windows by type, KYC provider selection and failover strategy, and the multi-phase proof system migration path.
All parameters in this document are authoritative for production. They supersede any earlier draft values referenced in design discussions or the original ZKC spec. Changes to these parameters require a governance proposal and 14-of-20 validator approval.
2. ZK Circuit Gas Benchmarks
All six production circuits use Groth16 proving with BN254 curves. Gas costs are measured on the JIL L1 execution environment and include calldata, verification computation, and state storage for the proof record.
| Circuit | Gas Cost | Verification Time |
|---|---|---|
| KYC_AGE | ~220,000 | ~180ms |
| KYC_JURISDICTION | ~235,000 | ~195ms |
| AML_COMPLIANCE | ~250,000 | ~210ms |
| SANCTIONS_CLEAR | ~225,000 | ~185ms |
| KYC_ACCREDITATION | ~240,000 | ~200ms |
| INCOME_THRESHOLD | ~260,000 | ~220ms |
Batch Verification
Submitting 5 or more proofs in a single transaction activates batch verification, which amortizes pairing computation across proofs. The discount is 15% off aggregate gas for the batch. Maximum batch size is 20 proofs per transaction - larger batches are rejected at the contract level to prevent block stuffing.
3. Jurisdictional Conflict Resolution
When a transaction crosses jurisdictions, compliance rules from multiple regulatory frameworks may apply simultaneously. JIL uses strict interpretation - the stricter rule always wins. This eliminates regulatory arbitrage and ensures every transaction satisfies the most demanding applicable standard.
Resolution Hierarchy
- Bilateral corridor agreement - Negotiated rules for specific jurisdiction pairs (e.g., US-EU corridor). These take precedence because both regulators have explicitly approved them.
- Receiving jurisdiction regulations - The destination jurisdiction's rules apply next, since the receiving regulator has primary enforcement authority over incoming funds.
- Sending jurisdiction regulations - The origin jurisdiction's rules apply as a secondary layer, covering outbound transfer restrictions and reporting requirements.
- FATF baseline recommendations - When no specific bilateral or jurisdictional rule exists, FATF Travel Rule and baseline AML recommendations serve as the floor.
Conflict Detection
The rule-engine service (port 8460) performs conflict detection at compile time when jurisdiction rule sets are loaded. If two rules produce contradictory requirements for the same proof type, the engine flags the conflict and applies the stricter interpretation automatically. Unresolvable conflicts - where no valid proof can satisfy both rules simultaneously - escalate to compliance-api (port 8100) for manual review by a compliance officer.
Currently 10 jurisdiction rule sets are loaded: US (SEC/FinCEN), EU (MiCA), UK (FCA), Singapore (MAS), Switzerland (FINMA), Japan (FSA), UAE (VARA), Brazil (CVM), Germany (BaFin), and South Korea (FSC).
4. Proof Validity Windows
Proof validity is tiered by type and risk level. Higher-risk proof types expire faster. Each proof type has a renewal grace period during which the old proof remains valid while the user generates a replacement.
| Proof Type | Validity | Renewal Grace | Auto-Suspend |
|---|---|---|---|
| KYC_AGE | 365 days | 30 days | Yes |
| KYC_JURISDICTION | 90 days | 14 days | Yes |
| KYC_ACCREDITATION | 180 days | 30 days | Yes |
| AML_COMPLIANCE | 30 days | 7 days | Yes |
| SANCTIONS_CLEAR | 7 days | 1 day | Immediate |
| INCOME_THRESHOLD | 365 days | 30 days | Yes |
Risk-Adjusted Windows
When a user's risk score exceeds 0.7 (as computed by the compliance-api risk engine), all validity windows are halved. For example, a high-risk user's KYC_AGE proof expires in 182 days instead of 365. This forces more frequent re-verification for accounts exhibiting suspicious patterns.
Proofs covering assets in the Protected zone (accounts with active protection coverage) use shorter windows - also halved from the base values. This layering is cumulative: a high-risk user in the Protected zone has validity windows at one-quarter of the base period.
5. KYC Provider Selection
JIL uses a dual-provider strategy for identity verification. Two providers ensure failover coverage and broader geographic reach. Both providers' results are stored as ZK-compatible attestations - the raw identity data never touches JIL infrastructure.
5.1 Primary - Onfido
- Regulation: FCA-regulated (United Kingdom)
- Coverage: 195 countries, document + biometric verification
- Certifications: SOC 2 Type II, ISO 27001
- API Latency: ~8s average per verification
- Routing: Default provider for all FATF member countries
5.2 Secondary - Sumsub
- Coverage: 220+ countries, real-time checks
- Strength: Broader emerging market coverage
- API Latency: ~6s average per verification
- Routing: Used for non-FATF jurisdictions and countries unsupported by Onfido
5.3 Routing Logic
The compliance-api service (port 8100) wraps both providers behind a unified interface. Routing decisions follow this order:
- If the user's jurisdiction is a FATF member country and Onfido supports it, route to Onfido.
- If the user's jurisdiction is not a FATF member, or Onfido does not support the document type, route to Sumsub.
- If the primary provider returns 3 consecutive failures (timeout, 5xx, or verification system error), automatic failover to the secondary provider activates.
- Health checks run every 60 seconds against both provider APIs. An unhealthy provider is removed from the routing pool until it recovers.
6. Proof System Migration Strategy
When ZK circuits are upgraded - whether for security patches, new proof types, or proving system migration (e.g., Groth16 to PLONK) - a structured 5-phase epoch migration ensures no user is disrupted and no valid position is forcibly liquidated.
| Phase | Timeline | Action |
|---|---|---|
| Announce | Day 0 | Publish new circuit specs, update SDK, notify all integrated services via compliance-api webhook |
| Dual-Accept | Day 1 - 90 | Both old and new proofs accepted by verifier contracts. Users can migrate at their own pace. |
| Soft-Deprecation | Day 91 - 120 | Old proofs still accepted but transactions carry a deprecation warning flag in the proof record |
| Hard-Deprecation | Day 121 - 150 | Old proofs rejected for new transactions. Existing open positions are grandfathered until their proofs expire naturally. |
| Deactivation | Day 151+ | Old verifier contract deactivated. All active proofs must use the new circuit. |
Emergency Migration Path
If a critical vulnerability is discovered in an active circuit, the standard 150-day timeline is too slow. An emergency path compresses the entire migration to 7 days. This requires a 14-of-20 validator vote (matching the bridge quorum threshold) and must include simultaneous JILHQ announcement plus validator config push to all nodes.
During an emergency migration, the Dual-Accept window is reduced to 3 days, Soft-Deprecation to 2 days, and Hard-Deprecation to 2 days. Deactivation occurs immediately after Hard-Deprecation ends. Users with expiring positions receive automated notifications via the wallet-api webhook channel.
7. Cross-Reference Matrix
This matrix maps each operational parameter to its owning service, configuration source, and governance requirements for changes.
| Parameter | Owning Service | Config Source | Change Authority |
|---|---|---|---|
| Circuit gas costs | proof-verifier :8250 | On-chain verifier contract | Contract upgrade (14/20 vote) |
| Batch discount rate | proof-verifier :8250 | On-chain verifier contract | Contract upgrade (14/20 vote) |
| Jurisdiction rule sets | rule-engine :8460 | config/jurisdiction-rules/ | Compliance officer + JILHQ push |
| Conflict resolution order | rule-engine :8460 | Hardcoded (strict interpretation) | Governance proposal |
| Proof validity windows | compliance-api :8100 | compliance_config table | Compliance officer approval |
| Risk score threshold | compliance-api :8100 | compliance_config table | Compliance officer approval |
| KYC provider routing | compliance-api :8100 | Environment variables | Ops team (no governance needed) |
| Migration phase timelines | proof-verifier :8250 | On-chain epoch registry | 14/20 validator vote |
| Emergency migration trigger | JILHQ :8054 | Validator consensus | 14/20 validator vote (emergency) |