harb/onchain/test
johba 87912b06da fix: No Foundry test for OptimizerV3 calculateParams correctness (#607)
Add table-driven Foundry tests for OptimizerV3.calculateParams covering:
- Bear regime at 0%, 1%, 50%, 91% staking (all tax rates)
- Bull/bear boundary at 92% with tax index transitions
- Bull/bear at 95% with penalty=50 exact boundary
- EffIdx shift behavior at 96% (taxIdx 13→14 discontinuity)
- Bull at 97% with max tax, 100% always bull
- Edge cases: all-zero inputs, zero tax at high staking
- Mantissa overflow guard
- Unused slots ignored
- Fuzz: no reverts, output always exactly bear or bull

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 06:31:06 +00:00
..
abstracts fix: guard int128 overflow in ThreePositionStrategy mirror tick (#622) 2026-03-20 02:46:30 +00:00
helpers fix: _scrapePositions: unguarded safeTransfer to address(0) when feeDestination unset (#624) 2026-03-20 01:05:05 +00:00
libraries Add Solidity linting with solhint, Foundry formatter, and pre-commit hooks (#51) 2025-10-04 15:17:09 +02:00
mocks fix: feat: Push3 input redesign — normalized indicators instead of raw protocol values (#635) (#649) 2026-03-13 07:53:46 +01:00
EthScarcityAbundance.t.sol fix: address AI review findings for #706 recenterAccess removal 2026-03-14 09:15:48 +00:00
FitnessEvaluator.t.sol fix: mint_lp and burn_lp not soft-failing in attack execution (#630) 2026-03-20 00:23:58 +00:00
FuzzingAnalyzerBugs.t.sol fix: address AI review findings for #706 recenterAccess removal 2026-03-14 09:15:48 +00:00
Kraiken.t.sol fix: add symmetric InvalidAddress guard to setLiquidityManager (#935) 2026-03-18 09:45:43 +00:00
LiquidityManager.t.sol fix: _scrapePositions: unguarded safeTransfer to address(0) when feeDestination unset (#624) 2026-03-20 01:05:05 +00:00
Optimizer.t.sol fix: Optimizer and OptimizerV3 lack _disableInitializers() in constructor (#1055) (#1080) 2026-03-21 13:42:54 +01:00
OptimizerV3.t.sol fix: No Foundry test for OptimizerV3 calculateParams correctness (#607) 2026-03-22 06:31:06 +00:00
OptimizerV3Push3.t.sol fix: OptimizerV3Push3 as IOptimizer always returns bear defaults — integration risk (#1063) 2026-03-20 20:52:29 +00:00
ReplayProfitableScenario.t.sol fix: address AI review findings for #706 recenterAccess removal 2026-03-14 09:15:48 +00:00
Stake.t.sol fix: Test coverage: Stake.sol to 100% (#284) 2026-02-26 03:59:20 +00:00
SupplyCorruption.t.sol fix: address AI review findings for #706 recenterAccess removal 2026-03-14 09:15:48 +00:00
VWAPFloorProtection.t.sol fix: address AI review findings for #706 recenterAccess removal 2026-03-14 09:15:48 +00:00
VWAPTracker.t.sol fix: Backtesting #5: Position tracking + P&L metrics (#319) 2026-02-27 11:23:18 +00:00