The math
Every claim on this page matches the code that runs at the vault. Three rules decide a chest: a uniform draw, your current odds, and whether your plan is still alive.
The draw
There is a draw space of 1,000,000,000 integer positions. Each opening samples one position uniformly and independently: 32 random bits from crypto.getRandomValues are taken repeatedly until the value is below 4,000,000,000, then reduced modulo the draw space. Four billion is divisible by one billion, so every position keeps exactly four of the possible samples: the rejection step preserves a uniform distribution instead of skewing it.
You win when the sampled position is below your odds. With a uniform sample over exactly one billion positions, the chance is
P(win) = odds ÷ 1,000,000,000
Nothing else enters the decision. The pot, the cooldown, and the boost all only change what happens after the sample, or which odds are used.
Your odds
Free pays 100. Daily pays 150 for its 24 hours. Weekly pays 200 and adds 50 for every chest opened inside that plan, capped at 1000:
odds(weekly, k) = min(1000, 200 + 50 · k)
So a free chest wins 1 in 10,000,000, Daily 1 in 6,666,667, Weekly starts at 1 in 5,000,000 and reaches 1 in 1,000,000 at the cap.
Cap'n's Favor
The account holding the most chests in the past seven days adds 50 to every chest it opens. The leader is recalculated from the same rows the ranking reads, so the crown moves as soon as another sailor passes the count. The sum is clamped at the same 10× ceiling:
odds = min(1000, plan + favor)
Expiry
A plan stores the exact moment it ends, in milliseconds since the epoch, in the same database row as the account. Every read of your odds joins the plan only when expires > now. When that condition stops holding, the join finds nothing, the odds fall back to the Free row, and the site prints "no expiry" again. There is no cache and no client timer to trust.
The prize split
Winners of one five-minute window share that window's pot. Each share is a floor division, and the integer remainder is handed out by ascending account ID, so the shares always sum exactly to the pot:
share(i) = ⌊pot ÷ winners⌋ + 1 when i < pot mod winners, else ⌊pot ÷ winners⌋
What you can check
Every accepted chest writes one row: the account, the window, the exact odds used, whether it won, and the running empty-chest count. The row is inserted once per account per window, enforced by the primary key, so a refresh or a second click cannot open twice. Rate changes apply to future openings only, and the audit table records who changed what.
The formal target
The statements below are the Lean 4 form of the two rules that decide your outcome, kept as the reference specification for the audit:
import Mathlib
def DRAW_SPACE : ℕ := 1000000000
/-- A chest wins exactly when the sampled position is below the odds. -/
def wins (odds : ℕ) (u : Fin DRAW_SPACE) : Prop := u.val < odds
/-- The share of the draw space that wins, for odds inside the space. -/
theorem win_share (odds : ℕ) (h : odds ≤ DRAW_SPACE) :
(Finset.univ.filter (wins odds)).card = odds := by
sorry
/-- Weekly odds climb with every chest, and never pass the cap. -/
theorem weekly_monotone (k : ℕ) :
min 1000 (200 + 50 * k) ≤ 1000 := by
exact min_le_left _ _
The second theorem is proved outright. The first carries a placeholder: the counting argument is complete on paper above, and the file is checked with the Lean toolchain before launch rather than claimed here.
Nothing on this page promises profit. A 1 in 10,000,000 chest is exactly that: one in ten million.
