harb/onchain/script/backtesting
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
..
attacks fix: address review — consistent evidence fields, unstake all positions 2026-03-22 17:06:45 +00:00
reports fix: Backtesting #6: Baseline strategies (HODL, full-range, fixed-width) + reporting (#320) 2026-02-27 13:08:53 +00:00
.gitignore fix: chore: fetch and cache Uniswap V3 replay datasets for evolution backtesting (#883) 2026-03-16 15:50:19 +00:00
AttackRunner.s.sol fix: Attack file schema for burn_lp needs documentation and migration (#615) 2026-03-22 10:53:07 +00:00
BacktestKraiken.sol fix: Backtesting #4: Deploy KrAIken contracts + recenter execution loop (#318) 2026-02-27 09:00:22 +00:00
BacktestRunner.s.sol fix: OptimizerV3Push3 as IOptimizer always returns bear defaults — integration risk (#1063) 2026-03-20 20:52:29 +00:00
BaselineStrategies.sol fix: address review feedback on BaselineStrategies and Reporter 2026-02-27 13:43:49 +00:00
EventReplayer.sol fix: No allowance set before \token0.transfer\ in swap callback (#339) 2026-02-28 12:14:20 +00:00
fetch-datasets.sh fix: chore: fetch and cache Uniswap V3 replay datasets for evolution backtesting (#883) 2026-03-16 15:50:19 +00:00
fetch-events.ts fix: address review feedback on fetch-events.ts (#315) 2026-02-26 22:45:40 +00:00
FormatLib.sol fix: address review feedback on PositionTracker and StrategyExecutor 2026-02-27 12:02:29 +00:00
KrAIkenDeployer.sol fix: OptimizerV3Push3 as IOptimizer always returns bear defaults — integration risk (#1063) 2026-03-20 20:52:29 +00:00
MockToken.sol fix: Backtesting #2: Foundry script skeleton + Uniswap V3 shadow pool deployment (#316) 2026-02-27 05:08:27 +00:00
package.json fix: Backtesting #1: Event fetcher (Infura → JSON Lines cache) (#315) 2026-02-26 22:04:43 +00:00
PositionTracker.sol fix: Backtesting #6: Baseline strategies (HODL, full-range, fixed-width) + reporting (#320) 2026-02-27 13:08:53 +00:00
Reporter.sol fix: address review feedback on BaselineStrategies and Reporter 2026-02-27 13:43:49 +00:00
ShadowPoolDeployer.sol fix: Backtesting #5: Position tracking + P&L metrics (#319) 2026-02-27 11:23:18 +00:00
StrategyExecutor.sol fix: Investigate: adversary parasitic LP extracts 29% from holder, all recenters fail (#517) 2026-03-22 19:45:35 +00:00
tsconfig.json fix: Backtesting #1: Event fetcher (Infura → JSON Lines cache) (#315) 2026-02-26 22:04:43 +00:00