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

Price

func Price(base, n int64) int64

Price of the next bid in a pool with the given base price and n bids so far. Sublinear in n: bid 1 costs base, bid 4 costs 2·base, bid 100 costs 10·base.

Params

Command

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

Result