The shadow chain. The contract keeps its own internal ledger — a “shadow chain” — that mirrors who owns what in the pot. Every stake adds a shadow claim bound to your key, and the pot is always exactly the sum of all shadow claims. Nothing here is custodial bookkeeping in a database: this shadow ledger is the source of truth the engine turns directly into real, individually-spendable Bitcoin outputs.
Per-player VTXOs. The engine renders the pot as a timeout tree of VTXOs (“virtual UTXOs”) — one Bitcoin output per player. Each output has two ways to be spent: a cooperative key path, and your own unilateral script path, <delay> CSV <your key> CHECKSIG — i.e. after a short on-chain delay you can sweep your own output with only your key.
Value-bound MuSig2. The key path is a Projector value-bound MuSig2 key. In plain terms: MuSig2 lets several keys jointly control one output with a single combined signature. Cube's twist tweaks that combined key by your claim's amount (pk' = pk + t·G, where t is derived from the value), so the key is mathematically tied to a specific number of sats — a claim can't be silently re-pointed at a different amount. The key combines your key with the engine's, and moving the pot needs an N-of-N signature of every participant, so no single party — not even the operator — can move your funds.
Exit even if everyone's gone. Between rounds the pot is refreshed by an N-of-N signature of all current players. Anyone offline is covered by a pre-signed unroll that puts every player's VTXO on-chain so they can still exit alone. The unroll is self-funded — its miner fee is baked in — so anyone can broadcast it: a watchtower, or you from a copy your browser cached, even if this site and the operator vanish entirely. Then your CSV script path sweeps your output with just your key.
Provably-fair winner. The winner is enforced with a garbled-circuit fraud proof (BitVM-style): the engine asserts the winner, and a wrong assertion is disprovable on-chain, letting an honest player reclaim their stake.
Deposits. Add funds on-chain (straight to a VTXO only you can spend), or over Lightning — a Lightning payment is swapped on-chain into that same self-custodied output, so it's non-custodial the moment it lands.