A new app called Loyalty Ledger lets sports fans store their check-in streaks, badges, and history on the Solana blockchain rather than in a centralized database, making the data permanently owned by the fan. The project, built over a weekend for a hackathon challenge, uses Solana's Anchor framework to create a program-derived address (PDA) for each fan, keyed to their wallet, sport, and team. This design ensures that no one — not even the app's creator — can reset, inflate, or delete a fan's loyalty record.
The Problem with Traditional Sports Apps
Every sports app today asks users to check in, build streaks, and earn badges — but that history vanishes the moment a user stops opening the app or switches to a competitor. If the app shuts down or decides to wipe inactive accounts, the fan's loyalty record is gone forever because it was never truly theirs. Loyalty Ledger addresses this by storing the streak on-chain, where it remains verifiable and portable regardless of what happens to any single frontend.
The app currently supports FIFA World Cup as a fully functional path. Users connect a Phantom wallet on Solana devnet, pick a team, and check in — each check-in sends a real transaction that creates or updates an on-chain account. The streak count, badge tier, and actual badge tokens exist only on Solana, not in the developer's database. A "Fan Passport" displays the streak, a derived Fan Score, tier levels (Rookie → Devoted → Veteran → Legend), a progress bar, an achievements grid, and a leaderboard ranking fans by real on-chain streaks.
Technical Architecture and Challenges
The core Anchor program defines a `FandomRecord` struct containing the wallet, streak count, last check-in timestamp, bump, highest tier claimed, sport, and team. The check-in instruction either creates a new PDA or updates an existing one, extending the streak or resetting it if too much time has passed. The developer initially stored sport and team only in the PDA seeds, but quickly discovered that made it impossible to query "who are the top Argentina fans" because seeds only allow deriving a specific account when you already know the inputs. Adding sport and team as actual fields on the account enabled a `getProgramAccounts` call filtered by sport and team to rank all fans by streak using real chain state.
Solana was chosen specifically because check-ins need to be frequent and near-free — each transaction confirms in about a second and costs a fraction of a cent. This makes the concept of checking in every match, forever, practical rather than a demo-only gimmick. A side effect of the PDA design is that any other application knowing the program ID can read fan records directly without an API key or integration meeting — a ticketing platform could offer loyalty discounts based on the same on-chain data, for example.
The developer spent significant time on devnet SOL issues: the official faucet rate-limits per IP, and every account-struct change required a full redeploy needing enough SOL for rent. Bouncing between the CLI faucet and backup faucets consumed time that could have gone into building. Despite this, the core loop works: users can connect a wallet, check in, watch confetti fire, and claim a badge that mints a real SPL token to their wallet — permanently.
How to Try It
To test the app, users need to install the Phantom wallet, switch it to Devnet (Settings → Developer Settings → Change Network → Devnet), and grab free devnet SOL from a faucet to cover transaction fees. Then they open the app at https://loyalty-ledger-blond.vercel.app, connect their wallet, pick FIFA World Cup and a team, and hit check-in. After three check-ins, they can claim a badge that appears as a real SPL token in their Phantom token list. The app also includes stubbed paths for NBA and "Other International Sport" with sample data and no chain writes, clearly labeled as such.