Building UNC

Referral System: How It Works and How to Build One That Lasts

8 min readBy UNC Team
Referral system explained: links, attribution, rewards and fraud controls

A referral system turns existing users into a growth channel, but only if attribution is exact and the rewards cannot be farmed. This guide covers how one works end to end, how to build it, and what we learned running our own.

A referral system is the set of links, records and rules that lets an existing customer bring in a new one and get rewarded for it. It gives each user a unique code or link, records who arrived through it, decides when that new user counts, and pays the reward. This guide is for founders and product teams deciding whether to run a referral program and how to build one properly.

We write from experience. UNC runs a tiered referral program in its own app, and the examples below come from building and operating it. That also means a disclosure: UNC publishes this article and operates the referral program it describes. Nothing here is advice to join UNC or any other program.

Key takeaways

Attribution must be decided once, at signup, and never changed. Pay rewards on a real action, not on a signup. Hold rewards for unverified users instead of paying them. Measure referral rate and the value of referred customers, not raw invites. Disclose the incentive wherever referrers promote you.

What is a referral system, and how is it different from affiliate marketing?

A referral system rewards existing customers for introducing new ones, using a tracked link or code. An affiliate program rewards outside publishers, usually with a commission per sale. The mechanics overlap, but the people differ: referrers are users who like the product, while affiliates are marketers who promote it as a business.

The difference matters for design. Referrers send small numbers of warm introductions to friends, so the reward can be modest and often goes to both sides. Affiliates send larger volumes of colder traffic, so they need reporting, payouts and contracts. Most businesses start with referrals because the trust is already there.

One clarification: "referral system" also describes how doctors refer patients to specialists. This guide covers only the business and software meaning.

How does a referral system work, step by step?

A referral system works in five steps: issue a code, share it, capture it at signup, attribute the new user to the referrer, and pay the reward when the qualifying action happens. Each step has one job, and most failures come from mixing two of them, such as paying at signup instead of at the qualifying action.

  1. Issue: every user gets a unique, hard-to-guess code. UNC generates 8 random hexadecimal characters per account, for example 3F9A1C07.
  2. Share: the code travels inside a link such as /join/3F9A1C07, so nobody has to type it.
  3. Capture: the signup form reads the code from the link and keeps it through app-store installs and redirects.
  4. Attribute: on account creation, the new user is permanently linked to the referrer. In UNC this is one field, referred_by_id, written once and never edited.
  5. Reward: when the referred user completes the qualifying action, the reward is calculated and paid, or held if a condition is not met yet.
Referral system flow from code to share, signup, attribution and reward
Attribution happens once, at signup. Rewards are decided later, when the qualifying action happens.

Which type of referral program should you run?

The right referral program depends on what one new customer is worth and how often people recommend you. One-sided programs reward only the referrer, double-sided programs reward both people, tiered programs raise rewards as a referrer brings more people, and milestone programs pay at fixed counts. Double-sided is the common default for consumer products.

Program typeWho is rewardedWorks best whenMain risk
One-sidedReferrer onlyThe product is free or the new user already gets valueThe friend has no reason to act
Double-sidedReferrer and new userA first purchase or signup needs a nudgePaying twice for low-value customers
TieredReferrer, more per tierA few power users drive most referralsEncourages fake accounts to reach the next tier
MilestoneReferrer at fixed countsYou want a clear goal, such as 5 friendsRewards stop motivating after the last milestone
AffiliateOutside publishersYou sell to strangers at scaleLow-quality traffic and disclosure duties

UNC uses a tiered model. Each tier adds a fixed amount to the referrer's hourly rate, shared across the places in that tier. On the live network the first tier covers 1 to 9 active referrals, and each fills one place worth about 0.0056 UNC per hour. The full tier adds 0.05 UNC per hour. The current figures are published on the referrals page.

How do you choose referral rewards that do not lose money?

Referral rewards should cost less than what a referred customer is worth, and they should be paid only for the action that creates that worth. Start from the profit on a customer's first months, spend a fraction of it on the reward, and tie payment to a purchase, a subscription renewal, or verified activity rather than to an email address.

  • Cash or account credit: easy to understand, and credit costs less than face value because it is spent on your product.
  • Discounts: good for eCommerce, since the cost only appears when the friend actually buys.
  • Product upgrades: extra storage, features or time, which cost little to give.
  • Status or rate increases: what UNC uses. A referrer's earning rate rises while their referrals are active.

The most useful lesson from our own program was to reward activity, not signups. UNC counts a referral only while that person has a mining session running. A friend who signed up once and left adds nothing. That single rule removed the incentive to fill the program with accounts nobody uses.

How to build a referral system: the data and the logic

Building a referral system needs three parts: a place to store who referred whom, a rule that decides when a referral counts, and a ledger that records every reward paid or held. None of this is complicated, but each part has a mistake that is expensive to fix later, so it is worth getting the shape right first.

The records you need

  • Users: add a unique referral_code and a referred_by field pointing to the referrer.
  • Qualifying events: whatever counts, such as orders, renewals or sessions, with a timestamp and status.
  • Rewards ledger: one row per reward, with amount, the referral it belongs to, and a state of paid, held or cancelled.

Attribution: decide once

Attribution should be set when the account is created and then never change. If a user can enter a different code later, two referrers will claim the same person. UNC writes referred_by_id at signup only. If no valid code is supplied, the account is attributed to a default house code rather than left open to be claimed.

Reward triggers: pay, hold or skip

A reward trigger runs when the qualifying event happens and makes one of three choices. It pays when every condition is met, holds when the action happened but a condition such as identity verification is missing, and skips when the action does not qualify. Holding is the choice most systems lack, and it is the one that prevents both fraud and unfair losses.

Comparison of one-sided, double-sided, tiered and milestone referral programs
Most consumer products start double-sided. Tiered programs need stronger fraud controls.

How do you stop referral fraud and self-referrals?

Referral fraud is stopped by making fake accounts worthless rather than by trying to detect every one. If a reward is paid only for verified, active, real people, creating a hundred accounts earns nothing. Detection still helps: duplicate devices, shared payment cards and bursts of signups from one network are the usual signals worth flagging for review.

UNC handles this with held rewards. Every referral who is mining counts toward filling a tier, but the share for a referral who has not passed identity verification (KYC) is held, not paid. It stays visible to the referrer, never expires, and is credited in one payment the moment that person is verified. A farm of unverified accounts produces a held balance that never pays out.

  • Self-referral: block a code from being used by the account that owns it, and flag new accounts sharing a device or card with the referrer.
  • Fake accounts: pay only after a real action, and hold rewards for unverified users.
  • Code leaking: expect codes to be posted on coupon sites, and cap rewards per referrer per month if that matters to you.
  • Reversals: if an order is refunded, cancel its reward in the ledger rather than deleting the row.

Which referral metrics actually matter?

Referral metrics that matter measure revenue and retention, not invitations. The five worth tracking are referral rate, referral conversion rate, viral coefficient, the cost of a referred customer, and the lifetime value of referred customers compared with everyone else. Invites sent and links clicked are useful for debugging but say little about whether the program pays.

  • Referral rate: the share of active customers who referred at least one person in a period.
  • Referral conversion rate: referred signups who complete the qualifying action, divided by all referred signups.
  • Viral coefficient (K-factor): average invites per user multiplied by the invite conversion rate. Above 1 means each user brings in more than one more.
  • Cost per referred customer: total rewards paid divided by referred customers who qualified.
  • Lifetime value of referred customers: compare it with customers from paid ads. If it is not higher, the rewards may be attracting the wrong people.

Count held rewards separately from paid ones. The UNC app shows every referrer both figures, and the gap between them shows how many referred users are active but not yet verified, which is a product problem to fix, not a cost.

Should you build a referral system or buy referral software?

Buy referral software if referrals are a side channel and your qualifying action is a standard purchase or subscription. Build your own if the reward depends on behaviour only your product can see, such as activity, usage or verification status, because off-the-shelf tools track what happens at checkout, not inside your app.

FactorReferral software (buy)Custom build
Time to launchDaysWeeks
Upfront costMonthly subscriptionDeveloper time
Qualifying actionPurchases and signupsAnything your product records
Fraud rulesGeneric, set by the vendorTied to your own verification and data
ReportingReady-made dashboardsYou build them
Data ownershipShared with the vendorStays in your database

UNC built its own because the qualifying action is a live mining session and the payout depends on identity verification, and neither exists in a checkout-based tool. A store selling through Shopify or a SaaS billing through Stripe will usually be better served by an existing integration.

What do the rules say about disclosing referral rewards?

Referral rewards must be disclosed when a referrer promotes your product in public. In the United States, the FTC's Endorsement Guides treat a referrer who is paid or rewarded as having a material connection, which must be clear to the audience. The UK advertising code applies a similar rule to marketing communications. A short line such as "I get a reward if you join" is enough.

The business running the program carries responsibility too. Give referrers suggested wording that includes the disclosure, and avoid promising earnings. For a pre-mainnet coin like UNC this matters twice over: UNC has no guaranteed value, so a referral message must never read like an investment pitch.

What are the most common referral program mistakes?

The most common referral program mistakes are paying for signups, letting attribution change after signup, hiding the terms, and launching without a way to reverse a reward. Each one is cheap to avoid at the start and costly to fix once users have balances that depend on the old behaviour.

  1. Paying on signup. It rewards account creation, which is the easiest thing to fake.
  2. Editable attribution. Two people end up claiming the same customer, and support has to decide.
  3. No ledger. Without one row per reward you cannot answer "why was I paid this?" or reverse a refund.
  4. Unclear terms. State what counts, when rewards pay, and what is held, in plain words, before launch.
  5. Rewards nobody wants. If referrers do not value the reward, no amount of design will help.

To see tiered referrals working in practice, the UNC referrals page shows the live tiers, and the how it works page explains what a referral must do to count.

Frequently asked questions

What is a good referral reward?

A good referral reward costs less than the profit from the customer it brings in and is something your users actually want. Account credit and discounts are popular because their real cost is below face value. Tie the reward to a purchase or real activity, never to a signup alone.

Is a double-sided referral program better than a one-sided one?

A double-sided referral program usually converts better because the invited friend also gets something, which gives them a reason to act. It costs more per customer. One-sided programs suit products that are free or where joining is already attractive without an extra incentive.

How do I track referrals without referral software?

Track referrals by giving each user a unique code, storing it on the account of anyone who signs up with it, and recording each qualifying action and reward in a ledger table. That needs one field on the user record and one ledger table, which most developers can build in a few days.

How do I stop people referring themselves?

Stop self-referrals by refusing a code on the account that owns it, flagging new accounts that share a device, card or address with the referrer, and paying only after a verified, real action. Making fake accounts earn nothing works better than trying to detect every one.

Do I have to disclose referral rewards?

Yes, when referrers promote you publicly. US and UK advertising rules treat a rewarded referrer as having a material connection that must be clear to their audience. Give referrers wording that includes a short disclosure, such as "I get a reward if you sign up".

Start mining with UNC

UNC distributes coins to verified participants — no hardware, no subscription, no battery drain. Read the whitepaper for the distribution model, or check network activity in the explorer.

Get UNC on Google Play

Related reading