Referral codes
A referrer registers a unique code. A code is one-time and immutable per referrer — you cannot change your code once registered, and each code string can be claimed by only one referrer.Binding to a referrer
A referee binds to a code, which records the referrer for that account. You can also bind a code for an account you own (such as a margin account) if you are its owner. Referring yourself is rejected. Bindings are not permanent — you can change or clear your referral later, with a few rules:- Each change starts a cooldown before you can change again (a configurable period, capped at 365 days).
- Re-binding to the exact same referrer and code is rejected as a no-op.
- The registry records each change with its timing, so off-chain attribution knows which referrer was active for which period.
