fix: No recovery path if VWAP bootstrap fails mid-sequence (#644)
Add recovery procedure documentation and automated recovery script for when the VWAP bootstrap fails partway through (e.g. second recenter reverts due to insufficient price movement). - Add "Recovery from failed mid-sequence bootstrap" section to docs/mainnet-bootstrap.md with diagnosis steps and manual recovery - Create scripts/recover-bootstrap.sh to automate diagnosis and retry - Add warning comments in BootstrapVWAPPhase2.s.sol, DeployBase.sol, and bootstrap-common.sh referencing the recovery procedure Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9cfffa5cea
commit
fbe8384342
5 changed files with 291 additions and 0 deletions
|
|
@ -121,6 +121,9 @@ fund_liquidity_manager() {
|
|||
|
||||
bootstrap_vwap() {
|
||||
detect_swap_router
|
||||
# WARNING: If the second recenter() below fails mid-sequence, the LM is left
|
||||
# with positions deployed but cumulativeVolume == 0 (partial bootstrap).
|
||||
# For mainnet recovery see docs/mainnet-bootstrap.md or scripts/recover-bootstrap.sh.
|
||||
# Idempotency guard: if a previous run already bootstrapped VWAP, skip.
|
||||
local cumvol
|
||||
cumvol="$(cast call --rpc-url "$ANVIL_RPC" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue