Root cause: PRICE_STABILITY_INTERVAL (300s) was too long relative to MIN_RECENTER_INTERVAL (60s). After any significant trade moving the tick >1000 positions, the 5-minute TWAP lagged behind the current price by hundreds of ticks, exceeding MAX_TICK_DEVIATION (50). Recenter reverted with "price deviated from oracle" for ~285s — creating a window where the LM could not reposition and adversary parasitic LP could extract value from passive holders. Fix: Reduce PRICE_STABILITY_INTERVAL from 300s to 30s. This ensures TWAP converges within the 60s cooldown while still preventing same-block manipulation (30s > ~12s Ethereum mainnet block time). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| abstracts | ||
| helpers | ||
| interfaces | ||
| libraries | ||
| IOptimizer.sol | ||
| Kraiken.sol | ||
| LiquidityManager.sol | ||
| Optimizer.sol | ||
| OptimizerV3.sol | ||
| OptimizerV3Push3.sol | ||
| OptimizerV3Push3Lib.sol | ||
| Stake.sol | ||
| VWAPTracker.sol | ||