Your nickname is your invite link
Invite somebody to opolyx and you both earn 200 XP — paid once they have finished a real game, never for signing up. Your link is simply your name on the end of the address.

In plain words
There is now an invite card in the lobby, just under your daily goals. It holds one link, it is yours, and there is nothing to generate: your invite link is the site address with your own nickname on the end. Copy it, send it to whoever you want at the table, and you are done.
When somebody arrives through your link and finishes their first real game, you both get 200 XP — 400 between you, on top of whatever that game itself paid out. There is no cap on how many people you can bring, and nothing to claim: the XP simply lands.
The one thing worth knowing is the timing. Nothing is paid when your friend signs up — only when they have actually played a game through to the end. That is deliberate: an account that never plays is worth nothing to anybody, and an invite that pays on signup is an invitation to create empty accounts rather than to bring real people. It also means the link keeps working long after it is sent, so somebody who bookmarks it in April and plays in June still counts.
For the technically curious
The invite code is the inviter’s nickname rather than a generated string, and that is a design decision rather than a shortcut. A link built out of a name survives being read aloud, retyped from memory or pasted into a chat that mangles it, and it tells the person receiving it who it is from. It works without a lookup table because nicknames are already unique and already restricted to letters, digits and underscores — a strict subset of what the site was willing to accept in that slot — so the name resolves directly and does so regardless of capitalisation.
The unusual part of this one is how much of it already existed. The tables were added in one of the first migrations this project ever ran, and the site had been quietly recording the invite parameter into a cookie ever since — a cookie nothing ever read. So both ends of the loop had been in place for months with no middle: no way to see your own link, and no code path that ever turned that cookie into a recorded invitation. Both tables were still empty on the day the middle was written.
| Recorded | When |
|---|---|
| Who invited whom | On the invited player’s first sign-in |
| The XP both sides earned | When they finish their first real game |
The grant refuses more than it accepts: you cannot invite yourself, you cannot be credited to one of the regulars who fill quiet rooms, an invitation is written once and never overwritten by a later link, and nothing is paid until a real game is behind it. Paying is idempotent, so a game that finishes twice — a retry, a redeploy mid-commit — cannot pay twice. The reward itself is granted by a function only the server can call.
