- docs/mainnet-bootstrap.md: fix Step 4c to use SwapRouter02 7-field
struct (no deadline field); the 8-field ABI was for SwapRouter v1 but
the address is SwapRouter02
- docs/mainnet-bootstrap.md: correct Step 1 to no longer falsely claim
that pre-bootstrap transactions succeed when Forge aborts on simulation
failure; Step 1 now reflects the try/catch behaviour added below
- docs/mainnet-bootstrap.md: Step 6 drops --private-key flag (Foundry
ignores it when vm.startBroadcast(privateKey) is called internally)
and documents that the .secret seed-phrase file must be present
- docs/mainnet-bootstrap.md: remove no-op `export LM_ADDRESS="$LM_ADDRESS"`
- docs/mainnet-bootstrap.md: cite exact line range (101-145) in
Troubleshooting workaround instead of informal marker description
- onchain/script/DeployBase.sol: wrap liquidityManager.recenter() and
seed buy in try/catch so a fresh-pool TWAP revert skips the inline
bootstrap with a warning rather than aborting the entire simulation
- onchain/script/DeployBase.sol: fix --fork-url to --rpc-url in the
post-deploy console.log hint
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add docs/mainnet-bootstrap.md with the full two-phase bootstrap
sequence: pool init, 300 s TWAP warm-up wait, first recenter + seed
buy (exact cast commands), 60 s cooldown wait, second recenter via
BootstrapVWAPPhase2.s.sol, and verification/troubleshooting steps.
Update the inline bootstrap comment in DeployBase.sol to warn that the
attempt always reverts on a fresh pool and direct operators to the new
runbook.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Stream evolve.sh output directly to stderr instead of buffering in a
command substitution; long runs (tens of minutes) are now visible live.
- Use an array (EVOLVE_ARGS) for evolve.sh arguments instead of an
unquoted DIVERSE_FLAG string variable.
- Abort the current run (continue to next loop iteration) when the patch
fails to apply, rather than silently running with wrong evaluation semantics.
- Fix notify() to pass the message via stdin to avoid SSH single-quote
interpolation breakage on messages containing special characters.
- Fix step comment/counter mismatch: "Step 7" comment now reads "Step 6"
to match the [6/7] log label for the summary-write step.
- Clarify in evolution.conf that GAS_LIMIT and ANCHOR_WIDTH_UNBOUNDED are
documentation-only (they document what evolution.patch does); editing
them has no runtime effect.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace `mktemp -d` with a fixed working directory `evolved/.work/` that
is wiped at startup. Stale `/tmp/tmp.*` directories from killed runs can
no longer interfere with batch-eval.sh path resolution. Run outputs are
already preserved in `evolved/run_NNN/` before the work dir is cleaned.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
evo_run007_champion: fitness 7.117e21, anchorWidth=153 (unbounded),
discoveryDepth=0. Simplified to single percentageStaked>88% threshold.
Evolved under IL crystallization attack pressure.
Recovered from reflog after rebase accident destroyed PRs #692, #699.
Balanced Adaptive (#688) was garbage collected — will be regenerated.
Kindergarten (#683) needs fresh implementation due to evolve.sh conflicts.
Closes#672, #675.
FEE_DEST is now a keccak-derived address with zero ETH balance.
anvil_impersonateAccount succeeds but cast send fails on gas deduction.
Add anvil_setBalance before impersonation, matching the same fix
already applied in red-team.sh.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
DeployLocal.sol changed feeDest to keccak256('harb.local.feeDest') =
0x8A9145E1Ea4C4d7FB08cF1011c8ac1F0e10F9383 but bootstrap-common.sh
still had the old address 0xf6a3eef9088A255c32b6aD2025f83E57291D9011.
Mismatch caused setRecenterAccess to revert (impersonating wrong address).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Single-cycle attack extracts 21.3 ETH (2.13%) from 1000 ETH LM:
buy 31.9 ETH → recenter → sell all KRK
Key finding: thin pre-recenter positions allow massive price impact,
recenter rebuilds deep positions at manipulated price, sell through
deep positions recovers most ETH. IL crystallized during recenter.
This is the optimal single-buy amount — 31.95+ hits max tick,
<31 ETH extracts proportionally less.
Eliminates Codeberg git clone rate limiting. The mirror at
/git-mirrors/harb.git (synced every 2 min) provides objects locally,
so the clone step only fetches deltas from Codeberg.
Volume mounted via WOODPECKER_BACKEND_DOCKER_VOLUMES.
- Fix run_NNN scan regex: r'run(\d+)' → r'run_(\d+)' so it correctly
matches the underscore-separated directory names the script creates
(previously always resolved to 001, overwriting the same dir each run)
- Remove [in-progress] tag from STATE.md entry for #752
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- --output now accepts a base dir (default: evolved/) instead of requiring
an explicit path each run
- On each invocation, scan base dir for existing run_NNN/ subdirectories,
find the highest N, and create run_(N+1)/ for this run's outputs
- All generation JSONL files, best.push3, diff.txt, and evolution.log are
written to the new run dir — previous runs are never overwritten
- Log header now shows both Base dir and Output (run dir) for clarity
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- DeployBase.sol: remove broken inline second recenter() (would always
revert with 'recenter cooldown' in same Forge broadcast); replace with
operator instructions to run the new BootstrapVWAPPhase2.s.sol script
at least 60 s after deployment
- BootstrapVWAPPhase2.s.sol: new script for the second VWAP bootstrap
recenter on Base mainnet deployments
- StrategyExecutor.sol: update stale docstring that still described the
removed recenterAccess bypass; reflect permissionless model with vm.warp
- TestBase.sol: remove vestigial recenterCaller parameter from all four
setupEnvironment* functions (parameter was silently ignored after
setRecenterAccess was removed); update all callers across six test files
- bootstrap-common.sh: fix misleading retry recenter in
seed_application_state() — add evm_increaseTime 61 before evm_mine so
the recenter cooldown actually clears and the retry can succeed
All 210 tests pass.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
red-team.sh called bare `sudo docker compose up/down` which applies
env_reset and drops FORK_URL before anvil-entrypoint.sh can read it.
Change both calls to `sudo -E` so the caller's FORK_URL override is
propagated to docker-compose and into the anvil container.
Update ENVIRONMENT.md to reflect that a plain `FORK_URL=... bash
red-team.sh` invocation now works correctly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix factual error: bootstrap deploys KRAIKEN protocol contracts and uses
the existing V3 Factory; it does not re-deploy Uniswap V3 infrastructure
- Fix count/characterisation: intro now says "two network contexts" (dev
Anvil + backtesting tools) and clarifies FitnessEvaluator uses revm
in-process, not Anvil
- Fix sudo env-stripping hazard: replace bare `export FORK_URL` instruction
with `FORK_URL=... sudo -E bash red-team.sh` so the variable is not
silently dropped by sudo
- Nit: add --match-test testBatchEvaluate to the FitnessEvaluator example
to match the test file's own documented usage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Clarify that the dev Anvil defaults to Base Sepolia but can be overridden
with FORK_URL (confirmed from containers/anvil-entrypoint.sh)
- Add "Network Contexts" section distinguishing three distinct Anvil usages:
1. Dev stack Anvil (docker-compose): Base Sepolia by default
2. red-team.sh: requires FORK_URL=mainnet because it uses Base mainnet
periphery addresses (V3_FACTORY, SwapRouter02, NPM)
3. FitnessEvaluator.t.sol: independent mainnet fork via BASE_RPC_URL,
unrelated to the docker-compose stack
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>