Deploy BAL & aBAL from the Collector Contract


[ARFC] Deploy BAL & aBAL from the Collector Contract
Author: @llamaxyz - DeFi_Consulting (@MatthewGraham) and @dydymoon
Created: 2023-02-05 (updated)


Simple Summary

This proposal presents two options for deploying the approximately 100k BAL tokens being acquired by AIP 115 and the aBAL holding in the Ethereum Collector Contract, [1].

Abstract

AIP 115 has been successfully implemented and Aave has acquired an additional 100k BAL on market. The total BAL and aBAL holding is now 308,978.30. With 200k BAL already committed to veBAL, this proposal will determine how to deploy the remaining 108,978.30 BAL with the overall objective of maximizing the growth potential of Aave, [4,16].

Aave Snapshot voters can choose between two options, each of which has varying degrees of complexity and represents different means of achieving similar goals over different time horizons.

Option 1) Locking veBAL.
Option 2) Staking auraBAL.

Option 1) is about locking B-80BAL-20WETH enabling Aave to participate in Balancer gauge and governance votes, and benefit from the Liquidity Provider (LP) boosting and protocol fees earnings.

Option 2) focuses on yield, forgoes governance influence (participating in votes) and presents a higher yield investment strategy that over time, will lead to more governance influence relative to Option 1).

A Snapshot will be posted enabling the community to choose between both options. Llama recommends voting for Option 1).

Motivation

This BAL holding has been acquired by the Aave with the goal of supporting Aave lending market adoption. In pursuit of driving growth to the Aave markets, the BAL holding needs to be deployed and utilised.

Aave has the following BAL and aBAL holdings on Ethereum:

  • 200k BAL acquired via a token swap with Balancer DAO, [1].
  • 100k BAL acquired via an on market acquisition swap contract, [4].
  • 8,978.30 aBAL acquired through user borrowing BAL on Aave, [10].

This proposal will focus on how best to deploy the 100k BAL and 8,978.30 aBAL.

Option 1) Locking veBAL

The Balancer Liquidity Mining system is an automated program which governs the minting of all BAL tokens based on on-chain voting by veBAL holders. veBAL is obtained by joining the canonical 80/20 BAL/ETH Weighted Pool and then locking the Pool shares token (often called BPT, for ‘Balancer Pool Token’) for a time duration. The longer the 80/20 BPT is locked for, the more veBAL and voting power is obtained.

In Option 1), Aave DAO converts all BAL (incl. Redeem aBAL for BAL) with sufficient WETH to B-80BAL-20WETH. The B-80BAL-20WETH token is then deposited into the VotingEscrow veBAL contract and locked for the maximum duration, 1 year. This proposal will acquire the B-80BAL-20WETH and explain the goals of utilising the veBAL holdings while a separate proposal will detail how the veBAL is to be managed before being deployed to veBAL.

What’s veBAL ?

veBAL are not transferable and the voting influence decays on the veTokens balance over time requiring the veBAL to be relocked periodically to maintain maximum voting influence. The B-80BAL-20WETH can be locked from 1 week to 1 year. Ie: 1 B-80BAL-20WETH locked 1 year = 1 veBAL, locked 6 months = 0,5 veBAL etc

  • Gauge-weight Power
    Voting power which influences the BAL emissions on the different gauges. The votes happen every week on Balancer governance. It can be used for several goals which will be described later on this post.

  • Governance Power
    Voting influence in Balancer DAO proposals. Since Balancer DAO utilities off-chain governance, the voting power can be delegated via Snapshot. Note: Llama is currently a Balancer DAO delegate.

  • veBoost
    Locking B-80BAL-20WETH earns a boost of up to 2.5x on the liquidity provided on Balancer.

  • Protocol Fees
    75% of all trading fees consolidated for bb-a-USD (stable) + BAL coming from the veBAL gauge are distributed to lockers, [9].

veBAL Position Overview

