harb/onchain/script/backtesting/attacks/floor-ratchet-oscillation.jsonl
johba 69ba4fd44e fix: Floor Ratchet 2000-trade oscillation needs a dedicated full-sequence red-team run (#1082)
- Expand floor-ratchet-oscillation.jsonl to 2000 buy→recenter cycles
  (10 rounds × 200 cycles at 5 ETH/buy with stake/unstake/sell phases)
- Fix AttackRunner buy_recenter_loop: add vm.warp/vm.roll for recenter
  cooldown bypass and TWAP convergence; use single-signer broadcast
- Fix AttackRunner mine op: advance timestamp alongside block number
- Replace pending 2026-03-22 evidence with completed 2026-03-23 run
- Result: INCREASED (+1230 bps). TWAP oracle blocked 99.9% of recenters.
  Floor ratchet risk from #630 is defeated.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 09:12:00 +00:00

89 lines
3.5 KiB
JSON

// schema-version: 1
{"op":"buy","amount":"100000000000000000000","token":"WETH"}
{"op":"stake","amount":"10000000000000000000000000","taxRateIndex":0}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy_recenter_loop","count":200,"amount":"5000000000000000000"}
{"op":"unstake","positionId":1}
{"op":"sell","amount":"all","token":"KRK"}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy","amount":"100000000000000000000","token":"WETH"}
{"op":"stake","amount":"10000000000000000000000000","taxRateIndex":5}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy_recenter_loop","count":200,"amount":"5000000000000000000"}
{"op":"unstake","positionId":2}
{"op":"sell","amount":"all","token":"KRK"}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy","amount":"100000000000000000000","token":"WETH"}
{"op":"stake","amount":"10000000000000000000000000","taxRateIndex":0}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy_recenter_loop","count":200,"amount":"5000000000000000000"}
{"op":"unstake","positionId":3}
{"op":"sell","amount":"all","token":"KRK"}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy","amount":"100000000000000000000","token":"WETH"}
{"op":"stake","amount":"10000000000000000000000000","taxRateIndex":5}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy_recenter_loop","count":200,"amount":"5000000000000000000"}
{"op":"unstake","positionId":4}
{"op":"sell","amount":"all","token":"KRK"}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy","amount":"100000000000000000000","token":"WETH"}
{"op":"stake","amount":"10000000000000000000000000","taxRateIndex":0}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy_recenter_loop","count":200,"amount":"5000000000000000000"}
{"op":"unstake","positionId":5}
{"op":"sell","amount":"all","token":"KRK"}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy","amount":"100000000000000000000","token":"WETH"}
{"op":"stake","amount":"10000000000000000000000000","taxRateIndex":5}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy_recenter_loop","count":200,"amount":"5000000000000000000"}
{"op":"unstake","positionId":6}
{"op":"sell","amount":"all","token":"KRK"}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy","amount":"100000000000000000000","token":"WETH"}
{"op":"stake","amount":"10000000000000000000000000","taxRateIndex":0}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy_recenter_loop","count":200,"amount":"5000000000000000000"}
{"op":"unstake","positionId":7}
{"op":"sell","amount":"all","token":"KRK"}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy","amount":"100000000000000000000","token":"WETH"}
{"op":"stake","amount":"10000000000000000000000000","taxRateIndex":5}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy_recenter_loop","count":200,"amount":"5000000000000000000"}
{"op":"unstake","positionId":8}
{"op":"sell","amount":"all","token":"KRK"}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy","amount":"100000000000000000000","token":"WETH"}
{"op":"stake","amount":"10000000000000000000000000","taxRateIndex":0}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy_recenter_loop","count":200,"amount":"5000000000000000000"}
{"op":"unstake","positionId":9}
{"op":"sell","amount":"all","token":"KRK"}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy","amount":"100000000000000000000","token":"WETH"}
{"op":"stake","amount":"10000000000000000000000000","taxRateIndex":5}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy_recenter_loop","count":200,"amount":"5000000000000000000"}
{"op":"unstake","positionId":10}
{"op":"sell","amount":"all","token":"KRK"}