Launch App
Technical Whitepaper & Smart Contracts

Solvency & Escrow Proofs

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:

C = sum_{i=1}^{count} ticketPrice

The contract strictly enforces that the vault's verified ERC-20 token balance increases by exactly C:

Delta Balance(Vault) = Balance_{after} - Balance_{before} = 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):

P_{daily} = leftlfloor (C × 5,000 / 10,000) rightrfloor = 0.50 × C
P_{next} = leftlfloor (C × 3,000 / 10,000) rightrfloor = 0.30 × C
P_{weekly} = leftlfloor (C × 750 / 10,000) rightrfloor = 0.075 × C
P_{monthly} = leftlfloor (C × 500 / 10,000) rightrfloor = 0.05 × C
P_{platform} = leftlfloor (C × 750 / 10,000) rightrfloor = 0.075 × C

Because the ticket price (100 QANX) and all basis points are divisible integers without remainder, the sum of partitions equals the exact incoming capital:

P_{daily} + P_{next} + P_{weekly} + P_{monthly} + P_{platform} = C

2. The Fundamental Solvency Invariant#

At any given block height, the vault contract must satisfy the fundamental solvency condition:

TokenBalance(Vault) ≥ mathcal{L}_{total}

Where total segregated liabilities mathcal{L}_{total} is defined as:

mathcal{L}_{total} = totalUnsettledPools + totalClaimLiabilities + mathcal{R}_{daily} + mathcal{R}_{weekly} + mathcal{R}_{monthly} + mathcal{F}_{platform}

Component Definitions:

  1. `totalUnsettledPools`: Capital allocated to open periods and closed draws awaiting VRF settlement.

  2. `totalClaimLiabilities`: Settled prize funds waiting to be claimed by winning wallets within the 72-hour window.

  3. `dailyRolloverReserve` ($\mathcal{R}_{\text{daily}}$): Capital reserved from previous D+1 splits, expired prizes, and launch reserves.

  4. `weeklyRolloverReserve` & `monthlyRolloverReserve`: Long-term reserve capital for multi-period draws.

  5. `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 ActionToken BalanceTracked Liabilities MovementSolvency Invariant
Paid Ticket Purchase+C+C (totalUnsettledPools + mathcal{F}_{platform})Invariant Preserved
Launch Reserve Deposit+D+D (mathcal{R}_{daily})Invariant Preserved
Draw Period ClosureUnchangedAllocated funds lock into draw poolInvariant Preserved
Draw SettlementUnchangedPool moves from unsettled to totalClaimLiabilitiesInvariant Preserved
Winner Claim (`claimPrize`)-A-A (totalClaimLiabilities)Invariant Preserved
72h Expiry RolloverUnchangedSlot 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:

solidity
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 strictly accruedPlatformFees. The function cannot access active vault pools or unclaimed player balances under any circumstances.