1Two layers
A sidechain is a separate blockchain that leans on a bigger one. The Divi Games gamechain is a small chain run by one operator. It holds the games, the game money (GOLD) and the order book. Divi testnet is the real Divi chain in its test version. The gamechain borrows three things from it: Divi addresses as accounts, Divi block hashes as a clock and a source of randomness, and Divi transactions as a place to leave a fingerprint of its own history.
| Link | Direction | Trust needed |
|---|---|---|
| MCHK checkpoint | Divi → gamechain (read) | none: it is a public block hash |
| DGCH anchor | gamechain → Divi (write) | evidence only |
| tDIVI bridge | funds both ways | custodial: you trust the operator |
| HTLC swap | funds both ways | trustless |
2One sequencer makes the blocks
There is no mining and no staking on the gamechain. One program, divi-gamechain, collects signed transactions in a mempool, puts them in order and produces blocks. The node that does this is the sequencer. It produces a block every block_ms (default 2000 ms) when the mempool has something in it, and an empty heartbeat block after heartbeat_ms (default 60 000 ms) without one, so the chain keeps a pulse and keeps picking up Divi checkpoints.
Ask the live node who it is:
curl -s https://games.divi.domains/chain/v1/info
{"chain_id":"divi-games-testnet-1",
"divi":{"hash":"73c7f04d783a16507eb889248cfc87979b056c2a5df623e90d0797c9daf596f4","height":359925},
"divi_seen":{"hash":"73c7f04d…f596f4","height":359925},
"head_hash":"ddbe9df51f51bf5562c8102da60e429323e584fc9d2a54d9c2717afff4b7ddc4",
"height":1398,"mempool":0,
"modules":["backend","blackjack","bridge","certificate","htlc","market","system","tictactoe","towerdefense"],
"network":"testnet",
"sequencer":"xw9aaoN8FBrQcesu8F29ZjL6irKxyXpRRZ",
"time_ms":1792612012118,"tokens":["GOLD","TDIVI"]}
The sequencer is a Divi testnet address, xw9aaoN8FBrQcesu8F29ZjL6irKxyXpRRZ. Every block carries that address as producer and is signed by its key. The last two blocks show the heartbeat: with no transactions waiting, they are exactly 60 001 ms apart.
curl -s 'https://games.divi.domains/chain/v1/blocks?limit=2'
[{"hash":"89d8884e…14fc7e5c",
"header":{"divi":{"hash":"73c7f04d…f596f4","height":359925},
"height":1397,"prev_hash":"6df231d8…4347a169",
"producer":"xw9aaoN8FBrQcesu8F29ZjL6irKxyXpRRZ",
"state_root":"8f59f332…40ae210","time_ms":1792611952117,
"tx_root":"e3b0c442…7852b855"},
"sig":"HwL9ck2FKN8kDvK7lW86vuXfCLZerbE2X4jUxeT2j7pLXmrk9osC7R1+I3vGYKOkQHssUgFdbMCbXYcS/FmoDJI=",
"txids":[],"events":[]},
{"hash":"ddbe9df5…4b7ddc4",
"header":{"divi":{"hash":"73c7f04d…f596f4","height":359925},
"height":1398,"prev_hash":"89d8884e…14fc7e5c",
"producer":"xw9aaoN8FBrQcesu8F29ZjL6irKxyXpRRZ",
"state_root":"65d285e5…64b0ce6","time_ms":1792612012118,
"tx_root":"e3b0c442…7852b855"},
"sig":"IBe+pnukF5Z0CosvY57rQKWnDwQgjvpd84NX5CQcKexTA0qKOECecV7fMnSoVUyZwqw9/v1KOZgnk6EQds77JwA=",
"txids":[],"events":[]}]
/v1/blocks takes from= (first height) and limit= (default 20, at most 100). Without from you get the newest limit blocks, oldest first. One block is /v1/blocks/<height>.
height, prev_hash, time_ms, divi {height, hash} (step 4), tx_root (SHA256 over the ordered txids; e3b0c4… is the hash of nothing), state_root (step 7) and producer. The block hash is SHA256 of the header, and sig is the sequencer's Divi signed message over dg-block:<height>:<block_hash>.
3Accounts are Divi addresses, moves are signed messages
There are no usernames. An account on the gamechain is a Divi testnet address (starts with x or y). If you can sign with the key behind an address, you are that account. A transaction is a JSON text plus a Divi signmessage signature over exactly that text: the same kind of signature divi-cli signmessage or the IronDivi browser extension makes, so any Divi wallet can play.
Here is the second transaction ever made on the live chain, the sequencer claiming 1000 GOLD from the faucet for the blackjack house:
curl -s https://games.divi.domains/chain/v1/tx/09c1d95dd04f09778c21b72f9b7d0bb926dc0d29cf0d84ded29e7367d5070ef8
{"body":"{\"v\":1,\"chain\":\"divi-games-testnet-1\",\"from\":\"xw9aaoN8FBrQcesu8F29ZjL6irKxyXpRRZ\",\"nonce\":1,\"action\":{\"token\":\"GOLD\",\"type\":\"faucet\"}}",
"sig":"Hz+VJiBi05dXJFX0rwgNK/jUNB4c70UySpUxKDOGTzkVe/nWT9F0wnkIfBKNZdAyLyoLo0bzH6iVNYku9Azk+Tk=",
"receipt":{"txid":"09c1d95d…5070ef8","height":2,"index":0,"ok":true,"error":null,
"events":[{"kind":"faucet","data":{"amount":"100000","to":"xw9aaoN8FBrQcesu8F29ZjL6irKxyXpRRZ","token":"GOLD"}}]}}
bodyis a string, not an object. The node never re-serialises it: it verifiessigover those exact bytes and checks that the recovered address equalsfrom. A wallet can show you precisely what you sign.chainisdivi-games-testnet-1, so the signature is useless on any other chain.noncecounts your transactions from 0 and stops replays.sigis 65 bytes in base64: a header byte (27 + recovery id + 4 for a compressed key), thenrands. The message is hashed with Divi's prefix"DarkNet Signed Message:\n"first.- The txid is SHA256 of the body bytes. Amounts are decimal strings of base units:
"100000"is 1000.00 GOLD, which has 2 decimals.
A transaction with a bad signature, wrong chain or wrong nonce never enters the mempool. A valid transaction whose action fails (an illegal move, say) is included, with "ok":false and an error, and its nonce is used up. The full signing walk-through is in Sign in with your Divi address.
4The Divi checkpoint in every block
Every gamechain block header carries divi: {height, hash}, the MCHK checkpoint: a block of Divi testnet. The sequencer reads it over Divi RPC (getblockcount, then getblockhash of the tip minus 6). Six blocks back keeps it away from a reorganisation at the tip. It never goes backwards: if Divi RPC cannot be reached, the next block repeats the last checkpoint. Let us check all three claims.
Block 1398 above says divi.height = 359925, hash 73c7f0…. Ask the public Divi testnet RPC, at the same moment, for its tip and for that block's hash:
curl -s -X POST https://services.divi.domains/api/testnet/rpc/ -H 'Content-Type: application/json' \
-d '{"jsonrpc":"1.0","id":1,"method":"getblockcount","params":[]}'
{"error":null,"id":1,"result":359931}
curl -s -X POST https://services.divi.domains/api/testnet/rpc/ -H 'Content-Type: application/json' \
-d '{"jsonrpc":"1.0","id":1,"method":"getblockhash","params":[359925]}'
{"error":null,"id":1,"result":"73c7f04d783a16507eb889248cfc87979b056c2a5df623e90d0797c9daf596f4"}
The tip is 359931, the checkpoint is 359925, exactly 6 below, and the hash Divi gives for 359925 is the hash in the gamechain header. You can open that block on the testnet explorer.
Scroll back to the start of the chain and you see the checkpoint moving: block 2 (made 2026-10-20) carried Divi block 358506; block 1398 carries 359925. Block 1 is the one honest gap: it was produced in the first milliseconds, before the first RPC poll came back, so its checkpoint is {"height":0,"hash":""}.
curl -s https://games.divi.domains/chain/v1/blocks/2
{… "header":{"divi":{"hash":"70001c6d1aaa2393e126a96038ca55aaeb2e4a2d098ed029c4c167c12cc14f19","height":358506},"height":2, …
It dates every gamechain block against Divi, and it gives games public randomness: H(checkpoint.hash || txid). A player cannot know a future Divi block hash when they sign, and the sequencer cannot choose it. Tower defense seeds its levels this way. The checkpoint's wire form, shared by the divi.domains sidechains, is "MCHK" || 0x01 || height u32 LE || hash[32], 41 bytes.
5Anchors: writing back to Divi
The checkpoint is a read. The DGCH anchor is the write. Every [anchor] every blocks (default 300, about 10 minutes when the chain is busy) the sequencer broadcasts a Divi testnet transaction with an OP_RETURN output of 77 bytes:
"DGCH" || 0x01 || height u64 LE || block_hash[32] || state_root[32] 4 + 1 + 8 + 32 + 32 = 77 bytes
It is paid from the sequencer's own Divi testnet address: the public RPC has no wallet, so the node builds and signs the transaction itself from getaddressutxos and sends it with sendrawtransaction, paying a flat fee. The Divi txid is then written back onto the gamechain as a system/anchor_recorded action, so you can find the anchor from either side: /v1/games/system?view=anchors.
What an anchor proves: if the operator later shows you a different history, its state_root at the anchored height will not match the 77 bytes that Divi already holds, and Divi's ordering bounds when the anchor existed. What it does not prove: anything about the blocks between anchors, and it moves no funds. It is evidence, not enforcement.
Anchoring is off until the sequencer's address holds testnet DIVI ([anchor] enabled = true). On 2026-10-21 curl -s 'https://games.divi.domains/chain/v1/games/system?view=anchors' returned {"anchors":[]}. Anchors and the tDIVI bridge turns it on and decodes a real one.
6Moving value: bridge or swap
The gamechain has two tokens built in, and games may create more. Everything is testnet-only.
curl -s https://games.divi.domains/chain/v1/tokens
[{"symbol":"GOLD","name":"Gold","decimals":2,"issuer":"core","faucet_amount":"100000","faucet_cooldown":1800,"max_supply":null,"supply":"100000"},
{"symbol":"TDIVI","name":"Testnet DIVI (bridged)","decimals":8,"issuer":"module:bridge","faucet_amount":"0","faucet_cooldown":0,"max_supply":null,"supply":"0"}]
- GOLD is the game money. Anyone claims 1000 GOLD from the faucet, once per address every 1800 blocks. You need no testnet DIVI at all to play.
- TDIVI is testnet DIVI that crossed over. Its supply is 0 today: nothing has been bridged yet.
The tDIVI bridge (custodial)
Send testnet DIVI to the bridge address. The sequencer watches that address (getaddressdeltas) and after 6 confirmations mints the same amount of TDIVI to the address that funded the deposit, once per outpoint, so a deposit can never be credited twice. To go back, bridge/withdraw burns your TDIVI and queues a payout that the operator pays by hand from the bridge wallet. The operator holds the real coins: if they stop paying, the chain cannot force them. That is what custodial means, and the amounts are testnet.
The HTLC swap (trustless)
A hash-time-locked contract lets two people trade across the two chains without trusting each other. The gamechain's htlc module uses the same rules as the IronDivi divi-swap script on the Divi side, so one secret unlocks both:
- A makes a secret
sand locks tDIVI on Divi testnet withh = SHA256(s)and a long timeout. - B checks that lock and locks GOLD on the gamechain (
htlc/lock) with the samehand a shorter timeout. - A claims the GOLD with
s. The preimage is published in the receipt. - B reads
sfrom the receipt and claims the tDIVI. If anyone goes quiet, each side refunds after its timeout.
Timeouts on the gamechain are heights, not clock times, and the two chains run at different speeds, so leave margin. The Divi side of a swap is practised in Atomic swaps on regtest.
7State roots and replay
All gamechain state is one sorted key-value map in SQLite: balances (bal/<addr>/GOLD), nonces, token info, and each game's own keys under m/<module>/. Each block commits to the whole history of writes:
state_root = SHA256( prev_state_root || SHA256(this block's writes, in key order) )
It is a chained commitment, not a Merkle tree. It cannot prove one balance on its own. What it gives you is cheap and complete: anyone with a copy of the blocks can re-run them from genesis and must reach the same root, because every game module is deterministic (no clock, no random numbers, no floating point). That check is one command, divi-gamechain replay, and you run it yourself in Run the gamechain on your own computer. On a fresh node it prints something like ok: 7 blocks, 4 txs, 11 state keys, state root 872a6e77….
Put the three pieces together and you have a full audit: replay your copy, take (height, block_hash, state_root) out of a DGCH anchor on Divi, and compare. Transactions are signed by their senders, so the operator cannot invent one; the roots are chained, so changing an old block changes every root after it.
8Honest limits
| Limit | What it means for you |
|---|---|
| One operator | You trust the sequencer to include your transaction and not to reorder unfairly. It cannot forge your moves (they are signed by you) and it cannot quietly rewrite the past once an anchor is on Divi, but between anchors it is a single server. |
| Testnet only | The chain is configured for Divi testnet and rejects mainnet D… addresses. The node refuses to start with a mainnet key. Nothing here touches real DIVI. |
| Games, not gambling | No real-value token can be deposited and nothing can be cashed out for value. GOLD comes from a free faucet. |
| Anchors are evidence | They prove a history existed by a certain time. They do not move funds or punish anyone. |
| The bridge is custodial | Payouts are manual. Use an HTLC swap when you want to rely on no one. |
Where to go next
- Run the gamechain on your own computer: build
divi-gamechain, start your own chain, claim GOLD from your own faucet, replay it. - Sign in with your Divi address: the signed-message handshake in detail.
- Anchors and the tDIVI bridge: turn anchoring on and decode a DGCH transaction.
- The JavaScript SDK: put a game on your own page.
- Play now at games.divi.domains; the site's own courses cover the same ground with quizzes.
Stuck? Ask the Divi chatbot, or see all tutorials.