[BIP-115] Balancer Smart Vaults Fee Collector

Overview

This is a proposal to provide Balancer DAO with an automated way to collect the fees that the protocol has earned from its different layers, convert and bridge them if needed. Therefore, later on, an authorized party can withdraw and distribute them as bribes, to the DAO and to veBAL holders. The goal is to ensure that protocol fee collecting process is fully trustless and automated.


1. About Mimic

Mimic is a platform that allows you to deploy tailored infrastructure to automate (and/or delegate) access to DeFi, in a secure and 100% non-custodial way. Mimic is especially suitable to replace and speed up manual and centralized tasks while tracking and monitoring every detail. This is achieved through our innovative Smart Vaults concept: an automated and trustless solution that can be customized to suit your operation needs.

Deploying a Smart Vault is simple. We only need to figure out the best configuration that suits your needs and customize one for you. Moreover, Mimic provides you with lots of multi-layer flexibility, it can be easily scaled up by deploying and connecting additional Smart Vaults.

Our team members have a large experience in blockchain and especially in DeFi protocols. We have previously worked for many well-known projects like Aave, Balancer, Open Zeppelin, Aragon, POAP and The Graph.

2. Background

Currently Balancer DAO collects protocol fees in three layers: Mainnet, Polygon and Arbitrum:

Mainnet: 0xce88686553686DA562CE7Cea497CE749DA109f9F

Polygon: 0xce88686553686DA562CE7Cea497CE749DA109f9F

Arbitrum: 0xce88686553686DA562CE7Cea497CE749DA109f9F

As documented in [BIP-19] Incentivize Core Pools & L2 Usage:

  • All fees earned on Polygon & Arbitrum are used as bribes for core pools on those networks, weighted proportionally by TVL of those core pools - after the DAO takes its 25%.
  • All fees earned by Ethereum core pools are used as bribes on those pools (each pool gets its own fees as a bribe), after the DAO takes its 25%.
  • All fees earned by Ethereum non-core pools are sent to veBAL and the DAO (75/25 split).
  • Protocol fee collection, distribution, and any subsequent bribing take place every two weeks on Monday instead of weekly on Wednesday.
  • All fees earned are converted to USDC, except BAL and BAL-like assets which are converted to BAL
  • All bribes are paid in USDC

3. Core Proposal

Our proposal is to provide Balancer DAO with a solution to automate how it collects and distributes its protocol fees. To accomplished this, Mimic will deploy three customized Smart Vaults owned by Balancer DAO, one on each layer.

All Smart Vaults will only be allowed to collect earned fees when they reach a pre-determined value in USDC. If fees collected are BAL-like assets they will be converted to BAL, otherwise they will be converted to USDC. Both Polygon and Arbitrum Smart Vaults will bridge all USDC and BAL accumulated to the Mainnet Smart Vault every two weeks (one period).

Finally, an authorized manager can withdraw those collected tokens from Mainnet Smart Vault to distribute them accordingly as bribes, to the DAO and to veBAL holders.

Also, it is important to mention that at all times the DAO has full ownership and control of all three Smart Vault’s assets. This means that, for example, at any moment it can remove permissions to execute an action or withdraw any asset by itself.

4. Technical Specification

There will be three Smart Vaults. One deployed in Mainnet, another in Polygon and the last one in Arbitrum. All Smart Vaults will have a single owner who has full control over them at all times.

Each Smart Vault will be configured with a series of predefined actions, some of those will be automatically executed by Mimic network of bots and others manually by an authorized manager that Balancer DAO designates. Those actions are:

  • Gather and convert to USDC: Gathers assets (expect from BAL and BAL-like assets) from Balancer ProtocolFeesCollector and swaps them to USDC (except from USDC itself).
  • Gather and convert to BAL: Gathers BAL and BAL-like assets from Balancer ProtocolFeesCollector and swaps them to BAL (except from BAL itself).
  • Bridge: Bridges USDC and BAL to Mainnet every two weeks.
  • Withdraw: Withdraws any asset to an external wallet configured by the owner.

Note that all this behavior will be enforced by smart contracts code, actions won’t be allowed to perform any further logic.

