Skip to content

Packs / leaderboards-public

block-leaderboard-cheating

Reject forged, replayed, out-of-range and burst score submissions and flag statistical outliers for review

L2 Checks passed 3 of 3 runsv1.0.0Tech-Realm/space-leaderboards-public

Install

logicpacks pack use leaderboards-public/block-leaderboard-cheating
get_pack leaderboards-public/block-leaderboard-cheating

The second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.

Keys it needs (names only)

  • LB_HMAC_SECRET

Playbooks included

  • Spec: spec/SPEC.md (goal, steps, edge cases, don’ts)
  • Routes: stdlib-sqlite
  • Checks: 1 in outcome/checks.yaml
  • Code: leaderboard.py
  • Tools: python3

Usage, last 8 weeks

New: no recorded use yet.

Purpose (from spec/SPEC.md)

Reject forged, replayed, out-of-range and burst score submissions and flag statistical outliers for review

Goal

Cheated scores never reach the board; suspicious ones are flagged for a human, not silently banned.

Steps

  1. Server-side HMAC signature per submission (secret in LB_HMAC_SECRET).
  2. Unique nonce per submission (replay guard).
  3. Max plausible score per board.
  4. Per-player rate limit (default 10/min).
  5. z-score > 4 vs the player's own history -> flagged (hidden from board until reviewed).

Edge cases

  • New players have no history: outlier check starts after 5 scores.
  • Legit spikes (events, double-XP) -> raise max_score per season.

Don'ts

  • Don't auto-ban on statistics alone.
  • Don't expose rejection reasons to the client in detail (helps cheaters tune).