Security Invariants
Security invariants are properties that must always hold true regardless of system state, input, or load. Violating an invariant means the system is in an unsafe state. JIL defines, monitors, and enforces 7 categories of invariants.
What Are Security Invariants?
An invariant is a condition that must be true at all times. If an invariant is violated, the system is in a state that should not exist. Invariants serve as a formal specification of "what cannot go wrong" - they define the security boundary of the system.
Each invariant below specifies: the property, why it matters, how it is enforced, and what happens if it is violated.
1. Consensus Invariants
C1: No settlement is finalized without 14-of-20 validator attestations
C2: No validator can vote twice on the same settlement proposal
C3: Consensus halts if fewer than 10 validators are healthy
2. Transaction Invariants
T1: No settlement can be processed without passing all active policy gates
T2: Settlement is atomic - it completes fully or not at all
T3: Finalized settlements are immutable
3. Wallet Invariants
W1: No settlement can be authorized without the user's MPC key shard
W2: Key shards are never combined in a single location
4. Bridge Invariants
B1: Wrapped tokens are only minted after deposit confirmation on the source chain
B2: Bridge withdrawals cannot exceed deposited balance
5. Supply Invariants
S1: Total JIL token supply never exceeds 10 billion
S2: Wrapped token supply equals deposited collateral
6. Safety Invariants
SA1: System prefers safety over liveness
SA2: No settlement is processed during consensus uncertainty
7. Monitoring Invariants
M1: All validator nodes are monitored continuously
M2: Security-relevant events are logged immutably
Failure Detection and Response
Invariant violations are detected through multiple mechanisms.
| Detection Method | Coverage | Response Time |
|---|---|---|
| Consensus protocol enforcement | C1, C2, C3, T1, T2 | Immediate (inline) |
| Cryptographic verification | W1, W2, T3, S1 | Immediate (inline) |
| Smart contract enforcement | B1, B2, S1, S2 | Immediate (on-chain) |
| SentinelAI monitoring | M1, M2, SA1, SA2 | Under 5 minutes |
| Balance reconciliation | S2, B2 | Hourly automated check |
Future Verification
The following enhancements to invariant verification are planned.
- Formal verification: Mathematical proof of consensus invariants (C1-C3) - planned Q4 2026
- Runtime assertion monitoring: Continuous runtime checks for all invariants with automated alerts
- Chaos testing: Deliberate invariant violation attempts in isolated test environments
- Third-party audit: Independent verification of invariant enforcement - planned Q3 2026
Ready to verify?
Start with a structured POC. Evaluate JIL settlement infrastructure on a single corridor.