How It Works
The QanVault protocol operates as an automated, non-custodial lottery and prize vault system. This document outlines the complete step-by-step lifecycle from ticket purchase to winner settlement.
The 4-Stage Protocol Lifecycle#
Stage 1: Multi-Chain Ticket Purchase
Players select ticket quantity (100 QANX per ticket, approx. $1.24) and purchase across multiple EVM chains.
Stage 2: Deterministic Escrow Allocation
Upon receipt, the smart contract immediately and deterministically partitions the 100 QANX per ticket across 5 segregated accounting reserves.
Stage 3: Provably Fair Draw Execution
Automated keeper bots trigger draw execution at scheduled intervals using quantum-resistant cryptographic commitments.
Stage 4: Canonical Prize Claim & Settlement
All prizes settle canonically on BNB Smart Chain in wrapped QANX, ensuring sub-cent claim fees and autonomous rollover protection.
| Stage | Focus | Key Highlights |
|---|---|---|
| 01. Ticket Purchase | Multi-Chain Inflow | BSC QANX, BNB, BSC USDT, Ethereum QANX (1% bridge fee), Ethereum ETH/USDT |
| 02. Escrow Allocation | 10,000 bps Split | 50% Daily (D), 30% Following Day (D+1), 7.5% Weekly, 5% Monthly, 7.5% Ops |
| 03. Draw Execution | Provably Fair VRF | Commit-reveal ticket range sealing at 00:00:00 UTC with unbiasable entropy |
| 04. Prize Claim | Canonical BSC Hub | 72h non-custodial claims in wrapped QANX with 100% automated jackpot rollover |
1. Ticket Purchase & Multi-Chain Inflow#
A single ticket costs 100 QANX (approximately $1.24 at current valuation).
Players can enter using five flexible multi-chain payment paths:
- Direct BSC QANX: Native entry on BNB Smart Chain with zero DEX swap fees and zero bridge fees.
- BNB or BSC USDT: Swapped into QANX on PancakeSwap v3 in a single seamless on-chain transaction.
- Ethereum QANX (ERC-20): Direct payment in Ethereum QANX with a subsidized 1.0% bridge fee, batched through Symbiosis Finance into the canonical BSC prize vault.
- Ethereum ETH or ERC-20 USDT: Swapped into QANX on Uniswap v3 and batched across the Symbiosis cross-chain bridge into the canonical BSC prize contract with the subsidized 1.0% bridge fee.
- Unspent Dust Refunds: Any residual tokens resulting from slippage or price fluctuations are automatically credited back to the player's wallet in the same transaction.
2. Deterministic Fund Splitting (No Hidden Fees)#
When funds enter the protocol, the smart contract immediately and deterministically partitions the 100 QANX per ticket across 5 segregated accounting buckets:
| Bucket Name | Share | Basis Points (bps) | QANX per Ticket | Purpose |
|---|---|---|---|---|
| Current Day Daily Draw ($D$) | 50.0% | 5,000 bps | 50.0 QANX | Paid out in the 00:00:00 UTC daily draw |
| Following Day Daily Draw ($D+1$) | 30.0% | 3,000 bps | 30.0 QANX | Reserved for tomorrow's daily draw |
| Weekly Jackpot ($W$) | 7.5% | 750 bps | 7.5 QANX | Paid out on Monday 00:00:00 UTC |
| Monthly Jackpot ($M$) | 5.0% | 500 bps | 5.0 QANX | Paid out on the 1st of every month |
| Platform Operations Fee | 7.5% | 750 bps | 7.5 QANX | Covers keeper bot gas, VRF fees, and infrastructure |
| Total Allocation | 100.0% | 10,000 bps | 100.0 QANX | 100% Fully Solvent Escrow |
3. Draw Scheduling & Ticket Eligibility#
Tickets are minted as sequential, contiguous integer ranges:
Because ranges are contiguous, the contract can verify ticket eligibility in O(1) constant time without loop iterations or unbounded gas costs.
- Daily Draws: Take place every 24 hours at 00:00:00 UTC. Every ticket purchased on Day N is entered into Draw N (with 50% pot weight) and Draw N+1 (with 30% pot weight).
- Weekly Jackpots: Close every Monday at 00:00:00 UTC. All tickets purchased during the preceding 7 days compete for 100% of the accumulated weekly pot.
- Monthly Grand Jackpots: Close at 00:00:00 UTC on the 1st day of each month. All tickets purchased during the calendar month compete for the grand prize.
4. Provably Fair Winner Selection#
Winner selection uses a two-phase commit-reveal scheme:
- Commit Phase: At the close of a draw period, the draw coordinator commits the hash of a secret random seed:
This freezes the eligible ticket list and prevents anyone from buying tickets after seeing the seed.
- Reveal Phase: The seed is revealed on-chain and verified against H.
- Winner Derivation: The winning ticket index is computed deterministically:
The architecture is fully modular, allowing seamless upgrades to native QAN Platform post-quantum VRF consensus or Chainlink VRF.
5. Canonical BSC Settlement & 72-Hour Claims#
All prizes are denominated and paid in wrapped QANX on BNB Smart Chain:
- Winners have 72 hours from draw finalization to execute their single-signature claim transaction.
- When claimed, prize tokens transfer directly into the winner's wallet.
- If a prize remains unclaimed after 72 hours, the keeper contract automatically triggers a rollover, redistributing 100% of the unclaimed funds into the subsequent draw pot.
Next Steps#
- Ready to get tickets? Read How to Play
- Learn about the mathematical formulas: Tokenomics
- Deep dive into random generation: Provably Fair