DEV Community

N3ST3D Labs
N3ST3D Labs

Posted on

Building a Crypto-Native Fantasy Sports App on Solana — Web2 + Web3 Auth, USDC Prizes, and a Bracket System for the World Cup

How we built $BRACKETS — a FIFA World Cup 2026 fantasy league where players sign in with Google, Facebook, or a Solana wallet and compete for $BRACKETS and USDC prizes in 170+ countries.

Most fantasy sports platforms force you to choose — either build for crypto natives and lose casual users, or build for casual users and lock out the Web3 crowd entirely.
We refused to pick.

$BRACKETS is a FIFA World Cup 2026 fantasy league that works for everyone. Casual fans sign in with Google or Facebook and never touch a wallet. Crypto natives connect Phantom or Solflare and sign a message. Both play the same game, compete on the same leaderboard, and win the same USDC prizes — paid directly to their wallet regardless of how they signed up.
In this post I'll walk through:

Why we supported both Web2 and Web3 authentication in the same NextAuth session
How we unified Google OAuth, Facebook, and Solana wallet signatures into a single user model
The Solana wallet verification flow using verifySolanaSignature
How we structured USDC prize pools and KYC flows for winners
The bracket migration cron jobs and playoff logic
Building the Meteora DBC liquidity pool for the $BRACKETS token
Auth headaches with Brave browser, PKCE cookies, and ModSecurity WAF
What we'd do differently starting today

Stack: Next.js 15 App Router · Node.js/Express · MongoDB · Solana web3.js · NextAuth v5 · Jupiter + Meteora DBC · Ant Design · DigitalOcean

The auth architecture in one paragraph — give readers a taste before the full article:
The hardest part wasn't the blockchain — it was unifying three completely different identity systems into one session. Google and Facebook return an email and OAuth token. A Solana wallet returns a public key and a signed message. We unified both into a single MongoDB user document with a connector field — "Google", "Facebook", or "Wallet" — and a shared JWT session that carries the same role, username, and Solana address regardless of how the user authenticated. Wallet users can optionally link an email later. Email users can optionally link a wallet. One account, two doors in.

Top comments (2)

Collapse
 
rasama32 profile image
Radell Young

This is awesome 😎

Collapse
 
cosmo_cosmo_e972830e066 profile image
Cosmo (cosmo)

Nice Looking Fantasy App