Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

bubblerumble5 package

Overview

Package bubblerumble5 is the fifth Bubble Rumble realm: v4's game whole, with one new slice. Of every bid 50% goes to the pot, 30% is credited at once to the pool's earlier bidders pro-rata to what they paid in, 10% to whoever invited the bidder, 5% to the pool's creator — and 5% to the BUBBLE treasury: the token realm's own sub-realm (bubbletreasury), which nothing moves but a decided vote of the BUBBLE holders. The five percent comes out of the pot's share alone; the dividends, the inviter's and the creator's slices are v4's. Seeds (a creator's own money into a new pool) and shots pay no royalty: a seed is a gift to the players, and a shot's losing side already feeds the pot. Every pool has a last day, a flag war at the close, credited earnings and Withdraw, a clock that can be bought down but never under MinClock, and the shot that can win the pot:

  • A shot is still extra money on a bid, a chance to pop the bubble at once. The chance is 0.8 × shot / take, at most 1% a shot, where the take is what a pop would pay the shooter right now: the pot less the team's 35%, times the winner's live share (LiveBps). So the pot keeps a fifth of every shot's fair value however far the last day has slid, and a hit pops the bubble: the pool closes with the shooter as its winner and Claim pays it as any pop.
  • The draw's randomness is a commit-reveal by the keeper — the operator's own box, which also settles pools on time. The keeper publishes sha256 hashes of secrets ahead of time (Commit); a bid with a shot takes the next unused one; the shot is drawn when someone (the keeper, or anyone) reveals that secret (Reveal) in the blocks ShotDelay to ShotDelay+ShotWindow after the bid. The seed is the secret with the shot's own facts and the reveal block's height and time. Nobody without the secret can grind it: not the shooter, not a validator. The secret's holder knows the two candidate block times a block ahead and may pick which of the window's three blocks to reveal in — three rolls, at most 2.4× fair on a 1% shot — which is why the keeper key never bids or shoots, and its operator never shoots. (The site's own keep-alive boops come from another key and pay the royalty like any boop; for the operator, who votes the treasury, that slice is a wash — said here so nobody has to work it out.)
  • A shot not revealed in its window, or on a pool that closed first, is void: it goes into the pot and counts as a miss, as in v3. Nothing is refunded, so withholding a reveal never pays whoever withholds it. What remains is that a keeper who leads a pot could withhold a stranger's hit and let the money fall into the pot it leads: refused shots are counted on the pool for all to see, and so are reveals that came in the window's later blocks (the honest keeper always reveals at the first), so a keeper choosing its block would show.
  • Shots are sold only while the keeper is alive: a shot needs a free commitment and a sign of life (Commit or Heartbeat) within KeeperFresh. Otherwise the bid stands and the shot's money goes straight back in the same transaction.
  • Shots are refused in the last quarter of a pool's life (which also keeps every reveal window clear of the last day) and under MinShot. RevealTip is taken from every shot and credited to the keeper whoever sends the reveal (the secret sits in the mempool, and a proposer could copy it), so the keeper pays for itself. The keeper's own shots are refused outright.
  • Reveals go in shot order, so among two pending shots nobody chooses which pops.

Residuals, stated plainly: the secret holder's three rolls; the keeper-defender veto above; a proposer who reads the keeper's reveal in the mempool holds the secret too, and proposing the window's blocks could drop the reveal for a roll it does not like or leave it out altogether (a void), which Late and Voided show; keeper and validator together could grind. SetShots is the switch if any of it is seen. SetKeeper drops every unused commitment.

Function

Heartbeat

func Heartbeat(cur realm)

Heartbeat is the keeper's sign of life: shots are sold only within KeeperFresh of the last one (a Commit counts too).

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/bubblerumble5" -func "Heartbeat" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/bubblerumble5" -func "Heartbeat" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx