Sub topic 8
Preventing fraud and gaming
This chapter assumes you have read the earlier chapters on referral programs, reward design and attribution. You should be comfortable reading short Python and SQL snippets. Here you will learn how people exploit referral rewards, which defenses work at each stage, and how to detect the abuse that gets through.
Why rewards attract abuse
A referral reward turns a signup into something worth money or status. Anyone who can produce signups cheaply has a reason to fake them. The more valuable the reward, the more effort people will spend.
Abuse in newsletter programs usually falls into five patterns:
- Self-referral: a reader signs up with their own alternate addresses and collects the reward.
- Bulk fake signups: a script or a hired service submits many addresses through one referral link.
- Disposable addresses: the signups use throwaway inboxes that accept the confirmation email and are never read again.
- Incentivized low-intent signups: a referrer posts the link on a coupon or giveaway forum where people subscribe only for the prize.
- Reward cycling: two or more people refer each other repeatedly, or a referrer unsubscribes the people they referred and signs them up again.
Not every case is malicious. A reader who posts the link on a forum is behaving the way you asked, and the result can still be poor-quality subscribers. Your defenses need to protect the list's quality as well as stop outright fraud.
Design the reward so fraud pays less
Defense starts in the program design, before you write any detection code. Three design choices remove most of the low-effort abuse.
- Reward only confirmed subscribers. Use double opt-in and count a referral only after the new subscriber clicks the confirmation link. This blocks typos, fake addresses and any address the attacker does not control.
- Add a holding period. Pay or unlock the reward 7 to 14 days after confirmation, and only if the referred subscriber is still subscribed. Fake accounts tend to disappear or go silent in that window.
- Make rewards fit the economics. If a subscriber is worth about $2 to you over a year, a $10 reward for each signup will attract fraud. Milestone rewards of small items, or digital perks, cost you little and attract few attackers.
Milestones also help. A reward at 5 or 10 referrals is harder to farm than a payment per signup, because the attacker has to get a whole batch past your checks before earning anything.
A layered pipeline
No single check is reliable. Attackers adapt, and each signal also has false positives. A better approach is to run several cheap checks in sequence and hold anything doubtful for review.
Automatic checks
Run these checks when a confirmed signup arrives. Each one produces a flag, and you decide how many flags trigger a review.
| Signal | What it catches | Main false-positive risk |
|---|---|---|
| Normalized email matches the referrer's | Self-referral using plus-tags or dots | Family members who share an address |
| Disposable email domain | Throwaway inboxes | Some privacy-conscious real readers |
| Many signups from one IP address hash | Scripts and bulk entry | Offices, universities, shared networks |
| Burst of referrals from one referrer in a day | Automation | A real post that went viral |
| Quick unsubscribe or no opens after confirming | Low-intent or fake subscribers | Readers who simply lose interest |
The Python below implements the first four checks. The normalize_email function matters because [email protected], [email protected] and [email protected] all deliver to the same inbox.
from dataclasses import dataclass
from datetime import datetime
DISPOSABLE_DOMAINS = {"mailinator.com", "10minutemail.com", "guerrillamail.com"}
GMAIL_DOMAINS = {"gmail.com", "googlemail.com"}
@dataclass
class Signup:
referrer_email: str
referred_email: str
ip_hash: str
created_at: datetime
def normalize_email(email: str) -> str:
local, _, domain = email.strip().lower().partition("@")
local = local.split("+", 1)[0]
if domain in GMAIL_DOMAINS:
local = local.replace(".", "")
domain = "gmail.com"
return f"{local}@{domain}"
def risk_flags(signup: Signup, recent: list) -> list:
"""Return a list of flags for one signup.
recent: this referrer's signups from the last 24 hours.
"""
flags = []
if normalize_email(signup.referred_email) == normalize_email(signup.referrer_email):
flags.append("self_referral")
domain = signup.referred_email.strip().lower().rpartition("@")[2]
if domain in DISPOSABLE_DOMAINS:
flags.append("disposable_domain")
if sum(1 for s in recent if s.ip_hash == signup.ip_hash) >= 3:
flags.append("shared_ip")
if len(recent) >= 20:
flags.append("burst")
return flags
now = datetime(2026, 11, 26, 12, 0)
own = Signup("[email protected]", "[email protected]", "h1", now)
print(risk_flags(own, [])) # ['self_referral']
recent = [Signup("[email protected]", f"u{i}@example.org", "h2", now) for i in range(3)]
bulk = Signup("[email protected]", "[email protected]", "h2", now)
print(risk_flags(bulk, recent)) # ['disposable_domain', 'shared_ip']Two cautions about this code:
- Plus-tag stripping and dot removal are provider-specific. Dots are ignored only at Gmail. Stripping a plus-tag is right for most providers, but a few treat it as part of the address. Use the normalized form only for comparison, and store the address exactly as the subscriber typed it.
- Store a salted hash of the IP address, not the raw value. An IP address is personal data in many jurisdictions, and a hash is enough to test whether two signups share one. The next chapter covers the privacy rules.
Score, then act proportionally
Rather than block on any single flag, give each flag a weight and act on the total. For example, one flag sends the signup to the holding period with closer monitoring, two flags send it to manual review, and a self-referral flag alone is enough to reject the credit.
Proportional action reduces the harm of false positives. Silently dropping a legitimate referral loses you a motivated advocate. Delaying one for review costs only a few days.
Do not reveal your exact rules to users. Public rules should say that fraudulent or self-referred signups do not count and that you may withhold rewards, but they should not list thresholds. Detailed thresholds tell attackers how to stay just under them.
Detect what slips through
Some abuse passes every real-time check, so look for it afterward. Two queries cover most cases. The first finds referrers whose referred signups cluster on the same IP hash within a week:
SELECT r.referrer_id,
s.signup_ip_hash,
COUNT(*) AS signups_from_ip
FROM referrals AS r
JOIN subscribers AS s ON s.id = r.referred_id
WHERE r.created_at >= NOW() - INTERVAL '7 days'
GROUP BY r.referrer_id, s.signup_ip_hash
HAVING COUNT(*) >= 3
ORDER BY signups_from_ip DESC;The second measures how many of each referrer's confirmed referrals unsubscribed within seven days of confirming. A high rate suggests people who joined for the reward:
SELECT r.referrer_id,
COUNT(*) AS confirmed_referrals,
AVG(CASE
WHEN s.unsubscribed_at IS NOT NULL
AND s.unsubscribed_at < s.confirmed_at + INTERVAL '7 days'
THEN 1.0 ELSE 0.0
END) AS early_unsub_rate
FROM referrals AS r
JOIN subscribers AS s ON s.id = r.referred_id
WHERE s.confirmed_at IS NOT NULL
GROUP BY r.referrer_id
HAVING COUNT(*) >= 5
ORDER BY early_unsub_rate DESC;Compare each referrer against your program-wide baseline. If the typical early-unsubscribe rate is 8% and one referrer sits at 70%, that is worth a look. A rate of 12% is not.
You can also use engagement as a signal. Referred subscribers who never open any email in their first two weeks, or whose opens all happen within seconds of delivery, may be bots or privacy-proxy artifacts. Apple Mail Privacy Protection inflates open counts for real people too, so combine opens with clicks before you draw conclusions.
Respond to confirmed abuse
When you confirm abuse, act in a consistent order:
- Remove the fraudulent referrals from the referrer's count and reverse any reward already granted, if your rules allow it.
- Suppress the fake addresses so they never receive mail. They hurt your sender reputation through bounces and spam complaints.
- Warn first-time offenders who may have misunderstood the rules. Remove repeat offenders from the program.
- Record what you found, so you can tune thresholds and show that you applied the rules evenly.
Common mistakes
- Rewarding on form submission. Paying before confirmation is the largest single opening for fraud.
- Banning on one signal. Shared IP addresses and disposable domains both have honest users. Use scores and review.
- Setting thresholds once. Attackers adapt. Review flag rates monthly and check that your rules still catch cases.
- Ignoring quality. A program with no fraud can still fill your list with prize-seekers. Later chapters cover measuring subscriber quality by source.
- No appeal path. Give flagged referrers a way to contact you. Wrongly penalized fans are expensive to win back.
Exercise
A referral program pays $5 for each referred signup as soon as the person submits the form. Name two changes that reduce fraud without adding any detection code, and explain why each works.
Show answer
First, require double opt-in and count a referral only after the new subscriber confirms. This stops fake or mistyped addresses the attacker does not control. Second, add a holding period of 7 to 14 days and pay only if the subscriber is still subscribed. Fake accounts tend to unsubscribe or go silent in that window, so they never earn the reward. Switching to milestone rewards would also help, because the attacker must get a whole batch past your checks before being paid.
Exercise
Using the normalizeemail function above, does the signup of "[email protected]" by a referrer whose address is "[email protected]" raise the selfreferral flag? What does the function return for "[email protected]"?
Show answer
Yes. For Gmail, the function lowercases the address, drops the plus-tag and removes dots, so both addresses become "[email protected]" and they match. For "[email protected]" it returns "[email protected]": the plus-tag is removed but the dot is kept, because dot removal applies only to Gmail domains.
Exercise
One referrer has 40 confirmed referrals and an early-unsubscribe rate of 65%. Your program-wide rate is 9%. List two benign explanations and one next step before you remove them from the program.
Show answer
Benign explanations include that the referrer posted the link on a giveaway or coupon community, bringing in prize-seekers without any fraud, or that a single large audience skewed toward a different interest than your newsletter covers. A good next step is to check for fraud signals on the same referrals (shared IP hashes, disposable domains, signup timing) and to contact the referrer to ask where they shared the link. Remove them only if the fraud signals confirm gaming. Otherwise, consider a rule that excludes low-quality sources from rewards.