Docs · v1

How the floor works

Market History Run is a first-person maze through twelve moments of market history, from the first publicly sold share in 1602 to stock tokens trading around the clock on Robinhood Chain. The maze and its rules live in one contract, Floor.sol. The website is a way to walk it and to send your route to that contract.

Overview

The maze

The grid was generated once with a seeded recursive backtracker (seed 2), which makes a perfect maze: every open cell is reachable and there is one path between any two of them. The layout is stored in the contract as four 256-bit words, one bit per cell, row by row. Cell c is at x = c % 31, y = c / 31.

A copy of the grid is at maze.json with the start, exit, station cells and the shortest route.

Moves

ByteDirectionChange
0Upy − 1
1Rightx + 1
2Downy + 1
3Leftx − 1

The website writes a byte every time your position crosses into a new cell. Walking into a dead end and back costs two bytes per cell. The contract accepts at most 6,000 bytes.

Stations

#YearStationCellx,yStep on route
011602The first share344(3,11)20
021792Under the buttonwood411(8,13)39
031896An average appears295(16,9)59
041929Black Tuesday117(24,3)79
051971No floor246(29,7)98
061975May Day302(23,9)118
071987Black Monday734(21,23)138
082000Five thousand422(19,13)158
092008The boxes503(7,16)177
102010Flash crash751(7,24)197
112021GameStop849(12,27)217
122026The market never closes852(15,27)236

The walls between two stations are painted in the era of the station ahead of you: Amsterdam brick, buttonwood bark, newsprint, ticker tape, green-screen terminals, a chalk commission board, red quote boards, dot-com tiles, cardboard boxes, server racks, a phone app and chain blocks.

The contract

function verify(bytes moves) view returns (
  bool ok, uint256 steps, uint256 cleared, uint256 at, string reason)

function submit(bytes moves)          // reverts with the reason if refused
function best(address) view returns (uint32)
function record() view returns (uint32)
function recordHolder() view returns (address)
function finishes() view returns (uint32)
function lastRuns() view returns (Run[])   // newest first, up to 50
function stations() pure returns (uint16[12])
function isWall(uint256 cell) pure returns (bool)

verify is free to call. It walks the bytes from the start cell and stops at the first problem, returning how far it got. submit runs the same walk and, if it is clean, updates your personal best, the record and its holder, the finish count, and emits Cleared(runner, moves, personalBest, newRecord).

There is no owner, no setter, no upgrade path and nothing to withdraw. A 256-move run costs about 365,000 gas on first submission. The full source is at contracts/Floor.sol and the ABI at contracts/Floor.abi.json.

Status: not deployed yet. Until it is, the website answers Ask the chain with a local copy of the same rules and says so.

Refusals

ReasonWhen
empty runZero bytes
over 6000 movesMore than 6,000 bytes
unknown move codeA byte other than 0–3
off the gridA step outside the board
into a wallA step into a wall cell
station out of orderA later station before an earlier one
stations missingThe run ended with fewer than twelve cleared
not at the exitAll twelve cleared, but the last cell is not (29,29)

Hall

The Hall reads lastRuns(), record() and finishes() straight from Robinhood Chain through the public RPC. Runs you finish on this device are also kept in your browser with their moves, time and verdict, so you can ask the chain about them again or submit them later.

Token

$MHR is an ordinary Pons coin on Robinhood Chain (chain ID 4663). It has no rights over the maze, the contract or the record. The floor judges a wallet with no $MHR exactly like a wallet with all of it.

Sources