harb/onchain/test
johba 2c69963151 feat: Add scenario recording and replay system for invariant debugging
Implements comprehensive fuzzing improvements to find and reproduce invariant violations:

Recording System:
- ScenarioRecorder captures exact trading sequences that violate invariants
- Exports to JSON, replay scripts, and human-readable summaries
- Unique Run IDs (format: YYMMDD-XXXX) for easy communication

Enhanced Fuzzing:
- ImprovedFuzzingAnalysis with larger trades (50-500 ETH) to reach discovery position
- Multiple strategies: Discovery Push, Whale Manipulation, Volatile Swings
- Successfully finds profitable scenarios with 66% success rate

Shell Scripts:
- run-recorded-fuzzing.sh: Automated fuzzing with recording and unique IDs
- replay-scenario.sh: One-command replay of specific scenarios

New Optimizers:
- ExtremeOptimizer: Tests extreme market conditions
- MaliciousOptimizer: Attempts to exploit the protocol

Documentation:
- Updated CLAUDE.md with complete recording workflow
- Enhanced 4-step debugging process
- Quick reference for team collaboration

This system successfully identifies and reproduces the discovery position exploit,
where traders can profit by pushing trades into the unused liquidity at extreme ticks.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-18 20:31:39 +02:00
..
abstracts feat: Optimize discovery position depth calculation 2025-08-16 16:45:24 +02:00
helpers wip 2025-08-09 18:03:31 +02:00
libraries Fix failing test suite by addressing fuzzing bounds and event expectations 2025-07-15 11:57:28 +02:00
mocks feat: Add scenario recording and replay system for invariant debugging 2025-08-18 20:31:39 +02:00
Kraiken.t.sol Complete project rename from HARB/Harberg to KRAIKEN with KRK token symbol 2025-07-11 13:47:42 +02:00
LiquidityManager.t.sol renaming 2025-07-25 19:09:11 +02:00
ReplayProfitableScenario.t.sol feat: Add scenario recording and replay system for invariant debugging 2025-08-18 20:31:39 +02:00
Stake.t.sol renaming 2025-07-25 19:09:11 +02:00
VWAPTracker.t.sol Consolidate duplicate helper functions and improve test maintainability 2025-07-18 20:30:50 +02:00