By maximising the veBAL holding and using over 308.9K BAL with the proportional amount of WETH (326.88) for a combined worth of $2,719,000 at the time of writing, Aave would receive an estimated ~153,520.38 units of B-80BAL-20WETH. Converted to veBAL, the ~153,520.38 units would represent approximately 1.10% of the BPT liquidity and 1.40% of the veBAL supply. Aave would be one of the largest veBAL holders along with Aave Companies, [5].

With 145,000 BAL tokens currently being minted and distributed each week across four networks and Aave holding 1.40% of veBAL supply, this is equivalent to controlling the distribution of 2036 BAL per week, or $14,496 per week ($753,8080 per year, assuming a BAL price $7.12).

BAL emissions reduce yearly as per the inflation schedule and the next reduction will occur at the end of March 2023, pivoting from 145,000 to 121,930 BAL/week. With 2023 emission and the same veBAL share, Aave would be able to redirect 1,712 BAL/week, or $12,189 per week or $633,850 per year, assuming a BAL price at $7.12.

Aave can utilise its veBAL holdings to support, not limited to, the below strategies:

  • Redirect incentives on existing Balancer pools
  • Optimise the yield on treasury strategies
  • Bootstrap the Staked aToken Reserves
  • Grow and sustain the GHO liquidity
  • Help sustain the Safety Module yield

The boost amount received depends on the value of the funds deposited and the relative sizing of the veBAL holding. The boost can be used directly on the Collector Contract but considering the amounts of available funds, the boost is unlikely to be sufficient to boost all of Aave’s positions in Balancer Liquidity Pools. Therefore, it is likely any treasury strategies will be a mix of both depositing into Balancer gauges directly or via Aura Finance.

There remains the possibility to sell the veBoost on secondary markets like Warden, [6].

veBAL yield overview

The veTokens yield can vary a lot depending on several parameters:

  • bb-a-USD fees depends on the trading volume (Swap fee: 0.67% APR)
  • BAL rewards are coming from the veBAL gauge (BAL rewards: up to 0.91% APR)
  • The veBoost yield is hard to estimate as it won’t be the same if used on POL (up to 2.5x the yield), or sold

In the second case, the current minimum price listed on Warden is 0.00014 BAL/veBAL/week

veBoost if sold: from 0.27% APR with a BAL price of 7.14$ and a veBAL price of $18.92

  • Bribes: The biggest variation on the veBAL yield comes from the bribes received for the gauge weight power. Last week, the average cost was ~$0.085/veBAL vote/week. Gauges weight APR: 23.3%.

It’s important to note that the yield impact is better when some funds are deployed in strategies, farming boosted rewards on the pools voted.

Option 2) Staking auraBAL

Option 2) maximises earning whilst forgoing Aave’s ability to participate in BAL emission distribution votes. Both Option 1) and 2) involve obtaining the B-80BAL-20WETH position.

After the B-80BAL-20WETH position is obtained, Aave could deposit it into Aura Finance’s auraBAL wrapper contract to earn staking yield in the several forms (1.87% stables (bb-a-USD), 24.09% in BAL and 34.59% in AURA for a total of 60.56% APR), [8].

Depositing into the B-80BAL-20WETH/Aura pool and staking the BPT was considered, however this is more complex to execute and maintain for margin additional yield.

The yield received from the auraBAL holding can be compounded to earn additional yield.

  • BAL (24.09% of 60.56%): BAL, aBAL and WETH from the Collector Contract can be swapped for B-80BAL-20WETH and staked on Aura Finance.
  • bb-a-USD (1.87% of 60.56%): bb-a-USD can be deposited on Aura to earn 6.53% in (0.06% swap fees, 0.83% bb-a-USD, 2.30% BAL, 3.35% AURA).
  • AURA (34.67% of 60.32%): AURA can be locked for vlAURA and used to vote where BAL and AURA incentives will be directed. The vlAURA position generates around 3.34% in auraBAL as well as gives vote weight for proposal and gauge weight voting, [11]. The vlAURA lock period is 16 weeks and 4 days, depending on locking date and after this time, the AURA can be redeemed and swapped.

