Channel apps
On chain, every move of a game costs one transaction and some waiting for a block. A channel app removes that cost for two players: they pay their stakes on chain, exchange moves directly as signed vouchers, and put one settlement on the chain at the end. Every node then replays the signed moves through the same rules engine that judges on-chain play.
Opening a channel
A channel game is created with CreateApp and the channel flag set to 1. It requires exactly two seats, and both stakes are paid on chain as usual. From then on the moves travel off chain: an AppMove, ResignApp or ClaimAppTimeout sent for a channel game is a paid no-op.
Signed moves
Each move is a voucher signed by the seat that makes it, over this digest:
SHA3-256(app id (LE8) ‖ seq (LE4) ‖ SHA3-256(state before) ‖ move)
The signature is checked according to that player's account type (keys and account types). Because the digest covers the app's id, the move's sequence number and the state before the move, a signed move cannot be reused in another game or in another position. In the official wallet the vouchers travel between the two players through a relay, the same service that carries calls (relays).
Settling
Either player can file a SettleApp (type 39). Its body holds the app's id and final_seq, which must equal the number of vouchers, followed by each voucher: the seat, the move's length, the move and a 64-byte signature. One settlement carries at most 1,024 vouchers.
Every node replays the vouchers from the game's state through the same engine, checking every signature and every turn, and records the result. A SettleApp that fails, because it cannot be parsed, names the wrong app, comes from someone who is not seated or carries a bad voucher, is a free no-op: nothing is charged. Only the two seated players may file one.
The challenge window
A settlement is a claim, recorded with a deadline 240 blocks later. During that window either player may file a SettleApp with a higher final_seq, that is, a longer valid chain of moves. Each accepted override replaces the claim and restarts the 240 blocks. When the window closes, the last claim is applied:
- the game was won: the winner gets the pot minus the 1 % rake;
- the game was drawn: both stakes are refunded;
- the game was still running: the seat on the clock forfeits, and the pot minus the rake goes to the other player.
Playing safely
- Keep every signed move you receive. The latest signed position is your protection against a settlement that stops early.
- Watch the chain for settlements of your games: a claim that nobody answers within 240 blocks stands.
- Expect no privacy and no discount. Channels are for exactly two seats, the result is public once settled, and a decisive game pays the same 1 % rake as on-chain play.