Crackpot lockCrackpot
Follow

Docs

How Crackpot works

How it works

A pool of players cracks small elliptic-curve locks for a bank, forever. A lock is a discrete log on a fresh curve y2 = x3 + 7 (Bitcoin's equation) over p = 2k - c, with k from 40 to 126 bits. Players buy a ticket (the tickets are the whole bank), run Pollard rho off chain (in the browser or the CLI miner) and commit, then reveal, distinguished points (DPs).

The program recomputes every DP from fixed-base tables and stores an 8-byte tag on a shared board. When a DP lands on a tag that is already there with other scalars, the program itself computes the key d, checks d·G = Q, and the lock is cracked. The fee goes to the treasury, a bonus to the finisher, the rest pro rata to DP shares. The next lock opens at once, and its size moves toward the target crack time. No coin is needed to play, and there are no timers.

A lock's life

  1. Seeding. The lock waits 8 slots, then takes its seed from the slot hash of the first slot at or after its target, mixed with the previous key.
  2. Proving. Anyone proposes a curve (c, n, beta) for the seed; the program proves it step by step on chain: hash-to-curve G, n·G = O, 16 Miller-Rabin rounds for p and for n, hash-to-curve Q. A bad candidate fails and the lock goes back to Seeded.
  3. Building. The fixed-base tables for G and Q are built, one row per instruction. The last row clears the board and opens the lock.
  4. Open. Players commit and reveal DPs. Tickets can be bought from Seeding until the crack.
  5. Cracked. A short grace window (150 slots on mainnet) lets an older committed list take the finisher over. Then claims open, the fee is paid and the next lock opens.

Shares and the crack

A reveal carries up to 16 DPs of 48 bytes each (a, b, x). For each one the program checks a, b < n, x < p, that x is the x of aG + bQ, that x is the class representative min(x, beta·x, beta2·x), and that its low dp bits are zero. A new tag is a share worth 2(dp_now - dp_base). A tag hit with other scalars solves the lock: d = (a1 -+ a) / (+-b - b1) mod n, checked against Q. The same or negated scalars are a duplicate and are refused.

dp_base = max(0, floor((k - 1 - 2·floor(log2 T)) / 2)); at T = 4096 that is (k - 26) / 2. The DP difficulty rises by one bit each time the board reaches 2T, 3T, ... inserts, so the board never fills up.

Commits come first so nobody can copy your DPs from the mempool: hash = sha256("CRACKPOT/commit" || lock || player || list). The reveal must land in a later slot. A key found off chain goes the same way with sha256("CRACKPOT/crack" || lock || player || d), then crack(d).

The split, exactly

At the crack, with B the booked bank: fee = 5% of B to the treasury, bonus = 10% of B to the finisher, carry to the next bank = 0% (set by params, paid only when at least 3 tickets hold shares), pool = the rest. Each ticket is paid floor(pool × shares / total shares), plus the bonus for the finisher, who always holds a ticket. If nobody holds shares the pool rolls into the next bank. Dust, an unshared pool and stray lamports go to the next lock's bank.

Every lamport is accounted for: per lock, paid + fee + residual = bank. Tickets close back to their owners at claim, locks close back to whoever paid their rent.

Params

Copied into every lock when it is created. Changes are timelocked 24 hours and apply only to locks created later.

ParamMainnet defaultBoundsLive now
Ticket0.02 SOL0.001 - 1 SOL-
Fee (treasury)5%0 - 15%-
Finisher bonus10%0 - 25%-
Carry to next bank0%0 - 10%-
Target crack time1 hour5 min - 7 days-
Lock size (start / min / max)48 / 40 / 126 bits40 - 126-
DP target T40961024 - 16384-
Grace window150 slots32 - 1500-

Next lock size: delta = round(2·log2(target / time taken)), clamped to ±4 bits. Fixed: 16 DPs and 4 priors per reveal, board of 16384 tags (128 KB), 64 probes.

Mining

Browser. The miner page runs one Web Worker per thread you pick, each walking in WebAssembly (about 1.6 M steps a second per thread). It buys your ticket, commits each batch and reveals it in the next transaction, which also commits the next batch. Your wallet signs each one.

Native. The CLI miner is multi-threaded (about 6 M steps a second per x86 thread). It buys the ticket, reveals until the lock cracks and claims after the grace window:

RPC=<rpc> node tests/crackpot-mine.mjs --key wallet.json --threads 8 --walks 256 --claim

Every client walks the same rule (walk v1): class {±P, ±wP, ±w2P}, a table of 1024 steps R_j = c_j G + d_j Q from sha256("CRACKPOT/walk" || seed || j), so trails from the browser, the CLI and any GPU port meet on one board.

Trust points

Honest lines

Limits

API

Read-only JSON at /api/svc/<route>: lock, lock/:no, lock/:no/walk, dps?lock=&since=, tag/:lock/:tag, ticket/:lock/:wallet, ladder, leaderboard?lock=, leaderboard/all, feed, config, health. Numbers above 253 are decimal strings.

Program cra2RJvmwJp4R7Wa9Sg6Nn5RSexgWCqZgAo4gjtem1x.