Growing a vlAURA position over time in addition to the veBAL one will increase the total voting power controlled over time, which will help to drive TVL to Aave markets and generate more earnings.

With 200K BAL from the token swap + WETH to be deposited in veBAL and 108,978.30 BAL + WETH into the auraBAL staking contract, Aave will own ~54,220 auraBAL and ~99,600 veBAL.

By staking 54,220 auraBAL, Aave DAO will hold approximately 1,99% of the auraBAL supply, [7].

Option 2) is focused on depositing B-80BAL-20WETH on Aura to earn more BAL & AURA rewards.

Comments

To help with the decision making, the table below presents some pros and cons of each approach. The TL;DR: veBAL has an immediate impact whilst auraBAL is a longer term, higher return strategy that compounds over time.

Llama suggests Option 1) to focus on accumulating voting power as soon as possible, to support all possibilities mentioned above.

There are several more advanced strategies to which Aave could deploy assets to grow its strategic voting power over time which will be detailed in the RF strategies deployment proposal.

It is reasonable to think that, in time, AURA could be listed as collateral on Aave, generating aAURA revenue which could also be used to bolster this strategy. The compounding effects of using Aave’s revenue stream presents a unique opportunity to gain influence in how BAL and AURA incentives are distributed.

Implementation

All BAL, aBAL and matching amount of wETH from the Collector Contract are to be converted to B-80BAL-20WETH via a swap contract.

Users will deposit the B-80BAL-20WETH BPT into the swap contract and receive BAL and wETH as per the ratio of BAL and wETH within the B-80BAL-20WETH pool. Traders will be encouraged to complete these transactions on Aave’s behalf for a 50 bps reward relative to the calculated book value of the B-80BAL-20WETH token.

Chainlink oracles will be used wherever possible and the payload will be peer reviewed by @bgdlabs.

Example:

When depositing into the pool if the ratio of BAL and WETH is not correct, the token in excess will be swapped to the other token and the user will incur higher gas fees.

75 bps on $25,000 is $187.5. This is sufficient to cover the gas costs and price exposure whilst performing the following transaction flow:

  • Approval BAL and wETH
  • Swap asset to BAL and wETH
  • Deposit BAL and wETH into the pool
  • Approve a budget for interacting with swap contract
  • Deposit B-80BAL-20WETH into swap contract
  • Swap BAL and wETH to preferred asset
  • Remove permission to interact with swap contract

The larger the trade size and the more times the trader completes the swaps, the more economical it becomes. There is a balance between trying to include the majority of market participants, timely execution and cost.

Additional considerations in the swap contract:

  • Query composition of B-80BAL-20WETH pool, if pools is outside 79.85-80.15% BAL range then don’t accept BPT deposits
  • Distribute a fixed 80/20 ratio of BAL and wETH in return for B-80BAL-20WETH
  • BAL and aBAL ceiling, current holding plus 1% at time of deployment
  • awETH ceiling, sufficient awETH to convert all BAL and aBAL including the 1% BAL and aBAL buffer
  • Creating the contract such that it can be easily updated to enable future revenue to be converted to B-80BAL-20WETH

An alternative execution philosophy would be to redeem aBAL for BAL, then deploy all BAL with a matching amount of wETH (80/20) into the B-80BAL-20WETH pool directly from the Collector Contract. The B-80BAL-20WETH pool is valued at $247.85m at the time of writing and Aave’s deposit would be 308,978.30 BAL and 326.88 wETH, representing 1.10% of the pool. There is MEV protection upon depositing into the pool and there is the ability to limit slippage and there would be a need to query the pool’s composition with predetermined conditions that when met enable Aave to deposit into the pool. Such a pre-condition would be the pool is 79.85-80.15% BAL.

The alternative option is a lot easier to execute from a smart contract perspective, does not rely on traders and avoids Aave paying traders a premium. The depositing on

