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>
This commit is contained in:
johba 2026-03-23 09:12:00 +00:00
parent 144d6a2f7f
commit 69ba4fd44e
4 changed files with 94 additions and 56 deletions

View file

@ -1,54 +1,89 @@
// schema-version: 1
{"op":"buy","amount":"100000000000000000000","token":"WETH"}
{"op":"stake","amount":"1000000000000000000000","taxRateIndex":0}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy","amount":"100000000000000000000","token":"WETH"}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy","amount":"100000000000000000000","token":"WETH"}
{"op":"stake","amount":"1000000000000000000000","taxRateIndex":5}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy","amount":"100000000000000000000","token":"WETH"}
{"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":1}
{"op":"buy","amount":"100000000000000000000","token":"WETH"}
{"op":"stake","amount":"1000000000000000000000","taxRateIndex":0}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy","amount":"100000000000000000000","token":"WETH"}
{"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":"buy","amount":"100000000000000000000","token":"WETH"}
{"op":"stake","amount":"1000000000000000000000","taxRateIndex":5}
{"op":"sell","amount":"all","token":"KRK"}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy_recenter_loop","count":20,"amount":"100000000000000000000"}
{"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":"1000000000000000000000","taxRateIndex":0}
{"op":"stake","amount":"10000000000000000000000000","taxRateIndex":5}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy_recenter_loop","count":20,"amount":"100000000000000000000"}
{"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":"1000000000000000000000","taxRateIndex":5}
{"op":"stake","amount":"10000000000000000000000000","taxRateIndex":0}
{"op":"recenter"}
{"op":"mine","blocks":50}
{"op":"buy_recenter_loop","count":20,"amount":"100000000000000000000"}
{"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"}