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

lastwords/v0 package

Overview

Package lastwords is one string, on chain, forever.

There is a single message slot. Pay more than the last writer paid and the slot is yours; when the clock finally runs out, whatever is in it stays there permanently. The artefact at the end is the point, so the game is a bidding war over an epitaph rather than over a prize.

The three rules exist because the obvious version of this game does not end and does not pay:

  1. THE CLOCK TERMINATES. Every write pushes the deadline a fifth of the way to a hard end fixed when the slot opened, and no write can push it past that. A constant extension per action has no end: the pot grows faster than the price of the next write, so there is always a rational next write and the game runs until everyone is bored or broke.
  2. THE LAST WRITER DOES NOT TAKE THE POT. They take the slot, which is what they were bidding for. The pot is split among everyone ELSE who wrote, pro rata to what they paid. Winner-takes-all makes the second-to-last writer the mark and everyone knows it, which is why nobody joins.
  3. HALF OF EVERY PAYMENT GOES TO THE WRITER BEING DISPLACED, immediately. A zero-sum game minus gas has no reason for a second player. Overwriting somebody pays them, so being overwritten early is not a loss.

Nothing is ever pushed: payouts are credited to an internal ledger and swept by Withdraw. A realm that pays inside a loop over its roster is a gas bomb that eventually bricks, and the bigger the game gets the more certain that is.

The pieces are libraries, and the realm is the wiring: p/moul/x/games/clock(/p/moul/x/games/clock/v0) owns the deadline and its guards, p/moul/x/games/prorata(/p/moul/x/games/prorata/v0) owns the split, and p/moul/x/daily/pullpayment(/p/moul/x/daily/pullpayment/v0) owns the credit ledger.

Function

Message

func Message() string

Message returns the slot's current contents, raw. Render is what escapes it.

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/moul/x/games/lastwords/v0.Message()"

Result