Future Considerations

The above proposal focuses on whether Aave’s preference is for maximum governance influence or yield. Depending upon which direction Aave elects to proceed, there will be various other considerations and discussions that emerge.

Those considerations are:

  • Determine how to use the veBAL and/or vlAURA holdings, GHO, staked aToken pools, pools include in the Safety Module upgrade
  • Implementation of meta-governance, via Snapshot, AIP, multi-sig etc…, [3,4]
  • Continual conversion of aBAL and awETH to veBAL, if Option 1) is voted

References

[1] Aave - Strategic Partnership with Balancer DAO Part 2 - 100k BAL Acquisition
[2] Snapshot
[3] Aave - Strategic Investment Part 1 - BAL <> AAVE Token Swap
[4] [ARFC] BAL Interest Rate Curve Upgrade - #19 by Llamaxyz
[5] veBAL Holders
[6] https://app.warden.vote/dashboard/
[7] Ethereum Transaction Hash (Txhash) Details | Etherscan
[8] Aura BAL (auraBAL) Token Tracker | Etherscan
[9] AaveLinearPool - Developers
[10] $7.07 | Aave interest bearing BAL (aBAL) Token Tracker | Etherscan
[11] Aura Finance
[12] Balancer
[13] Creative Commons — CC0 1.0 Universal

Copyright

Copyright and related rights waived via CC0, [13].

7 Likes

Hi All :wave:

We are now proceeding to scope out and start working on the bonding curve for this deployment.

With regards to the 100K BAL purchase payload, this has been through peer review once and will be resubmitted for a second review shortly, before being submitted for on-chain voting. We are >95% complete and expect to have this submitted within the next fortnight.

4 Likes

Hi Everyone :wave:

We just want to highlight the Aave Ethereum Reserve Factor has been added to Balancer DAO’s whitelisted VoterEscrow contract. Llama worked the proposal through Balancer’s governance process back in April 2022 in preparation for what was to come.

B-80BAL-20WETH is intended to be deployed from the Reserve Factor.

3 Likes

veBal is from a strategic standpoint for both the safety module & GHO critical.

Balancer & Aave DAO worked together since day one, it’s completely clear IMHO that this proposal reinforces the synergies with the balancer ecosystem and I’m expressing my support for it.

5 Likes

Hi Everyone, :wave:

@Llamaxyz would like to highlight this proposal has been revised and we welcome any community feedback before progressing to a Snapshot in the coming weeks.

On the Snapshot, the community will have the choice of:

YAE - Option 1) Locking veBAL
YAE - Option 2) Staking auraBAL
NAE
ABSTAIN

We are in touch with @bgdlabs regarding the two implementation philosophies presented above and are looking forward to answer any questions from the community :smiley:

1 Like

Our comments regarding the proposal for the community to make a more informed decision:

  • From the technical side, we are fully neutral to the model chosen in terms of the platform (pure Balancer vs Aura), as this is more a decision to be taken by the community, guided by @Llamaxyz advice.
  • It doesn’t sound possible that there is MEV protection if depositing from the Collector into 80/20 BAL/wETH, given that it is a contract-to-contract interaction. We recommend @Llamaxyz double-check that if going that route.
  • In general, from previous proposals involving asset swaps, we think ad-hoc solutions are not the most efficient solution, introducing technical overhead and additional risk. We recommend @Llamaxyz to evaluate the usage of other battle-tested protocols for auctions or some types of limit orders, as the implementation of systems to swap assets is clearly out of scope at the moment and something on which the Aave DAO should probably not spend technical resources.
  • We advocate strongly for on-chain meta-governance systems, even if that involves doing slight modifications on the Aave Collector contract, unless there is a really big blocker for that on the recipient protocol to vote on, or if synchronization of votes is really difficult.
    Even more, we think @Llamaxyz should propose a general framework for this, being part of the scope of engagement.
  • In a similar direction, we think it is preferable that the funds allocated on the strategy don’t leave the Collector, unless isolation is required on a separate contract. If that is the case, it is perfectly acceptable, but better to keep additional contracts and layers as simple as possible.
  • As a general guideline on the so-called treasury management, we suggest always starting with simplicity versus maximum efficiency (e.g. returns or influence). Fully decentralized meta-governance and ad-hoc treasury management have important technical overhead, so better to have a progressive approach if possible, than to lose the opportunity in order to have the most complete solution.
