Solvency & Escrow Proofs
On this page (6 sections)
QanVault enforces a formal, mathematically verified solvency model that guarantees 100% reserve backing for all player vault pools, pending claims, and future rollover reserves at every block.
1. Capital Conservation Theorem#
For every ticket purchase transaction with total cost C:
The contract strictly enforces that the vault's verified ERC-20 token balance increases by exactly C:
If the transferred amount is less than C (due to transfer taxes or paused tokens), the entire transaction reverts immediately with IncorrectPaymentValue().
Exact Basis Point Partitioning
Every payment C is partitioned according to fixed basis point constants (BPS = 10,000):
Because the ticket price (100 QANX) and all basis points are divisible integers without remainder, the sum of partitions equals the exact incoming capital:
2. The Fundamental Solvency Invariant#
At any given block height, the vault contract must satisfy the fundamental solvency condition:
Where total segregated liabilities mathcal{L}_{total} is defined as:
Component Definitions:
`totalUnsettledPools`: Capital allocated to open periods and closed draws awaiting VRF settlement.
`totalClaimLiabilities`: Settled prize funds waiting to be claimed by winning wallets within the 72-hour window.
`dailyRolloverReserve` ($\mathcal{R}_{\text{daily}}$): Capital reserved from previous D+1 splits, expired prizes, and launch reserves.
`weeklyRolloverReserve` & `monthlyRolloverReserve`: Long-term reserve capital for multi-period draws.
`accruedPlatformFees` ($\mathcal{F}_{\text{platform}}$): Accumulated operations fees reserved strictly for keeper gas and protocol infrastructure.
3. State Transition Accounting Matrix#
The table below traces how each protocol action affects token balance and segregated liabilities:
| Transaction Action | Token Balance | Tracked Liabilities Movement | Solvency Invariant |
|---|---|---|---|
| Paid Ticket Purchase | +C | +C (totalUnsettledPools + mathcal{F}_{platform}) | Invariant Preserved |
| Launch Reserve Deposit | +D | +D (mathcal{R}_{daily}) | Invariant Preserved |
| Draw Period Closure | Unchanged | Allocated funds lock into draw pool | Invariant Preserved |
| Draw Settlement | Unchanged | Pool moves from unsettled to totalClaimLiabilities | Invariant Preserved |
| Winner Claim (`claimPrize`) | -A | -A (totalClaimLiabilities) | Invariant Preserved |
| 72h Expiry Rollover | Unchanged | Slot moves: $7.5\% \to \mathcal{F}_{\text{treasury}},92.5\% \to \mathcal{R}_{\text{daily}}$ | Invariant Preserved |
| Treasury Fee Withdrawal | -F | -F (accruedPlatformFees) | Invariant Preserved |
4. On-Chain Invariant Auditability#
The public view function reconcileAccounting() allows any participant, auditor, or indexing node to verify solvency on-chain in real time:
function reconcileAccounting() external view returns ( uint256 contractBalance, uint256 totalSegregatedLiabilities, bool isSolvent, uint256 surplus) { contractBalance = qanxToken.balanceOf(address(this)); totalSegregatedLiabilities = totalUnsettledPools + totalClaimLiabilities + dailyRolloverReserve + weeklyRolloverReserve + monthlyRolloverReserve + accruedPlatformFees; isSolvent = contractBalance >= totalSegregatedLiabilities; surplus = isSolvent ? (contractBalance - totalSegregatedLiabilities) : 0;}- Zero Insolvency Exposure: Contract state variables track each reserve discretely; deficit spending or cross-pool borrowing is impossible by bytecode design.
- Strict Fee Isolation:
withdrawPlatformFees()transfers strictlyaccruedPlatformFees. The function cannot access active vault pools or unclaimed player balances under any circumstances.