fix: Hardcoded TWAP/cooldown values not documented (#825)

Document MIN_RECENTER_INTERVAL (60 s, LiquidityManager.sol:61) and
PRICE_STABILITY_INTERVAL (300 s, PriceOracle.sol:14) in
docs/ARCHITECTURE.md and docs/PRODUCT-TRUTH.md so that agent-facing
and product-facing copy stays traceable to source constants.

Add an inline HTML comment in red-team-program.md next to the
hardcoded 60s/300s sentence pointing to the two source constants,
making drift detectable during code review.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
openhands 2026-03-15 19:51:52 +00:00
parent baaca1c9b4
commit 0d09f598d9
3 changed files with 7 additions and 0 deletions

View file

@ -50,6 +50,10 @@ All managed by LiquidityManager via ThreePositionStrategy abstract:
**Recenter** = atomic repositioning of all three positions. Triggered by anyone, automated by txnBot.
**Recenter constraints** (enforced on-chain):
- **60-second cooldown**: `MIN_RECENTER_INTERVAL = 60` (`LiquidityManager.sol:61`). A second recenter cannot succeed until at least 60 seconds have elapsed since the last one.
- **300-second TWAP window**: `PRICE_STABILITY_INTERVAL = 300` (`PriceOracle.sol:14`). `recenter()` validates the current tick against a 5-minute TWAP average (±`MAX_TICK_DEVIATION = 50` ticks). The pool must have at least 300 seconds of observation history; a fallback to a 60 000-second window is used if recent data are unavailable.
## Optimizer Parameters
`getLiquidityParams()` returns 4 values: