Aave & Balancer Partner to Build The First Asset Manager for Balancer V2

Fernando Martinelli
Balancer Protocol
Published in
6 min readFeb 23, 2021

--

In light of the recent announcement of Balancer V2, we’re proud to announce a partnership with Aave to build the first Balancer V2 Asset Manager — allowing idle assets in V2 pools to earn yield on Aave.

Balancer + Aave, a match made in heaven!

On Balancer V2, all tokens are held in a single Protocol Vault. Any pool can however use their deposited tokens in the vault through an Asset Manager, putting capital to work when it is not being used as swap liquidity. This is explained in detail below.

As the de facto DeFi lending protocol, Aave brings a diverse portfolio of supported tokens, including BAL! This partnership will bring more capital efficiency to Balancer, allowing liquidity providers to earn additional yield on top of swap fees and BAL from liquidity mining.

“Part of what makes DeFi so exciting is its composability, and with Balancer this has resulted in a partnership that optimises the experience for liquidity providers through the Aave-Balancer Asset Manager and opens up new possibilities for Aave stakers with the AAVE/ETH Safety Incentive pool. We look forward to exploring more synergies with Balancer in the future.” — Stani Kulechov, Founder and CEO of Aave

How it All Began: Pooling Synthetic Lending Tokens

The Curve team has been a pioneer in increasing capital efficiency in AMMs by leveraging lending markets to generate yield.

Two of the first Curve pools — the Compound pool and the Y pool — generate substantial trading volume still today. Taking a closer look for example at the Y pool we can note a few interesting points:

  • All added liquidity is directly routed to Yearn and wrapped to generate extra yield.
  • The pool holds yTokens (yDAI, yUSDC, yUSDT, yTUSD) that represent yield bearing versions of the underlying tokens added (DAI, USDC, USDT, TUSD).
  • All this wrap/unwrap complexity is abstracted away from the end-user, so that they can easily swap say DAI for USDC using the liquidity in this pool.
  • When such a trade happens, DAI gets wrapped into yDAI, then swapped for yUSDC which in turn gets unwrapped to USDC.

As gas prices continue to soar, gas efficiency is of paramount importance for AMMs. Unless the amounts are very large, costly swap transactions become a deal-breaker. Using the Y Curve pool mentioned above, a simple swap from TUSD to USDC costs about 800k gas, over $240 at the time this specific transaction was executed. It’s very inefficient to wrap and unwrap tokens for every swap transaction.

Balancer V2 offers a new way to have cheap trades (that don’t require wrapping and unwrapping) while allowing most of the underlying pool assets to generate yield on other protocols.

Enter Balancer V2 Asset Managers

It’s a known fact that most of the liquidity sitting in AMMs is often not used. Large trades cause a lot of slippage, so traders avoid them. This means that as long as prices don’t shift too much, a pool would be able to facilitate exactly the same trades with much lower liquidity actually being available.

The Aave-Balancer Asset Manager takes idle tokens from a Balancer V2 pool and routes them to Aave to generate additional yield

We will refer to the amount of tokens routed out of Balancer’s vault to Aave as the pool ‘invested amount’. A small buffer of each token is always left in the vault to avoid failed trades. This buffer is the ‘cash amount’, i.e. the amount of tokens readily available in the vault to be traded.

As a natural consequence of AMMs, if prices start to shift in one direction, the token that’s getting more expensive will become more scarce in the pool (i.e. its balance will decrease as users buy it). This means that the cash amount of that token will run out until it hits zero. At that point any swap attempts to buy this token would fail.

This is when the Aave-Balancer Asset Manager comes into play by replenishing the cash amount of that token by redeeming a portion of the invested tokens on Aave and sending them back to the Balancer vault to prevent swaps from failing. The Asset Manager also increases the invested amount of the token that’s becoming more abundant in the pool by sending some more of it to Aave to maximize its yield. In the animation below the Asset Manager replenishes the pool with DAI and sends more WETH to Aave to maximize the yield generation.

The Aave-Balancer Asset Manager replenishes the cash amount of DAI in Balancer's vault to prevent trades from failing and invests more WETH in Aave to maximize yield

Obviously the replenishment has to be done before the cash amount of a token hits zero as we don’t want to prevent trades from happening. Thankfully, Balancer’s new SOR takes into account the cash amount so that trades would not fail but instead use up only the cash available. Still, the keepers that trigger replenishments of cash must be incentivized to perform this function, so that their transaction costs are offset and they generate some profit as well. These incentives are ultimately paid by the LPs of the pool.

Both the Aave and Balancer teams are actively working to identify how often replenishments should happen and what the on-chain processes to trigger these actions look like. This includes variables around the volatility of the token pair, the cost of wrapping and unwrapping tokens, Ethereum gas costs and Aave lending rates. Alex Evans, our friend at Placeholder and a reference in research in AMMs, is also devoting time to explore this optimization problem along with other colleagues.

However, it is clear that needing to replenish the pool for large swaps occurs sporadically, meaning this method is far more gas efficient than the current solutions available today. The existing flow of wrapping and unwrapping tokens for every swap would be equivalent to not having any buffer and having to replenish the pool with the exact amount necessary for a trade, for every single trade.

This partnership will optimize on the above flow to find the most gas efficient way for LPs to earn additional yield without added costs to swaps. While Balancer V2 will start with Aave-Balancer Asset Manager, other projects are welcome to integrate their own Asset Managers and even customized AMM pools into the V2 ecosystem.

Aave + Balancer

Besides this partnership to build the first Balancer V2 Asset Manager, Aave and Balancer have been working closely together on a number of initiatives.

Last month, BAL was added to Aave V2 — the first major lending protocol to support Balancer’s native governance token. H/t to our friends at 🔥_🔥 for their support here!

Aave recently introduced the long-in-the-making support for the 80/20 AAVE/ETH Safety Incentive pool, allowing LPs to help secure the protocol while earning rewards in both AAVE and BAL. This carefully audited integration showcases the power of using Balancer to achieve what Joel Monegro from Placeholder coined as Proof of Liquidity. Any project can use 80/20 Balancer pools to enable their users to stake the project token while at the same time providing much needed liquidity.

As described by Joel, the flexible nature of Balancer makes for a great liquidity solution for Aave, with smart pools playing a key role in the way assets are able to be utilized to secure the protocol and protect against shortfall events.

This partnership sets the stage for further integrations between the two protocols, including research around new money markets and ways for tokens on Balancer V2 to be used as collateral in Aave.

What’s Next?

The research and coding for the Aave-Balancer Asset Manager has already begun, and we expect it to be ready for initial tests not too long after the launch of Balancer V2 in March.

If you are part of the Aave or Balancer communities and are interested in participating in this project or being a V2 launch partner with early access to the Balancer V2 codebase, please reach out on our social media channels below.

V2 is just around the corner and we couldn’t be more excited to show the world what we’ve been working on for so long.

Follow Aave

Twitter | Discord | Website

Follow Balancer

Twitter | Discord | Website | Dashboard

--

--