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

bubblerumble package

Overview

Package bubblerumble is a last-bidder-wins game in GNOT.

A pool has a pot and a clock. Every bid goes into the pot and resets the clock; the Nth bid costs BasePrice·√N. When the clock runs out, the last bidder takes the whole pot. Anyone can open a pool, and the coins sent with CreatePool seed its pot.

Paying more than the price buys a shorter clock: k× the price gives that bid a clock of window/k, never below a tenth of the window. The whole amount goes into the pot, and the next bid runs the full window again.

Function

ClockFor

func ClockFor(window, price, sent int64) int64

ClockFor is the clock a bid buys by paying sent against a price: the window divided by the multiple paid, never below window/MaxBoost.

Params

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/bubblerumble.ClockFor(,,)"

Result