In case external conditions change, the deployed infrastructure can be adjusted as necessary on an ongoing basis to reach the endowment’s objectives. Smart Vaults provide full flexibility to add new allow-listed actions, change permissions or incorporate new strategies.

More information here: https://docs.mimic.fi/general/how-it-works

5. Operational details

5.1. Reporting

Mimic offers a reporting site where users can follow all their Smart Vaults activity. Mimic also supports subscribing to a notifications service that can be easily integrated with some chat rooms like Discord. Additionally, users can subscribe to be notified with periodic reports that will be emitted by Mimic automatically.

5.2. Maintenance

Mimic will be in charge of monitoring the Smart Vaults on a daily basis, making sure the reporting tools are kept up-to-date accordingly. Additionally, Mimic will make use of its own bots infrastructure to execute the automated actions when needed.

In case a critical report is received, Mimic will act immediately in order to assess its severity and act accordingly. In case Smart Vaults assets are at risk, Mimic team will get in touch with the trusted committee either to pause the Smart Vaults operations until it can be migrated to a new implementation with the corresponding fixes.

5.3. Fees

Mimic will charge a 2% fee of the assets that are processed through the Smart Vaults with a 5K USD cap for every period of execution (two weeks).

5.4. Termination

As mentioned before Balancer DAO will be in full control of its Smart Vaults and the funds that were deposited into them. This means Balancer DAO is allowed to exit at any point in time. Neither Mimic nor anyone else, unless it was previously allowed by the Balancer DAO, will be never in control of those funds.

6. Timeline

Once the final details of the Balancer Smart Vaults are finalized, the Mimic team will take full responsibility to set up the required automated actions. Mimic already counts with infrastructure to deploy and test Smart Vaults that can be applied for this use case.

Assuming the proposed investment strategies and automated actions are accepted by Balancer DAO, setting three Smart Vaults for it shouldn’t take longer than a month. After that, we will schedule an audit process for the configuration before the deployment which shouldn’t take more than two weeks.

7. Contact

Website — mimic.fi

Docs — docs.mimic.fi

Whitepaper — mimic.fi/whitepaper

Twitter — twitter.com/mimicfi

Discord — discord.mimic.fi

Medium — medium.com/mimicfi


Annex I - Smart Vaults

Name Layer Owner Mimic bots Managers
Balancer Fee Collector Mainnet Mainnet 0x123 0x9384893D33B71D647DcA48df30e393D7a50b72F9
0x54dB013D48cef8469FB286665CcE179617F75257 0x123, 0x123
Balancer Fee Collector Polygon Polygon 0x123 0x9384893D33B71D647DcA48df30e393D7a50b72F9
0x54dB013D48cef8469FB286665CcE179617F75257 0x123, 0x123
Balancer Fee Collector Arbitrum Arbitrum 0x123 0x9384893D33B71D647DcA48df30e393D7a50b72F9
0x54dB013D48cef8469FB286665CcE179617F75257 0x123, 0x123

Annex II - Actions

Action #1 - “Gather and convert to USDC

Overview

Description Gathers assets (expect from BAL and BAL-like assets) from Balancer ProtocolFeesCollector and swaps them to USDC (except from USDC itself).
Smart Vaults Mainnet, Polygon and Arbitrum.
Automatic execution Yes if activated. By Mimic bot when assets on Balancer ProtocolFeesCollector that are not BAL and BAL-like assets are over a minimal amount.
Manual execution Yes by Manager.
Authorization -
Timelock -
Gas price TBD
Gas amount TBD
Gas configuration Owner

Primitives

Primitive Param Limits Configured by Conf. timelock
Generic: Calls any function of an external contract Contract ProtocolFeesCollector: 0xce88686553686DA562CE7Cea497CE749DA109f9F - -
Function withdrawCollectedFees -
Assets Any asset except for BAL and BAL-like assets Owner -
Amount Min 5000 USDC Owner -
Swap: Swaps at best rate among main DEXs. Instrument 1inch / Balancer - -
Token In Any asset except for BAL, BAL-like assets and USDC - -
Token Out USDC - -
AmountIn Any amount - -
Slippage Chainlink protected - -