1 Like

Hi Everyone, :wave:

We would like to share an update on the BAL and wETH swap to B-80BAL-20WETH.

To summarise, the below shows the current BAL and wETH to be swapped to B-80BAL-20WETH.

Asset Amount Price Value
BAL 309,102.07 $6.61 $2,043,756.21
wETH 326.31 $1,565.79 $510,939.05
B-80BAL-20wETH $2,554,695.26

The amount of B-80BAL-20WETH received is estimated to be 152,617.94 units valued at

Llama proposes the following methodology for obtaining the B-80BAL-20WETH holding:

  1. Redeem 326.31 awETH for wETH

  2. Approve 326.31 wETH on Cowswap

  3. Swap all 326.31 WETH to BAL. This routing minimises slippage.

The BAL holdings are now 78,011.66 + 309,102.07 = 387,113.73 BAL

  1. Approve BAL on Cowswap

  2. Swap all BAL for B-80BAL-20WETH

Aave is expected to receive 152,617.94 units of B-80BAL-20WETH. The B-80BAL-20WETH can be deposited into the voter escrow contract and locked to create a veBAL holding for Aave.

At the time of writing there are 14,133,907 units of B-80BAL-20WETH in circulating supply backed by 28,685,996 BAL and 29,196 wETH valued at $235,329,238.4 or $16.65/unit of B-80BAL-20WETH.

152,617.94*16.65 = $2,541,088.70

$2,541,088.70 - $2,554,695.26 = -$13,606.56

In performing the above transactions, Aave incurs $13,606.56 (0.53%) of price impact (slippage) in converting 309,102.07 units of BAL and 326.31 units of wETH.

For comparison purposes, the Balancer veBAL tool generates 153,121.46 units of B-80BAL-20WETH for depositing 309,102 units of BAL and 323 units of wETH. Using this reference data, Aave would incur 0.33% of price impact. This is reflective of the estimated difference in B-80BAL-20WETH received between Cowswap and Balancer’s veBAL Tool.

The number above are accurate at the time the post was drafted and shared for review. The final numbers to be used will be based upon the actual BAL and aBAL holding at the time.


A Snapshot vote will be created, voting to commence Monday 13th March 2023, with the following options:

YAE - Option 1) Locking veBAL
YAE - Option 2) Staking auraBAL
NAE
ABSTAIN

3 Likes

Aave + CoW Swap Trade

What is CoW Swap?

CoW Protocol is a fully permissionless trading protocol that leverages Batch Auctions as its price finding mechanism. CoW Protocol enables batch auctions to maximize liquidity via Coincidence of Wants (CoWs) in addition to tapping all available on-chain liquidity whenever needed. Batch Auctions are continuously run by the protocol because the solvers, the parties in charge of finding the most optimal settlement for the batch, are in competition to settle it. The winning solver will be the one that can maximize trader surplus by either having the most optimal CoW, finding the best liquidity sources, or combining both in a single settlement.

Check out documentation here

Why CoW Swap?

CoW has been used before for big DAO trades to protect against MEV, to protect against bad slippage, and to find liquidity for trades of this magnitude.

The biggest profile trade to date is the ENS trade.

Implementation

The current code can be found here

We will be leveraging Milkman to do a contract-to-contract interaction. This allows Aave to avoid the need to interact with the CoW Swap API offchain and allows for onchain enforceable dynamic slippage protection. In other words, the trade will execute only if the buy amount is higher than the minimum defined by the milkman contract instance.

