harb/onchain/test/helpers
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
..
LiquidityBoundaryHelper.sol Add Solidity linting with solhint, Foundry formatter, and pre-commit hooks (#51) 2025-10-04 15:17:09 +02:00
TestBase.sol fix: Investigate: adversary parasitic LP extracts 29% from holder, all recenters fail (#517) 2026-03-22 19:45:35 +00:00
UniswapTestBase.sol Add Solidity linting with solhint, Foundry formatter, and pre-commit hooks (#51) 2025-10-04 15:17:09 +02:00