Conversation
Contracts: - CLVault: NAV includes vault+strategy idle; deposit reads NAV pre-transfer (fixes share dilution); range-aware idle rebalance via planSwapForMint; position NFT re-staked into gauge after every user interaction; rebalance tail runs a full doHardWork so strategy idle is absorbed into the new position; sweepDust replaced by sweepStrayToken (token0/1 protected) - CLRebalanceHelper: planSwapForMint plans at SPOT (not TWAP) with one-step price-impact correction from pool liquidity; burn/mint mins take per-side min(TWAP, spot); precision-edge clamps at range boundaries - AerodromeCLStrategy: idle absorption decoupled from reward threshold (_absorbIdleIntoPosition); stakePosition for vault-driven restaking; preInteract dust sweep; reward path restructured (single pre-fee gate) - CLWrapper: fee-aware previews, per-leg swap slippage guard, truncation guard, immutable token caching, zero-balance invariant after every call - CLChainlinkChecker: new Chainlink Automation upkeep for rebalances (replaces Gelato-style CLRebalanceChecker) Cleanup (82-agent audit, 73 verified findings): removed dead functions, legacy paused/sellFloor/slot-array machinery, unused events/imports/params, 4 dead files; interfaces trimmed to actual consumer surface; stale comments corrected. CLVault bytecode 22,422 bytes. Zero CL compile warnings. Deploy tooling: bridge-Storage deploy flow (EOA setup, multisig finalize), recovery + checker deploy scripts, pilot configs for cbETH/ETH1 and tBTC/cbBTC. Tests: 169 passing across 12 CL suites (user fairness, rebalance deep-dive with live-pool fuzzing, wrapper audit, invariants, adversarial guards). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Complete CL (Aerodrome Slipstream concentrated-liquidity) vault system for Base: production-hardened contracts, pilot deployment tooling, and a full dead-code cleanup pass.
Contract changes
planSwapForMint; position NFT re-staked into the gauge after every deposit/withdraw/rebalance; rebalance tail runs a fulldoHardWorkso accumulated strategy idle is absorbed into the new position;sweepDustreplaced bysweepStrayToken(token0/token1 blocked — they back PPS)planSwapForMintplans at spot (not TWAP) with a one-step price-impact correction using pool active liquidity; burn/mint mins take per-sidemin(TWAP, spot)so out-of-range burns don't revert; precision-edge clamps at range boundaries_absorbIdleIntoPositionruns on every doHardWork);stakePositionfor vault-driven restake;preInteractdust sweep keeps strategy idle inside NAV/payout mathWrapperSwapBelowPrecisionfails loud instead of bleeding value), truncation guard, immutable token caching, wrapper always ends interactions at zero balanceCLRebalanceChecker(deleted)Cleanup
82-agent audit with adversarial verification; 73 confirmed findings applied: dead functions, legacy paused/sellFloor/slot-array machinery, unused events/imports/params, 4 dead files, interface trims, stale comments. CLVault bytecode 22,422 bytes (2.1 KB under EIP-170). Zero CL compile warnings.
Deploy tooling
Bridge-Storage flow (EOA does setup, final step flips every contract to the multisig-governed Storage), recovery script for partial deploys, checker deploy script, pilot configs for cbETH/ETH1 and tBTC/cbBTC.
Test plan
🤖 Generated with Claude Code