[BIP-797] Wire Up V3 Protocol Fee Processing Permissions

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

2 Likes

This proposal is the result of a multi-team effort between the smart contracts team the Maxis. Can’t wait to see this new fee collection mechanism in action!

https://snapshot.box/#/s:balancer.eth/proposal/0xb7dc73580560446a20adc7bf79bce1d52a1ab32aee6154fce0441eea51307eb0