Launch App
Technical Whitepaper & Smart Contracts

Deployment & Keeper Bot Guide

Protocol deployments are immutable; source changes do not alter deployed on-chain bytecode or migrate liabilities.

The deployment and operational verification procedure follows rigorous criteria. The smart contracts are published and verified on BscScan. Contract parameters are fixed at deployment: canonical token address, settlement chain ID, treasury wallet, owner address, VRF coordinator, key hash, and subscription. The VRF provider nativePayment configuration is explicit and immutable. The provider is registered as a consumer under the Chainlink VRF subscription.

On-Chain Smoke Testing and Reserve Initialization#

The vault contract includes built-in verification primitives to validate end-to-end accounting before opening public sales:

  1. One-Shot Smoke Ticket (`purchaseSmokeTicket`):

    While paused and before any tickets exist, the contract owner can execute a single smoke ticket purchase. This ticket adheres to standard token transfer, fee allocation, range indexing, and UTC period eligibility rules. It allows operators to verify draw closure, Chainlink VRF request dispatch, callback fulfillment, sparse Fisher-Yates winner settlement, and prize claims with 12 canonical confirmations on the target network.

  2. Idempotent Reserve Funding (`fundDailyLaunchReserveToTarget`):

    Reserve funding procedures are executed after operational verification. Rather than relying on blind additive deposits that risk double-funding upon network timeouts, the contract provides fundDailyLaunchReserveToTarget. This function sets the intended total reserve for the designated UTC day target, idempotently preventing duplicate deposits across retry attempts. Direct owner calls to fundDailyLaunchReserve remain an alternative owner function requiring exact deposit accounting.

Automated Keeper Daemon Operation#

The automated keeper daemon executes as an independent background daemon with explicit RPC, chain, and contract identities, dedicated operator credentials, authenticated Redis distributed leasing, and persistent state tracking:

  • Bounded Cyclic Scans: The keeper scans bounded draw period ranges and preserves pending draw state across process restarts.
  • Fairness Over Liveness Invariant: Both timeout cancellation and request replacement always revert on nonempty draws. If Chainlink VRF fulfillment is delayed beyond the 24-hour alert threshold, the daemon continues waiting for the original request and settles it once fulfilled. No replacement seed, refund, or owner rescue exists for a pending nonempty draw.
  • Monitoring: Operators monitor pass completion health, gas balances, RPC synchronization, and oracle fulfillment latency, rather than simple process uptime.

Admin authentication requires a fresh random hex session secret of at least 32 bytes, explicit operator allowlists, and shared authenticated Redis. Ingress proxies must enforce strict header overwrite and exact hop policies to prevent spoofed client IP headers.

Protocol Governance and Release Verification#

QanVault smart contracts are completely non-upgradeable and contain zero proxy delegates. Upgrades cannot be forced onto existing deployments. Any future protocol evolution requires a fresh, immutable contract deployment with independent verification of compiler metadata, creation receipts, and runtime bytecode on BscScan.

The O(1) batch range storage model enforces a per-transaction ceiling of 10,000 tickets (MAX_TICKETS_PER_TX), keeping gas costs strictly bounded while allowing players to execute repeat transactions without daily or lifetime wallet caps.

Keeper Fault Recovery and Monitoring#

The keeper daemon logs transaction intent before broadcasting. If a transaction remains pending, the daemon waits or rebroadcasts the same signed transaction rather than selecting a different outcome. An unknown nonce replacement requires operator reconciliation. When an operation encounters a transient RPC failure, the keeper's cyclic scan revisits earlier periods.

The blockchain itself will not call closeDraw, settleDraw, expireAndRollover, or claimPrize at a scheduled time; smart contracts cannot execute autonomously without external transactions. These functions remain permissionless in the contract, allowing community participants to trigger closures or settlements even if the hosted keeper daemon experiences downtime. Winning wallets must submit their claim transactions before the 72-hour deadline measured from the settlement timestamp.