A hands-on lab for XRPL Education Month
Arcade on the Ledger.
Finish a game, tap one button, and your score becomes a real transaction on the XRP Ledger test network. This page shows how a score turns into a memo, who reads it back, and why it is final. Everything here is testnet, so it is play money.
A score is just a short note on a transaction.
The ledger does not know what a game is. It knows transactions. So to save a score, the game sends a tiny Payment and attaches a memo that says which game, what score, and a nickname. Anyone can read that memo back later, and that is how the leaderboard works.
Saving a score is always optional. Every game is fully playable without it. Join The Den free to save your score, Star Cub: sign up here.
This is education. It is testnet only, there is no real money, and nothing here is financial advice.
A throwaway test wallet signs it.
The first time you save a score, your browser makes a brand new testnet wallet and asks the testnet faucet for free test XRP. The faucet is a public tap that exists only so people can practice.
- 1
The wallet's secret key is created in your browser and stays in your browser. We never see it and nothing sends it anywhere.
- 2
It is a throwaway. Test XRP has no value, and you can forget the wallet whenever you like.
- 3
Never share a wallet seed or secret key with anyone, for any reason. A real wallet app will never ask a website for it, and these games never ask for one.
The memo holds the game, the score and a nickname.
A memo is a short note attached to a transaction. It is public and it is permanent. Here is the shape of one, for a made-up player:
A hard rule: use a nickname, never a real name or an email. Never put a birth date, a birth time, a birth place, or any other personal detail in a memo. Anything written to a ledger is public and permanent, even on testnet.
A 1 drop payment to the collector address.
A memo needs a transaction to ride on. The game sends the smallest possible Payment, 1 drop, to a fixed testnet address that collects scores. A drop is one millionth of an XRP, and this is test XRP.
The fee, the ledger index and finality.
After you save, the game shows a card called What just happened?. These are the parts it explains.
- 1
Fee. Every transaction pays a tiny fee, usually 10 drops. It is destroyed, not paid to anyone. It makes spamming the ledger costly.
- 2
Ledger index. The ledger is a numbered series of pages. Your transaction lands on one page, and that number is the ledger index. A new page closes about every 3 to 5 seconds.
- 3
Finality. When enough trusted validators agree on that page, it is validated, and your transaction is final. It cannot be edited or reversed. That is why a memo must never hold personal details.
- 4
The hash. Every transaction has a unique hash. Paste it into the testnet explorer to see the same memo, fee and ledger index the game showed you.
A real one: this score was saved on the testnet while this lesson was built: transaction 145E2BF4...BD9A95. Open it and look for the memo, the fee (12 drops) and ledger index 22295779.
The leaderboard reads the ledger back.
The on-ledger leaderboard on Ursa Ledger does not use a database. It asks the testnet for the collector address's incoming payments, decodes each memo from hex, and keeps the best score per test wallet for each game.
- 1
Reading needs no password and no secret. Anyone can run the same query and get the same answer.
- 2
Anyone can also send a test transaction, so scores are self-reported. A public ledger proves a score was written, not that it was earned. It is a fun board for learning, not a referee.
- 3
The board only shows the nickname, the game, the score and a link to the transaction.
Weekly high-score challenge.
Loading this week's challenge...
Five games can save a score.
- 1
Ledger Snake and Ledger Defender: finish a run, then tap Save my score on the testnet ledger.
- 2
Ledger Racer and Ledger Swarm: same idea. In Swarm, pick Play, since Watch mode is just a demo.
- 3
Color the Ledger: color a page, tap Save my picture, and your score is the number of shapes you colored.
Reminder: pick a nickname, never personal details. Never put a birth date, time or place on the ledger.