A faithful reconstruction of Pandora's referral program, reverse-engineered live from the running app and its JS bundle. Every screen, string, and status below is what the real product shows — rebuilt here so each case is visible side by side. Reference for building Coinviction's own P7.
The confusion to avoid: creating your own code (referrer) and being bound to someone's code (referee) are independent. Different screens, different triggers, different signatures.
Generates a code on the /referral page, shares the link, watches stats, claims rewards.
/referral
Arrives via a ?ref= link, sees a global banner, signs once (gasless) to bind.
?ref=
There is no “enter a code” field anywhere. A code enters the system only through a share link, and the whole binding is these five moments.
Landing on any URL with ?ref=CODE writes the code to localStorage and immediately strips ?ref from the address bar. No wallet, no profile, no prompt.
?ref=CODE
?ref
Once the wallet connects, a full-width banner appears under the header on every in-app page — not on /referral, not in a menu. This is the piece that was invisible to you: your wallet never had an attributed code, so it never rendered.
authenticated
attribution.code
!hasReferrer
7N53XEGV
You are the Taker, you bet against the Maker that any market resolves against the Maker's selected position.
Sign on the banner opens this modal. Confirm triggers an EIP-712 RegisterReferral(user, referralCodeHash) signature. Gasless — no token approval, no fee.
RegisterReferral(user, referralCodeHash)
After signing, the backend records status pending_referrer and the banner disappears immediately (it treats pending as “already referred”). Later, the operator or referrer submits the on-chain registerReferral() — status flips to confirmed and the bond is permanent.
pending_referrer
registerReferral()
confirmed
The page the referrer owns. It has two states: before a code exists, and after. This is where “register a referral code” actually happens — a one-time on-chain signature.
Create your referral code and share it. Rewards are defined by the currently active campaign and change as campaigns rotate.
Earn 0.5% on every claim and withdrawal your referrals make. Whenever they cash out winnings or sold positions — your share is allocated automatically.
The referrer signs nothing. The backend computes the amount and the operator signs the voucher; the referrer just broadcasts it on-chain and pays gas.