Sub topic 8
Preventing fraud and gaming
This chapter assumes you have read the chapters on incentive design and on referral links and attribution. You should be comfortable reading short Python and SQL snippets.
Why rewards attract abuse
Any reward that is cheap to claim will be claimed in bulk. A referral program pays for signups, so people will try to produce signups without producing real readers. The two earlier chapters feed this problem. Incentive design sets what a fake signup is worth. Attribution tracking decides which signups count.
Common patterns:
- Self-referral: a reader signs up again with a second address and credits themselves.
- Throwaway addresses: disposable inboxes, or one mailbox with plus-addressing (
[email protected],[email protected]). - Bot signups: scripts that submit your form and confirm through an automated inbox.
- Link farms: coupon, "free stuff," or reward-swapping forums that trade referral links.
- Incentivized-and-gone: real people who sign up only for the prize and unsubscribe once they have it.
The last pattern is not fraud in the strict sense, but it costs you the same. These subscribers add to your list size, lower your engagement rates, and may hurt your sender reputation.
A layered defense
No single check catches everything, so combine several. Each layer should be cheap and should leave an honest reader unaffected.
1. Count only confirmed, retained subscribers
Credit a referral only after the new subscriber has confirmed their address, and keep them out of the count if they unsubscribe. This one rule removes most bot and typo signups, because bots rarely complete confirmation. The SQL below implements it and lists referrers who reached a five-referral milestone.
SELECT r.referrer_id,
COUNT(*) AS confirmed_referrals
FROM referrals AS r
JOIN subscribers AS s ON s.id = r.referred_id
WHERE s.confirmed_at IS NOT NULL
AND s.unsubscribed_at IS NULL
GROUP BY r.referrer_id
HAVING COUNT(*) >= 5
ORDER BY confirmed_referrals DESC;2. Add a waiting period
Pay out rewards a fixed time after confirmation, such as 14 days. Incentivized-and-gone subscribers tend to leave quickly, so they drop out before the reward is granted. You can also require that the new subscriber opened at least one issue.
3. Screen for suspicious patterns
Look at signups grouped by referrer. Many signups from one IP address, or a high share of disposable-domain addresses, are strong signals. The function below flags referrers on those two signals.
from collections import Counter
DISPOSABLE = {"mailinator.com", "tempmail.example"}
def flag_referrers(signups, max_per_ip=3, max_disposable_share=0.3):
"""Return the ids of referrers whose signups look suspicious.
signups: list of dicts with keys referrer_id, email, ip
"""
by_referrer = {}
for s in signups:
by_referrer.setdefault(s["referrer_id"], []).append(s)
flagged = set()
for referrer, rows in by_referrer.items():
ip_counts = Counter(r["ip"] for r in rows)
disposable = sum(
r["email"].split("@")[-1].lower() in DISPOSABLE for r in rows
)
if (
max(ip_counts.values()) > max_per_ip
or disposable / len(rows) > max_disposable_share
):
flagged.add(referrer)
return flagged
signups = [
{"referrer_id": 1, "email": f"a{i}@mailinator.com", "ip": "203.0.113.5"}
for i in range(5)
] + [
{"referrer_id": 2, "email": "[email protected]", "ip": "198.51.100.7"},
{"referrer_id": 2, "email": "[email protected]", "ip": "192.0.2.44"},
]
print(flag_referrers(signups)) # {1}Referrer 1 is flagged for both reasons. Referrer 2 is not flagged. Treat a flag as a reason to review, not as proof. Households, offices, and universities share IP addresses, so a flag should hold the reward, not delete the account.
4. Cap and tier rewards
Set a ceiling on rewards per person per period, and make the top rewards milestone-based. A reward of "one signup, one prize" is the easiest to farm. A milestone at 25 confirmed referrals is much harder to fake at scale.
Common errors
- Rewarding raw signups. Counting unconfirmed signups pays for bots and typos.
- Blocking too aggressively. Strict IP rules punish real readers on shared networks. Hold and review instead of rejecting.
- Never auditing. Fraud changes over time. Review the top referrers by volume every month.
- Not saying the rules. State the terms in your program page: what counts, what is excluded, and that you may withhold rewards. This also supports the consent and incentive rules covered in a later chapter.
Exercise
A referrer has 12 referred signups. All 12 confirmed, but 10 unsubscribed within three days of the reward being granted. Which two changes to the program would reduce this, and why?
Show answer
First, add a waiting period (for example 14 days) so the reward is paid only after the referred subscriber has stayed, which removes people who leave right away. Second, count only subscribers who are still subscribed, and consider requiring an opened issue, so the credit reflects real readers. A milestone-based reward and a per-person cap also reduce the payoff for farming.