Action #2 - “Gather and convert to BAL

Overview

Description Gathers BAL and BAL-like assets from Balancer ProtocolFeesCollector and swaps them to BAL (except from BAL itself).
Smart Vaults Mainnet, Polygon and Arbitrum.
Automatic execution Yes if activated. By Mimic bot when BAL and BAL-like assets on Balancer ProtocolFeesCollector are over a minimal amount.
Manual execution Yes by Manager.
Authorization -
Timelock -
Gas price TBD
Gas amount TBD
Gas configuration Owner

Primitives

Primitive Param Limits Configured by Conf. timelock
Generic: Calls any function of an external contract Contract ProtocolFeesCollector: 0xce88686553686DA562CE7Cea497CE749DA109f9F - -
Function withdrawCollectedFees -
Assets Any BAL and BAL-like assets Owner -
Amount Min 5000 USDC Owner -
Swap: Swaps at best rate among main DEXs. Instrument 1inch / Balancer - -
Token In Any BAL-like assets - -
Token Out BAL - -
AmountIn Any amount - -
Slippage Chainlink or signature protected - -

Action #3 - “Bridge”

Overview

Description Bridges USDC and BAL to Mainnet.
Smart Vaults Polygon and Arbitrum.
Automatic execution Yes if activated. By Mimic bot every two weeks.
Manual execution Yes by Manager.
Authorization -
Timelock -
Gas price TBD
Gas amount TBD
Gas configuration Owner

Primitives

Primitive Param Limits Configured by Conf. timelock
Bridge: Bridge an asset from one layer to another. To Mainnet - -
Asset Any - -
Amount Any - -

Action #4 - “Withdraw”

Overview

Description Withdraws any asset to an external wallet configured by the owner.
Smart Vaults Mainnet, Polygon and Arbitrum.
Automatic execution No.
Manual execution Yes. By Manager.
Authorization -
Timelock -
Gas price -
Gas amount -
Gas configuration -

Primitives

Primitive Param Limits Configured by Conf. timelock
Withdraw: Withdraw assets to an external address. Recipient Recipient addresses: [0x123] Owner -
Asset Any - -
Amount Any - -

Summary: if approved, Mimic will begin development of these Smart Vaults to trustlessly collect, convert and bridge protocol fees. which include a fee of 2%, up to a maximum of $5k every two week collection cycle. Balancer DAO is allowed to exit and stop using the Smart Vaults at any point in time.

2 Likes

While I have not yet fully read the post, this seems to be touching the way how the DAO collects fees. There has been some work done by Daoism wrt. Fee collection mechanism via the rev share proposal. I want to highlight that as it might be relevant for the reader. More info here:

Pining @isolo

1 Like

yes, we will need to finalize the ProtocolFeeSplitter and if indeed that will sit on top, the smart vaults will need to withdraw through that rather than the ProtocolFeesWithdrawer.

Thanks for bringing this up, has been on my mind as well. We should have an answer on this fairly soon.

Hi guys!

This proposal is a little perpendicular to what we did.

As I understand, This proposal plans to collect tokens from all the chains in BAL and USDC so they can be bridged to mainnet and claimed later. Our proposal, on the other hand, adds a possibility to claim fees for pool creators. It is unclear where exactly they plan to transfer tokens via the bridge. So it depends on how they will implement the new smart contract.
Now we have protocolFeeSplitter pulling tokens from protocolFeeCollectora. If they are planning to do a withdrawal from new contracts , it will break our flow, but it can be reconstructed on top of their implementation.

https://snapshot.org/#/balancer.eth/proposal/0xdb0518f5bb3f3ce061ab724e41cf9dbde74f094191e8125dac3fe675b6578f0b

Since this is now up for a vote I wanted to make it clear that I view this proposal as critically important to hardening the process around how Balancer collects & distributes fees. The Maxis cannot be expected to manually do all of this forever. If this proposal fails I humbly request that a discussion can occur to find out why it was voted down and how we can fix it so this can move forward. But ideally, this should simply pass.

3 Likes