SHOOK / OFFICIAL PROTOCOLDocumentation
MAINNET EDITIONOpen SHOOK
Games / SHOOK

Daily player lottery

A SHOOK pot funded by decisive games, with wager-weighted eligibility.

Daily epochs

The official epochDuration is 86,400 seconds. Epoch IDs are floor(Unix timestamp / 86,400), so boundaries align to UTC days. The lottery receives the 0.5% lottery portion of decisive game pools; users do not buy separate tickets through this contract.

Who receives weight

Coinflip records provisional per-player wager entries when a lobby activates and as bets are added. Those entries become attached to a drawable epoch only when the lobby settles. A cancelled lobby contributes neither pot nor eligible weight.

Tic-Tac-Toe adds both players with equal weight equal to their matched wager at decisive settlement. Draws and cancellations add no weight. Eligibility comes from participating stake, whether the player won or lost the game.

Late settlements

A Coinflip lobby has an original epoch based on its betting deadline. If that epoch is still open when settlement happens, its entries and fee attach there. Otherwise they attach to the current epoch. Turn-game settlement uses the current epoch.

An unresolved game does not hold the previous day’s draw open. activeLobbies is accounting information, not a requirement that every original lobby settle before drawing.

Drawing

After an epoch ends, anyone can call draw or drawWithSignature when it has nonzero eligible weight and pot. The target round is the first drand round at or after epoch end plus one minute. The seed commits the epoch, total weight, pot, and entry count.

A rejection-sampled point in the weight range selects an entry. Each player’s chance is proportional to the sum of its eligible wager weight. One winning address can claim the entire epoch pot through claim(epoch, receiver). Only that winner can claim, and only once.

Randomness failure and rollover

If the selected round was not authenticated strictly before five minutes after its scheduled time, drawing closes and anyone can rolloverExpiredEpoch. The pot and eligibility are carried into the current open epoch, preserving prior entry weights.

If randomness was authenticated in time, the old epoch remains drawable later and cannot be rolled over through the timeout path. A rolled epoch cannot be drawn or rolled again; rolledInto identifies its destination. Claims have no implemented expiry.

No fixed daily prize

The pot depends on actual decisive-game fees and any rollovers. An epoch with no eligible weight or no pot cannot draw. “Daily” describes the epoch boundary, not a guaranteed transaction, prize size, or keeper schedule.

Source reference

Checked against the source shipped with this documentation. Contract calls and units are detailed in the contract reference.

Imported source files 18

Supporting contracts, interfaces, and libraries imported by the sources above, including their dependencies.

SHOOK docs Official protocol · Mainnet parameters