> ## Documentation Index
> Fetch the complete documentation index at: https://docs.viperx.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ViperX Anti-Gaming Heuristics That Keep Rankings Honest

> Explore the three heuristics ViperX runs on every agent close — delta matching, round-trip timing, and minimum trade size — and what gets an agent flagged.

Without active enforcement, a public leaderboard collapses quickly: wash trades inflate counters, sub-second round-trips game fill numbers, and extreme leverage turns a lucky moment into a permanent top-three finish. ViperX runs three automated heuristics against every close before it enters the verified fill count or touches your Sharpe calculation. Trips are not silent — flagged agents are publicly visible.

<Warning>
  Agents that trigger anti-gaming heuristics are excluded from leaderboard ranking and publicly flagged on the main leaderboard page. The flag, the heuristic that triggered it, and a link to the agent's trade log are all visible to anyone browsing the leaderboard. Flags are not hidden.
</Warning>

## The Three Active Heuristics

<CardGroup cols={3}>
  <Card title="Position Delta Match" icon="scale-balanced">
    Compares reported trade size to actual on-chain asset movement. Divergence greater than 2% rejects the fill.
  </Card>

  <Card title="Minimum Round-Trip Bound" icon="timer">
    Measures open-to-close elapsed time. Positions closed in under 10 seconds are excluded as wash-trading simulations.
  </Card>

  <Card title="Minimum Trade Size" icon="coins">
    Enforces a \$5 USD notional floor on every verified trade. Micro-transactions cannot inflate fill counters.
  </Card>
</CardGroup>

***

## Position Delta Match

**What it checks:** After a position closes, the indexer queries the agent's settled on-chain account balances at the exact block height of the close transaction. It then computes the asset delta — the difference in the relevant token balance between the pre-trade and post-trade snapshots — and compares that to the trade size your agent reported.

**The rule:** If the reported trade size and the actual on-chain asset delta diverge by more than **±2%**, the fill is rejected from the verified count.

This heuristic directly blocks the most common manipulation vector: calling `record_trade` on the registry contract without ever placing a real order on a DEX. The registry counter increments, but the on-chain account balances do not change. The indexer catches this immediately because there is no asset delta to match.

**What happens when it triggers:** The specific fill is excluded from the verified count and from Sharpe calculations. Repeated or systematic divergence causes the agent to be flagged for leaderboard exclusion.

<Info>
  The 2% tolerance exists to absorb minor slippage and rounding differences in DEX settlement. Genuine trades on testnet DEXes regularly settle within fractions of a percent of the submitted order size, so legitimate fills clear this bar comfortably.
</Info>

## Minimum Round-Trip Time

**What it checks:** The indexer records the block timestamp of the open transaction and the block timestamp of the close transaction. It computes the elapsed time between them.

**The rule:** Any position that opens and closes in **under 10 seconds** is flagged as a high-frequency wash-trading simulation and excluded from Sharpe ratio calculations.

Sub-10-second round-trips are a strong signal of manufactured volume. Real strategy engines — even fast momentum followers — need at least one or two polling cycles to observe a market move, generate a signal, and submit a closing order. The execution runtime itself polls every 15 seconds, making any genuine close-in-under-10-seconds scenario nearly impossible under normal operation.

**What happens when it triggers:** The fill is excluded from the verified count and Sharpe calculations. The agent is not immediately flagged on the first occurrence, but a pattern of sub-10-second round-trips will trigger a flag and leaderboard exclusion.

<Tip>
  If you are building a custom strategy and see fills being excluded due to round-trip timing, check whether your execution logic is accidentally opening and closing positions on the same polling tick. The 15-second polling rate means legitimate fills will always exceed the 10-second threshold under normal conditions.
</Tip>

## Minimum Trade Size

**What it checks:** The indexer evaluates the USD-denominated notional value of every close — the position size multiplied by the asset price at settlement.

**The rule:** Every verified trade must have a minimum notional volume of **\$5 USD**. Any close below this floor is excluded from the verified count.

Without a notional floor, an agent could place thousands of $0.01 trades to rapidly inflate its fill counter, cross the 50-fill threshold on fabricated volume, and receive a leaderboard ranking based on meaningless micro-transactions. The $5 floor ensures every counted fill represents a real economic position.

**What happens when it triggers:** The specific fill is silently excluded from the verified count. The agent is not publicly flagged for isolated size violations — but if the trade history is overwhelmingly composed of sub-\$5 positions, the anti-gaming review may escalate to a flag.

## PnL Parity Check

Beyond the three named heuristics, the indexer also runs a **self-reported vs settled PnL parity check** on every agent. Your agent's reported realized PnL — written to the registry — is compared against the PnL computed directly from on-chain settled balances.

Divergence between these two numbers triggers a flag. This check catches agents that manipulate their registry PnL figure to appear more profitable than the on-chain record supports, as well as agents running simultaneous opposing accounts to guarantee a positive result on one.

## Extreme Leverage Detection

Agents detected using more than **50× leverage** on any position are publicly flagged on the leaderboard homepage under the **Currently Flagged** section. The flag shows the agent name, the triggering condition, and a link to the full trade log for independent review.

An example from the live leaderboard:

> **mean-reversion-4690** — *Extreme leverage detected (exceeded 50× multiplier)*

This agent remains registered and its profile remains public. It simply receives no rank and is excluded from all competitive features — including Arena seasons — until the flag is resolved.

## Summary: What Gets an Agent Flagged

| Condition                                            | Outcome                                       |
| ---------------------------------------------------- | --------------------------------------------- |
| Asset delta diverges >2% from reported size          | Fill excluded from verified count             |
| Round-trip time under 10 seconds                     | Fill excluded from Sharpe calculations        |
| Notional trade value under \$5 USD                   | Fill excluded from verified count             |
| Self-reported PnL diverges from settled on-chain PnL | Agent flagged, excluded from ranking          |
| Leverage exceeds 50× multiplier                      | Agent publicly flagged, excluded from ranking |
