TL;DR
Balancer’s new v3 vault has its own mechanism of collecting fees. Helper contracts (ProtocolFeeSweeper
and CowSwapFeeBurner
) have been deployed and tested and are ready to start processing fees on all active chains. An offchain bot determines when and how to process exactly via an EOA. All these components require the necessary permissions in order to fulfill their role. A test run of this system was performed on Sepolia (see References below).
Technical Specifications
The protocol fee processing infrastructure on Balancer v3 consists of several smart contracts:
Protocol Fee Collector
This is the Balancer ‘native’ smart contract that actually withdraws the fees from the Balancer v3 vault, and is also where third parties would withdraw their fees.
Protocol Fee Sweeper
This smart contract has recently been deployed, and sweeps specific tokens from the collector to then process for the DAO. In order to be able to do so, it needs the permission to call ProtocolFeeCollector.withdrawProtocolFeesForToken(address,address,address)
.
The fee recipient of this sweeper is currently set to the Maxis’ omni-chain multisig. The fee recipient is automatically granted all other permissions needed to manage the sweeper (set target token, add/remove burners). However, eventually the actual sweeping will be performed automatically by an offchain bot, controlling the EOA 0x74E283B985EA76c55C8B48d6bD1067a418188424
. This EOA should therefore also be granted the permission to call ProtocolFeeSweeper.sweepProtocolFeesForToken(address,address,uint256,uint256,address)
.
Cow Swap Fee Burner
This is a burner inspired by the fee burner approach by Curve. It ‘burns’ a token into a specified target token, in this case via CoW Swap orders. It has several permissions associated with it. First of all, burn(address,address,uint256,address,uint256,address,uint256)
should be granted to the fee sweeper. The other following permissions are to manage orders, and should be granted to the Maxis’ multisig:
cancelOrder(address,address)
emergencyCancelOrder(address,address)
retryOrder(address,uint256,uint256)
All of the permissions mentioned above should be put in place on all four chains Balancer v3 is currently deployed on: Ethereum, Arbitrum One, Base and Gnosis.
Payloads
References
- Action IDs for all Balancer deployments on Ethereum: balancer-deployments/action-ids/mainnet/action-ids.json at master · balancer/balancer-deployments · GitHub
- Bot sweeping fees via the Fee Sweeper: Sepolia Transaction Hash (Txhash) Details | Etherscan
- Burner order on CoW Swap: CoW Explorer