DEV Community

Yinghui
Yinghui

Posted on

Why Referral Attribution Fails Silently (And How to Design Around It)

Every referral system I have audited has the same shape: one write, at account creation, and no way to correct it afterwards.

That shape is not an accident. It is what you get when you design for fraud resistance first and user experience second, and it produces a failure mode that engineers rarely think about because it never throws an exception.

The write

The backend stores a referrer field inside the signup transaction. That single write is the entire attribution. Everything downstream - fee discount, commission, reporting - reads from it.

The write competes with email verification state, KYC status, and initial balance creation. If the code arrives as a query parameter, it also competes with session state, redirects, and whatever the frontend did to the form before submitting.

Any of those can drop it. None surface an error.

Why the bug is invisible

The field is nullable, so "no referrer" is a valid state - identical to a user who deliberately declined a code. You cannot distinguish "user opted out" from "our pipeline dropped it" after the fact.

That is the design tension in one sentence.

The UI compounds it

Most interfaces display your own outbound code prominently and record your referrer quietly. Users check the first, see a code, and conclude the relationship is active.

If a system writes something once and never again, it owes the user a verification surface for that value.

What a better design looks like

1. Echo the value back immediately. After signup, show "You were referred by X". If the value is empty and the user arrived via a referral link, warn them.

2. Preserve the evidence. Keep the original signup request payload long enough that support can adjudicate a rebind weeks later.

3. Rate-limit writes, not reads. The fraud concern is self-referral, a write-side problem. Making the field read-only does not solve fraud; it moves the pain to honest users.

The economics explain persistence

The discount comes from the customer acquisition budget. The platform pays either way, so a silent failure costs nothing to the platform and a few percent to the user, permanently and invisibly.

When a failure costs the platform nothing and the user invisibly, it survives for years.

If you want a code to try, mine is BBBKK (https://www.binance.com/register?ref=BBBKK) - but the verification habit matters more than the code.


Disclosure: I receive a commission if you sign up with the code above. This is not financial advice.

Top comments (0)