A Hoken Tech workshop · games

A treasure hunt on the blockchain.

Teams hunt for hidden cards and claim the secret codes from their phones. The contract knows only each code's fingerprint, gives the points and runs the live leaderboard. Then the debrief: how could you cheat, and how do you fix it? In the extended version, each team hides its own treasure.

Duration

Short 2 h 15 min · Extended 4 h 20 min

For

Schools, team building, events and festivals, anyone who learns best by playing.

Participants need

Short: a smartphone per team. Extended: a computer and a free GitHub account.

Live demo · real test blockchain

The leaderboard

In class, teams type here the codes they find. On this page the demo is read-only: you can see how many codes are hidden and the leaderboard.

This is the same lab participants use in class, in read-only mode: the data comes live from the EOS Jungle4 testnet.

Open the lab full screen ↗

What participants learn

  1. 1

    Why games on a blockchain are fair by design: public rules nobody can change mid-game.

  2. 2

    A real case, The Lost Diamond, and the trick: checking a code without ever revealing it.

  3. 3

    The flaw: codes travel in clear text. How commit-reveal fixes it, and why codes must be long.

  4. 4

    Extended version: each team publishes its own hunt, hides a code and claims the others' from its Codespace.

The programme

Every part has slides with speaker notes, a hands-on exercise in the lab and real transcripts from the testnet. The short version needs only a smartphone. The extended one adds the smart contract part: participants write it, publish it on the testnet and use it.

  1. 15′Blockchain isn't just bitcoin
  2. 20′A file's digital fingerprintExercise 1
  3. 20′Playing on the blockchain
  4. 50′The treasure huntExercise 10
  5. 20′How it worked, and how you could cheat
  6. 15′Coffee breakExtended
  7. 15′Our development labExtended
  8. 20′A test account of your ownExtended
  9. 20′The «treasure» contract, line by lineExtended
  10. 20′Compile and publishExtended
  11. 35′Hide your treasureTeam challengeExtended
  12. 10′Wrapping up

Total: 4 h 20 min

The smart contract

The contract hashes the code it receives and compares it with the fingerprints it stores: the first team to find a code takes all its points.

void claim(name by, string team, string code) {
   require_auth(by);
   const string c = normalize(code);         // minuscole, senza spazi ai lati
   auto clue = byhash.find(sha256(c.data(), c.size()));
   check(clue != byhash.end(), "codice sbagliato: controllate di averlo copiato bene");
   // … una squadra non riscatta due volte lo stesso codice …
   const uint32_t points = first ? clue->points : 1;
}

Excerpt. Messages are in Italian, as in class.

Read more on our blog

The workshop grows out of these articles. They're in English.

Want this workshop for your team or class?

Tell us who it's for, how many people and which version you'd like. We'll reply with a proposal and dates.

Cookie settings · Recedi dal contratto qui

© 2026 HOKEN TECH S.R.L. · Via Ippolito Nievo 25, 70056 Molfetta (BA), Italy · VAT 08677120720 · REA BA-642341 · PEC hokentech@pec.it · +39 371 791 4151