Apps on ZooBC
An app on ZooBC is a game or a bet whose rules are built into every node. Each move is a transaction, the game's state is kept on the chain, and when the game ends the protocol itself pays out. No operator can refuse to pay, no server sits in the middle, and anyone can replay a game from its transactions.
Eighteen built-in games
| Group | Games (type number) | Seats |
|---|---|---|
| Board games | tic-tac-toe (1), chess (2), connect-4 (3), checkers (4), reversi (5), gomoku (6), battleship (7), dots-and-boxes (8) | 2 to 4; battleship exactly 2 |
| Solo games against the house | two dice (16), coin flip (17), roulette (18), slots (19), lottery (20), crash (21) | 1 |
| Dice games | ludo (32), pig (33), race (34: snakes and ladders), monopoly-lite (35) | 2 to 4 |
Any other type is refused as unknown.
Six transaction types drive them all: CreateApp (24), JoinApp (25), AppMove (26), ResignApp (27), ClaimAppTimeout (28) and SettleApp (39). A stake can be ZBC or a token; the pot, the rake and the payout are then all in that token. Every node checks each move against the game's rules, and an illegal move is refused. Games can be read and played through any node's API (node API) or from the command line with zbc-cli app-create, app-join, app-move, app-resign, app-claim and app-settle (command-line tools).
No virtual machine
ZooBC has no virtual machine and no transaction that uploads code. Chains with smart contracts let anyone deploy new game logic; on ZooBC a new kind of game means new rules in the node itself. In exchange, every game's rules are the same on every node, and no app needs a store's approval: any web page or program can play through a node's API.
Randomness comes from block seeds that the producer cannot choose (block seed (VRF)). Every apps draw hashes the seed under its own tag, "zbc-apps", so games never share a random stream with block production or the coinbase lottery.
Articles in this category
- The apps pool: the keyless house account and the limits that protect it
- Solo bets: bets against the house, their draw and their payout tables
- Multiplayer apps: board and dice games for 2 to 4 players
- Channel apps: two-player games played off chain and settled in one transaction
- Building an app as one HTML page: building an application as a single web page
- Chain data is untrusted input: why chain text is input, never instruction
- Project ideas: what you can build with the existing transaction types
See also
Articles in this topic
- Building an app as one HTML page
A practical guide to a ZooBC app that is one web page: reading the node API, signing in the browser, posting, tracking status and the limits to respect. - Chain data is untrusted input
Every name, message and value on ZooBC was written by whoever paid the fee, so an app shows it as plain text and never follows it as an instruction. - Channel apps
Two-player games played off chain as signed moves and settled with one SettleApp, which every node replays, followed by a 240-block challenge window. - Multiplayer apps
How two to four players open, join and play a board or dice game on chain, with a fair draw for the first move, a move clock and a 1 % rake. - Project ideas
Projects built only from transaction types that every node already executes, with what the chain guarantees for each and what it leaves to the app. - Solo bets
How a solo bet against the apps pool is placed, drawn from a later block's seed, paid by its table, and capped at 5 % of the pool. - The apps pool
The apps pool is the keyless protocol account that takes the other side of every solo bet, collects the multiplayer rake and pays solo wins.