Rule ip_overlap, read from the engine code

Referral farm detection by shared IPs

Referral farm detection looks for shared infrastructure: several affiliate accounts whose visitors click from the same addresses. When 2 or more of an affiliate's visitor IPs also clicked other affiliates' links in 30 days, with 3 sales, the engine holds the sale.

By the AffiliateTracking teamUpdated 5 min read

Fraud page on demo data: held commissions, each with the rule that held it and Release and Uphold buttons, above the verdicts that explain each hold.

The fraud queue in the product, running on demo data.

The short answer

The rule counts distinct visitor IP hashes the affiliate shares with any other affiliate over 30 days. At 2, with 3 or more sales in the window, it holds the sale. It also holds commissions from the overlapping clicks.

How the rule works

Read from internal/fraud/rules3.go. The code fixes the thresholds. No setting changes them.

  1. 01Shared hashes, 30 days

    For each of the affiliate's clicks, the engine checks whether another affiliate has a click with the same IP hash in the window.

  2. 02Two is a pattern

    One shared address is normal: an office, a cafe, a mobile carrier. Two or more distinct shared addresses is the farm shape.

  3. 03Sales and clicks both held

    With 3 sales in the window, the engine holds the sale and the commissions credited from the overlapping clicks, up to 200 clicks.

The exact logic

// internal/fraud/rules3.go, IPOverlap (condensed)
shared := COUNT(DISTINCT ip_hash) of this affiliate's clicks, last 30 days,
          where another affiliate has a click with the same ip_hash
if shared < 2 { return }
if sales in the last 30 days < 3 { return }
hold(commission); hold(commissions from the overlapping clicks)

Condensed from the Go source in v0.5.0 (main 4f87f77). Comments are ours.

The signals

  • 2 or more IP hashes shared with other affiliates
  • 30-day window
  • 3 or more sales in the window
Hold scope. It holds the commission being screened, plus commissions credited from the flagged clicks, up to 200 clicks. Nothing else moves.

Our data

We ran the rule at its threshold

We ran 2 fixtures through the real engine on 3 Oct 2026: 1 below the line, 1 at or past it. These are the results and the engine's own words.

ip_overlap · 2 fixtures · fresh SQLite each
Each fixture run through the real engine, and whether ip overlap fired
FixtureResultThe engine's reason
1 IP hash shared with another affiliate in 30 days, 3 salesSilentNo verdict
2 IP hashes shared with another affiliate in 30 days, 3 salesFiredShares 2 visitor IP addresses with other partners in the last 30 days, a sign of one person running several accounts
The engine compares keyed hashes. Neither fixture stored, or needed, a real address.
IP overlap: where the rule fires Threshold chart: visitor ip hashes shared with other affiliates. The engine stayed silent at 1 and fired at 2. The line sits at 2. Visitor IP hashes shared with other affiliates Fires at 2 Green: 1, silent Red: 2, fires 05
Where ip overlap fires, from the fixtures above. Engine v0.5.0 (main 4f87f77), run 3 Oct 2026.

Method: one Go test against engine v0.5.0 (main 4f87f77), a new SQLite database per fixture, dry run so nothing was held. Re-run with go test ./internal/fraud/ plus the fixture list above.

What lands in your queue

When ip overlap fires, the verdict shows the rule, who it's about and what it saw. Release or uphold is your call, not the engine's.

Fraud queue · ip_overlap · demo dataMade-up numbers, real wording
Example held commission after ip overlap fired, on demo data, with the engine's reason text
PartnerWhat it sawCommissionResult
Affiliate 15Shares 2 visitor IP addresses with other partners in the last 30 days, a sign of one person running several accounts$149.00Commission held
heldWaits for youThe commission stays out of payouts until you decide.
releasedPaid normallyIt goes into the next payout.
upheldNot paidThe engine cancels it and takes the money back. Already paid? Use a refund.

In the wild

Fraud rents home connections to look like many people.

  • Case: In May 2024, US authorities dismantled the 911 S5 botnet, which had compromised about 19 million IP addresses, and arrested its alleged administrator. Source: The Record, 29 May 2024.
  • Study: Over one third of affiliate publishers observed in a 2015 study used cookie stuffing. Source: Snyder and Kanich, WEIS 2015.

Each item re-read against its linked source on . Items we couldn't verify were cut.

Limits, and how attackers try to beat it

  • Big shared networks can trip it. Two affiliates in one university or one mobile carrier can share addresses honestly. Release those holds.
  • A farm that buys a fresh proxy per account passes, at a cost per account.

A farm can give each account its own proxy. The accounts still tend to share an inbox family, which one cleaned email across active accounts checks. A farm that pumps traffic through one exit fast meets the 50-clicks-an-hour line.

Related rules

Thresholds checked against the code on . Windows roll with each sale.

IP overlap questions

Does my own testing count?

Yes, if you click two affiliates' links from one connection, that's one shared hash. It takes 2 distinct shared hashes and 3 sales to hold anything.

Which clicks count?

Every stored click with an IP hash, in the last 30 days, for this affiliate and the others.

When does the rule run?

On every credited sale, in the same database transaction as the credit. A sweep every 5 minutes also re-checks affiliates active in the last hour.

What does a hold cost me?

Nothing but time. A held commission stays out of payouts. Release it and it pays in the next payout. Uphold it and the engine cancels it and takes the money back.

Can I test it without holding anything?

Yes. Set AE_FRAUD_DRYRUN=1. The engine records each verdict and holds nothing.

Who wrote this

The AffiliateTracking team writes these pages from the engine's own code. Every threshold here is pinned by a test in the repository. Spot a mismatch? Tell us and we'll fix the page or the code.

This rule, on every sale,
before the payout.

Self-host for free, or let us run it for you.