TreasureHunt

NFC treasure hunt at real events, now with ENS names, World ID sybil gates and Seal-encrypted clues

ETHGlobal Lisbon 2026Shipped July 24, 2026Prize winner Dormant#identity#gaming#nft#infra#world
Visit Repo
TreasureHunt banner

About

Treasure Hunt turns physical events into on-chain scavenger hunts. Players tap NFC tags hidden around a venue, claim ERC-20 rewards gaslessly through ERC-4337 smart accounts, climb a live leaderboard, and spend those tokens on merch. It is not a hackathon demo: it has run in production at real events over the past eight months (ETHDenver, Festival da Juventude Cadaval, Smart Cities Summit, Data Summit), one deployment per event at <event>.treasurehunt.pt. The pre-existing app is the initial commit of this repo, tagged pre-hackathon; everything described below landed after that tag, in granular commits.

This weekend we added three capabilities the product could not have before.

ENS: every player has a name, and nobody pays for it. A self-hosted CCIP-Read wildcard resolver (ENSIP-10 + EIP-3668) answers for every name under our roots, so a player's handle becomes alice.lisbon.thehunt.eth with no transaction, no registry entry and zero marginal cost. The name is not cosmetic: it carries live game state as ENSIP-5 text records (pt.treasurehunt.score, .found, .editions, .scope), recomputed per request from the same database the app reads, so any ENS-aware client can read a player's game profile from the name alone. Resolvers are deployed and verified on Ethereum mainnet and Sepolia; chefmike.thehunt.eth resolves on mainnet today through ENS's own UniversalResolver. Purchased names are a second tier bought with in-game tokens through the existing merch rail and gated on an on-chain MerchPurchased event, and they are real ERC-721 tokens on the game chain: we mirrored ENS's own registry and registrar contracts onto the L3, where the registrar's baseNode is the same 32 bytes as namehash("thehunt.eth") on L1. One name identity, ownership on one chain, resolution on another. That is what makes the names outlive an event: a holder from a previous edition has no row in the current event's database and their name still resolves. Edition config also moved on-chain, into ENS's PublicResolver under cfg.thehunt.eth, and our ERC-4337 paymaster now resolves that name to decide which contracts it sponsors, so adding an event to the gas allowlist is a setText instead of an hardcoded variable change in the paymaster's proxy code.

World ID: gasless smart accounts create a real, economic sybil problem, because wallets are free and instant, so one person can farm tokens and drain limited merch stock with dozens of accounts. We put World ID at two points. Selfie Check gates merch redemption: the backend refuses to sign a purchase until the wallet has passed it, and the action-scoped nullifier is stored under two UNIQUE constraints, so one World ID backs at most one wallet and re-verifying from a second wallet is rejected. The same verification powers a verified-human badge and a verified-only leaderboard view. Identity Check gates 18+ prize pickup, requesting exactly one attribute (minimum_age: 18) and storing exactly one boolean. No document data, birth date or name reaches our servers.

Sui, Walrus and Seal: "The Lost Phrase", a side quest layered on the hunt. Four fragments of a clue phrase are encrypted with Seal and published on Walrus, public and content-addressed: anyone can fetch a ciphertext and verify we never swapped a clue mid-game. The player's browser pulls them straight from the public aggregator, so the ciphertext never passes through our infrastructure. Finding a marked quest tag reveals one fragment; the completed phrase leads to a final tag that appears on no map.

The point is where the decryption happens. The backend verifies on-chain that the player claimed that specific tag, signs a secp256k1 attestation over id ‖ bcs(session address) ‖ bcs(expiry), good for one fragment, one session and five minutes, then records a progress timestamp. That is the whole of its involvement. Nothing on our side ever contains plaintext: not a response, not a cache, not a log, and the progress table records only who revealed which fragment and when, with no column for the text itself. Outside the organiser's setup machine, the only plaintext copy in existence lives in the player's own browser, which holds an ephemeral Ed25519 SessionKey (no wallet, no gas, no signing prompt), fetches key shares directly from three key servers run by three independent operators (2-of-3), and decrypts locally. That takes about a second for a single fragment and three for the whole set of four, dominated by the key-server round trip.

Access is arbitrated by our own Move package on Sui testnet. Its seal_approve checks three things before a single share is released: that the key id belongs to this game's namespace, that the attestation has not expired against the on-chain Clock, and that the signature verifies against a backend public key frozen in an immutable GameConfig. It ships with two Move tests, one of them a test vector generated in JS that pins the attestation byte-for-byte across our backend and the on-chain verifier: message layout, hash flag and compact 64-byte signature. Take Seal out and the feature stops existing; there is no other path to the fragment text.

We are precise about the limit rather than waiting to be asked: the trust root is our attestation key, so the backend could attest to an address it controls. What it does not do is handle plaintext in operation, and it holds no decryption capability at rest. A leaked signing key still has to convince a threshold of independent operators, through a policy that is public on-chain. Removing that root means mirroring each find as a player-owned Sui object so the policy checks ownership instead of a signature, which needs sponsored transactions and stable per-player Sui addresses. That is a workstream, not an afternoon, and we scoped it out honestly.

Prizes

  • World · Selfie Check Beta -- Continuity · 2nd place

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

DormantRepo not reachable

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

Treasure Hunt

A player passport on Arkiv that follows people across Treasure Hunt events. Photos live on Swarm.