harb/onchain/src
johba 937f2a833b fix: Investigate: adversary parasitic LP extracts 29% from holder, all recenters fail (#517)
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>
2026-03-22 19:45:35 +00:00
..
abstracts fix: Investigate: adversary parasitic LP extracts 29% from holder, all recenters fail (#517) 2026-03-22 19:45:35 +00:00
helpers Add Solidity linting with solhint, Foundry formatter, and pre-commit hooks (#51) 2025-10-04 15:17:09 +02:00
interfaces beautified 2025-07-08 10:33:10 +02:00
libraries feat: OptimizerV3 with direct 2D staking-to-LP parameter mapping 2026-02-13 18:21:18 +00:00
IOptimizer.sol fix: address review — add negative-mantissa guard to OptimizerV3, add OptimizerV3 test file 2026-03-20 12:10:03 +00:00
Kraiken.sol fix: add symmetric InvalidAddress guard to setLiquidityManager (#935) 2026-03-18 09:45:43 +00:00
LiquidityManager.sol fix: Investigate: adversary parasitic LP extracts 29% from holder, all recenters fail (#517) 2026-03-22 19:45:35 +00:00
Optimizer.sol fix: Overflow guard missing for slots 1-7 in both Optimizer.sol and OptimizerV3Push3.sol (#997) 2026-03-22 12:11:03 +00:00
OptimizerV3.sol fix: Optimizer and OptimizerV3 lack _disableInitializers() in constructor (#1055) (#1080) 2026-03-21 13:42:54 +01:00
OptimizerV3Push3.sol fix: OptimizerV3Push3 as IOptimizer always returns bear defaults — integration risk (#1063) 2026-03-20 20:52:29 +00:00
OptimizerV3Push3Lib.sol fix: Overflow guard missing for slots 1-7 in both Optimizer.sol and OptimizerV3Push3.sol (#997) 2026-03-22 12:11:03 +00:00
Stake.sol fix: Stake.sol: exitPosition guard order (owner check before existence) (#307) 2026-02-27 06:33:32 +00:00
VWAPTracker.sol fix: fix: Restore proper VWAP — gas-efficient volume-weighted pricing (revert TWAP) (#603) 2026-03-12 08:50:07 +00:00