Mathematical Security Guarantees

Autopilot uses deterministic, on-chain logic to calculate and distribute rewards. The system is designed for precision, fairness, and protection against manipulation.


Reward Calculation

Reward distribution is handled using a scaled accumulator model to ensure accuracy across all participants, regardless of epoch size or number of users.

solidityCopyEditreward_scaled = (reward_amount * SCALE) / total_tracked_weight;
acc_reward_scaled += reward_scaled;
  • SCALE = 1e18 preserves precision in all reward calculations

  • acc_reward_scaled tracks cumulative rewards and cannot be changed retroactively

  • Users can independently verify their reward allocation using only on-chain data

This model is consistent with approaches used in protocols like Aave and Compound and ensures each user receives rewards proportional to their voting weight.


Dilution Protection

To prevent timing-based manipulation, Autopilot enforces strict reward eligibility rules per epoch.

1. Per-Epoch Weight Tracking

  • A snapshot of voting power is taken each epoch.

  • Any deposit made during the Special Window (90 minutes before epoch end to 30 minutes after epoch start) is excluded from that epoch’s rewards.

2. Snapshot Enforcement

  • Before any user action (deposit, withdrawal, claim), the contract executes:

solidityCopyEditemergencySnapshot()
  • This locks in the current voting weight for reward calculations.

3. Gap Handling

If a transaction is missed due to network issues or bot delay, the system:

  • Detects the gap

  • Advances epoch state

  • Applies fallback snapshots to maintain reward consistency

Last updated