ENS DAO used Milkman as well for their trades.

What is Milkman?

Milkman is maintained by the team at Yearn. They developed it as an extension of the CoW Swap protocol.

Using contracts, it can add extra validation in the form of price checkers:

To protect customers against bad slippage that might be offered by COW Swap, by using an oracle to validate the price, we can be certain that the DAO will not trade at a lower price (accounting for our permitted slippage) than our specified Oracle is returning at the time of the transaction, otherwise, the transaction will revert.

Liquidity

CoW Swap allows orders to be matched against other orders via Coincidence of Wants or against any available external liquidity.
Solvers (SeaSolver) are responsible for finding trading paths and proposing them as part of the auction mechanism of the protocol.
For tokens without available liquidity pools, solvers can propose a path that involves depositing liquidity or collateral and minting of LP tokens.

For our particular 80BAL-20WETH BPT trade, CoW Swap solvers might just deposit directly into Balancer and mint the BPT tokens for us, always accounting for our specified slippage. For more information on SeaSolver, the latest proprietary solver developed by CoW Swap, please read here.

Solvers are private independent entities that participate in the CoW Protocol. They are not required to open source their code, and this is not necessary as eventually the execution parameters are checked onchain to be within the defined slippage tolerance the user has defined.

Here is an example of 80BAL-20WETH trade that incurred no slippage: Ethereum Transaction Hash (Txhash) Details | Etherscan

The Trade

The trade will do the following:

  1. Handle approvals and transfers from the Collector contract onto a newly deployed COWTrader.sol contract.
    a. Withdraw aBAL.
    b. Withdraw aEthBAL.
    c. Transfer all BAL now held in Collector to COWTrader.sol
    d. Transfer specified wETH quantity to COWTrader.sol
  2. The COWTrader contract has one function to execute two trades using Milkman utilizing its balance of wETH and BAL respectively. Both trades take the held token for 80-BAL-20-WETH BPT.
  3. Milkman creates a new instance per trade, which will then hold the funds until the trades are settled via COWSwap. What Milkman does under the hood is approve COWSwap’s Settlement contract so it can transfer funds once there is a match.
  4. Once there is a match, the dynamic price checker will protect Aave’s funds against a bad quote. If it passes our specified parameters, then the trade will go through and the Collector contract will receive 80-BAL-20-WETH.

If everything goes well and the number of tokens to be received matches our parameters (slippage, price against our oracle) then the collector contract will receive the BPT.

The trade can remain open in perpetuity until it is canceled (by Aave) or settled.

Reasons to cancel

If the trade is not settled, the trade can be canceled by a function provided in the AAVECOWTrader contract. In that case, all funds will be returned to the collector contract.

This can be updated to extend the contract where slippage can be increased in order to settle.

After speaking with CoW Swap, they are confident 1.5% slippage should suffice, though we could go with 2% (they will try to match as best they can, so it doesn’t mean 2% slippage will be 2%, that’s just the maximum that can be incurred).

Protection of Funds

Milkman uses msg.sender to execute trades and to cancel, so the call can only be coming from AAVECOWTrader to cancel and it has hardcoded the AAVE Collector as the receiver of funds.

We’ve added reentrancy protection as well, as an owner concept which can be an AAVE DAO Controlled address.

The price checker was reviewed by Llama and Balancer teams, and we discovered a potential vulnerability if the price of the Chainlink oracle returned 0 which was subsequently mitigated by the CoW Swap team.

The price checker code can be found here.

The calculator used by the price checker can be found here.

Trade Example

wETH address: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Amount to trade: 338.10 wETH

Expected BPTs: 40,941

This comes out to ~121 BPT per wETH, which matches the TVL / supply of the BPTs and would come at around $1,750 worth of wETH using CoinGecko’s price.

BAL address: 0xba100000625a3754423978a60c9317c58a424e3D

Expected BPTs: 111,716

BPTs per BAL: 0.37

BPT Info

Here.

1 Like