Referral System
Invite your friends and earn XP. It’s simple and idempotent (safe to click multiple times).
How it works
You share your referral link (
?ref=<alias-or-address>
).A new user connects wallet on Baddie.
If a
ref
is present (URL → cookie → db), we attach the inviter:+100 XP to inviter (welcome referral)
If the invited user later links X, inviter gets +150 XP more
We support aliases (e.g.
hyperliquid
) viaref_aliases
collection and raw addresses. Self-ref is not allowed.
Attach window
A new user has a limited time after their first visit to be attached to an inviter:
Window:
REF_ATTACH_WINDOW_HOURS
(default: 48h)
If the window expired or user is already attached, the API returns an explicit reason.
API
See: /api/ref/attach