A player passport on Arkiv that follows people across Treasure Hunt events. Photos live on Swarm.
Treasure Hunt turns events into NFC scavenger hunts. Players tap tags around the venue, claim tokens without paying gas and swap them for merch. It has run at a dozen events since 2025, with 488 player accounts on chain.
Every event runs as its own deployment with its own database, so players started from zero each time. At Mumbai we gave them a passport on Arkiv that every event can read. A player's first find at an event adds that event's badge to it. It also keeps their name and an optional profile photo. We encrypt the photo and only the ciphertext goes to Swarm. If the player removes the photo, nobody can decrypt the Swarm copy again.
The demo runs two events, mumbai1 and mumbai2, each with its own contract and database.
Next.js on Vercel, one deployment and one Neon Postgres per event. Claims are ERC-4337 user operations from thirdweb smart accounts, paid by a paymaster on our own testnet (Nova Cidade).
New at Mumbai: after a claim, the server reads the contract to confirm it, then writes to Arkiv with @arkiv-network/sdk. A player's first find at an event creates a read-only badge, indexed by player and event. Their first find anywhere also creates the passport, and both go in one batch. One issuer wallet writes everything. Anyone can write under our schema names, so every read filters on that wallet. Entities get Arkiv's six-month maximum, and each new badge renews the passport.
The server encrypts photos with AES-256-GCM and uploads the ciphertext through the public Swarm gateway. The passport holds the Swarm reference and a random nonce. Our landing site derives the key from a secret and that nonce, and only for the nonce the passport holds right now. We skipped Swarm's built-in encryption because its references carry the key, and anyone can read an Arkiv entity.
We wrote the code with Claude Code. The README lists what the AI did.

