KaizoCoreKaizoCore docs

Impossible travel

Flagging physically implausible location changes between consecutive requests from the same identity.

What it detects

If the same entity — a user ID, an email, or any identity key you supply in entity_keys — makes two requests whose IP-geolocated positions imply a travel speed that's physically impossible in the time elapsed between them, that's flagged as impossible_travel. A login from Mumbai followed nine minutes later by a login from Tokyo, for the same account, is either a compromised credential, a shared/leaked session, or a proxy-hopping bot — not a real person.

The math

KaizoCore computes the great-circle (haversine) distance between the two most recent real, IP-geolocated points for an identity, divides by the elapsed time, and compares the implied speed against a threshold:

max_plausible_speed = 1000 km/h

That's set above commercial aviation's real cruise average (~900 km/h) — deliberately padded to absorb two real sources of noise: IP geolocation resolves to city-level precision, not exact coordinates, and there's inevitably some clock skew between when two requests are actually made and when they're received. The goal is zero false positives on a real traveler on a fast but genuine journey, not a hair-trigger threshold.

Two requests at (essentially) the same instant from meaningfully different locations — more than 50km apart with effectively zero elapsed time — are treated as an infinite implied speed and flagged directly, rather than dividing by a near-zero elapsed time.

Gated on having something real to compare against

This is the Golden Rule applied to travel specifically: a flag only ever fires if there's a genuine prior data point for that identity. A first-ever request has nothing to compare against, and is never penalized for that. The three things this check requires before it can fire at all:

  1. The request carries at least one entity key (no identity, nothing to track).
  2. This request has real IP-geolocation data (not an unknown/failed lookup).
  3. A previous point already exists for this exact identity.

Only when all three hold does the distance/speed math even run. Absence of history is never itself suspicious.

Where it fits in scoring

network/impossible_travel is a deterministic rule (weight 0.90 within the network layer) — it's a physical fact derived from real geolocated coordinates, in the same category as a Tor-exit-node match or a known-bot User-Agent string, not a fuzzy behavioral heuristic. See The scoring engine for how deterministic rules are treated differently by ML fusion.

On this page