Add Arbitrum Uniswap V3 WBTC-cbBTC CLM#1797
Conversation
|
Awesome, thanks @KaiCode2. Spotted a few minor things:
Looks sensible otherwise. I would note though that CLMs don't tend to do especially well for very-correlated 1-tick LPs. This is just because most depositors are conscious that the price shouldn't move much, so they're happy to manage their own LPs at narrow ranges, and Beefy doesn't add much additional value. Just to manage expectations 😊 |
|
Thanks for the thoughtful review! Addressed all of it in commit a94cb72:
Front-end PR (beefyfinance/beefy-v2#3138) will get a follow-up commit bumping the addressbook dependency once this one lands and a new version is published. |
a94cb72 to
7d2b305
Compare
New token: cbBTC on Arbitrum
Token address:
0xcbB7C0000aB88B473b1f5aFd9ef808440eed33BfPool: WBTC/cbBTC Uniswap V3 0.01% —
0x9B42809aaaE8d088eE01FE637E948784730F0386Per @'s feedback (thanks!), this revision uses an Arbitrum-specific
arbcbBTCoracleId so cbBTC on Arbitrum is priced independently from cbBTC on other chains, and the on-chain oracle reads the cbBTC/WBTC UniV3 pool TWAP rather than the Chainlink BTC/USD feed. Pool observation cardinality has been bumped to 360.CLM deployment on Arbitrum mainnet:
0x618D9328EB1D06dFfD2CB4B67523b2cB5740e32f0x2a25771642EaBD9EBEa7245d578E5D813D5301e70x6B29227D91F1317bb945FbCC87B37ef39d04C5f8Strategy params:
positionWidth=20,maxTickDeviation=2,twapInterval=120. Vault owner =0x9A94…BdaD(vaultOwner), strategy owner =0x6d28afD…D89F(strategyOwner), reward pool owner =0xf7EC…CCcd(devMultisig). Strategist = my ledger.Pool observation cardinality bump (done — no keeper action needed)
pool.increaseObservationCardinalityNext(360)was called from the deployer wallet to support a 360-second TWAP on the new oracle wiring (Beefy's default for CLMs). Tx:0x58acbd28bc459236b8f6f52cf001fa4086c46de8fe91f7370e9020da8fb248a4.observationCardinalityNextis now360(currentobservationCardinalitygrows organically as the pool gets used).Pre-activation wiring required (keeper multisig
0x4fED5491693007f0CD49f4614FFC38Ab6A04B619to execute on Arbitrum):cbBTC needs to be wired into Beefy oracle (UniV3 pool TWAP) and into BeefySwapper so harvest can convert cbBTC fees to WETH.
setOracle on BeefyOracle
0x5C7c7Bb0c9251821cB5a1D9c08F21B0DAD5efe65:Decoded:
setOracle(cbBTC, beefyOracleUniswapV3 0x3EA93706…, abi.encode([WBTC, cbBTC], [0x9b42…pool], [360s TWAP]))— prices cbBTC against WBTC using the same pool we're vaulting (the deepest cbBTC liquidity on Arbitrum), with a 360-second TWAP.setSwapInfo on BeefySwapper
0xCee843CD04E3758dDC5BCFf08647DddB117151D0:Decoded: cbBTC → WETH via Uniswap V3 SwapRouter (cbBTC → WBTC at 0.01% → WETH at 0.05%),
amountIndex=132,minIndex=164,minAmountSign=0.Both calldata strings were fork-validated end-to-end (impersonated keeper on Arbitrum fork, applied both, then harvested with simulated swap volume — fees flowed correctly to caller / Beefy fee recipient / strategist).
Mainnet lifecycle test (deployer
0x2cF7…be4d, all phases executed on Arbitrum):0x4108d4e…44766strategy.panic(0,0)(paused=true, LP emptied to idle)0x84ce5cf…f0b2evault.withdrawAll(0,0)(7006 shares → 3606 WBTC + 3411 cbBTC, ≈ 87.5% of vault)0x12b342e…17699strategy.unpause()(paused=false, isCalm=true, burn-share backing redeployed)0xea58aec…fde220xfd75d6b…89a5e0x7ff5b1c…5cf8f0x58acbd28…48a4Final vault state: 6801 deployer shares (of 7801 total — 1000 are the standard MINIMUM_LIQUIDITY burn shares), pool holds 3907 WBTC + 3892 cbBTC across main+alt,
isCalm=true,paused=false.Local validators pass:
npm run prettier --check,npm run test:ts,npm run checksum(packages/address-book),npm run checkClms.Front-end PR: beefyfinance/beefy-v2#3138