Repository navigation
Description
Context
FeeRouter routes the 30% buyback bucket by transferring USDC to a buybackBurner address, swappable in one governance call via setBuybackBurner (FeeRouter.sol). FeeRouter never calls a swap method — it only safeTransfers USDC — so it is already fully agnostic to the swap venue.
The only concrete burner today is BuybackBurnerBalancerV3. However, Balancer V3 is not deployed on Arbitrum Sepolia (the testnet target per CLAUDE.md) — the singleton Vault 0xbA13… has no code there. Uniswap V3 is live on Arbitrum Sepolia (factory 0x248AB79…, QuoterV2 0x2779a0…). So the initial testnet network needs a Uniswap V3 burner; the Balancer path can be swapped in later, once Balancer V3 reaches Arb Sepolia, with no FeeRouter change.
Problem
The abstract BuybackBurner base bakes in Balancer-specific wiring that a Uniswap burner cannot reuse cleanly:
balancerVault/balancerPoolstoragesetPool/setVaultsetters +PoolUpdated/VaultUpdatedevents- the
if (balancerPool == 0 || balancerVault == 0) revert PoolNotWired()check insideexecuteBuyback
Proposed change
- Make the base venue-neutral. Lift the Balancer-specific storage, setters, and events down into
BuybackBurnerBalancerV3. Replace the base's hard wiring check with an abstract_requireWired()hook each venue implements (still reverting the sharedPoolNotWired). The base keeps everything genuinely shared: roles,usdc/token, theexecuteBuybackskeleton (amount/minOut checks, balance bound, TOKEN-balance-delta verification, burn, event), the_performSwaphook,rescueUSDC, pause. - Add
BuybackBurnerUniswapV3. A concrete sibling: singleexactInputSingleUSDC→TOKEN swap via SwapRouter02, with the same security posture as the Balancer burner:- scoped router approval (
forceApprove(router, amountIn)then reset to 0), - governed
slippageBps/minBuybackAmount/maxBuybackAmountband, - on-chain TWAP
minOutfloor sourced from the V3 pool's nativeobserve()oracle (no hand-rolled accumulator needed, unlike Balancer V3), fail-closed until the observation window matures, - per-epoch USDC liquidity cap for parity.
- scoped router approval (
- Tests + green CI (forge fmt,
FOUNDRY_PROFILE=ci forge build --deny warnings, forge test, slither, aderyn).
Out of scope
- Deploying/seeding the pool itself (operational).
- FeeRouter changes — none needed; it is already venue-agnostic.
Testnet rollout
Wire BuybackBurnerUniswapV3 on Arbitrum Sepolia now; swap to BuybackBurnerBalancerV3 via setBuybackBurner once Balancer V3 lands there. Relates to ADR 018 (liquidity strategy) and ADR 026 (FeeRouter split / burn).
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity