Yield Aggregators in DeFi

Simon Cousaert
UCL CBT
Published in
9 min readJun 1, 2021

This article summarizes the paper ‘SoK: Yield Aggregators in DeFi’, a joint work between UCL CBT and Imperial College London.

Yield farming has been an immensely popular activity for cryptocurrency holders since the explosion of Decentralized Finance (DeFi) in the summer of 2020. Asset managing protocols had well over 3 billion USD locked in May 2021 and hold 2 billion USD at the moment, at the time of writing.

While there is a plague of (scam) projects promising huge yields in a short time, yield aggregators such as Idle Finance, Pickle Finance, Harvest Finance and Yearn Finance are trying to build a sustainable source of yield for the DeFi community. This made me wonder:

  • Where does that yield come from?
  • What are the money legos that yield aggregators make use of?
  • What is the general mechanism behind all these aggregators (if there is one)?
  • What are the benefits and risks of putting your money in a yield aggregator?

My paper on Yield Aggregators in DeFi — a joint work with Jiahua Xu (UCL Centre for Blockchain Technologies), and Toshiko Matsui (Imperial College London), aims to answer all those questions. We present a generalized framework of yield aggregators. Let’s take a deep-dive into the most “degen” part of DeFi, yield farming.

To read more technical and in-depth explanations of the framework, please read the paper. Any feedback is welcome and much appreciated.

A short introduction

As you may have read in my previous posts about AMMs, DeFi has had an explosive growth since the summer of 2020. One of the applications in DeFi that got serious attention is yield farming. The concept was first introduced by Synthetix, but gained traction since the launch and distribution of COMP, the governance token of Compound. Since then, Compound participants get rewarded with newly-minted COMP tokens through BOTH lending and borrowing activities, a process later called “liquidity mining”. This process was and still is being copied until this day, which encouraged developers to find a way to combine rewards from different protocols. The premise of yield farming was born. Against this backdrop, aggregating protocols built on top of DeFi primitives are trying to offer a one-stop-shop solution for people wanting to collect the yield.

Where does yield come from?

There ain’t no such thing as a free lunch, so where does the yield that aggregators are collecting come from? There seem to be three main sources.

Demand for borrowing

As demand for loans in crypto-assets grows, the borrowing interest rate increases, leading to higher yields for lenders. Particularly in a bullish market, speculators are willing to borrow funds despite a high interest rate, because for example, they expect an appreciation in the assets of their leveraged long position. APYs for stablecoins in Aave and Compound reached 10% in April 2021, when market sentiment was extremely bullish.

Liquidity mining programs

Early participants often receive governance tokens representing protocol ownership. This incentivizes people to put funds into the protocol, as the rewarded tokens often have a governance functionality attached to them. That function is frequently deemed valuable, as the token holders would have a say in the future strategic direction of the project. Essentially, early users are getting rewarded for helping the project grow and for bearing the early-stage entailed by possibly vulnerable smart contracts. Examples are Sushiswap and Yearn Finance.

Revenue sharing

Some tokens entitle users to part of the revenue that is going through the protocol. One example is LP (liquidity provider) tokens in AMMs (about which you can read more here). The more people trade, the higher the reward is for liquidity providers. Another kind of revenue-sharing token is xSUSHI. Stakers of the SUSHI token, get xSUSHI in return, which entitles them to receive 0.05% of the Sushiswap protocol trading revenue. Vesper Finance’s governance token, VSP, can be staked into the vVSP pool which captures about 95% of the fees generated by Vesper.

The mechanism behind the strategies

Now we know where yield comes from, how does a user collect that yield through a yield aggregator? Let's take an imaginary yield aggregator, called “SimpleYield” as an example to explain the chart below.

YIeld aggregator mechanism

In Phase 0, funds are pooled in a smart contract. Typically, a pool contains only one asset, although newer protocols allow for multi-asset pools. Users deposit an asset into a pool and in return, they receive tokens that represent their share of the pool's value. Example: deposit # ETH into the SimpleYiel dETH pool and receive # syETH tokens back, representing x% of the pool’s value.

In Phase 1, the pooled funds are used as collateral to borrow another asset through a lending platform such as Compound, Aave or Maker. This phase is not always necessary and can be skipped. The primary use of this step is to allow the execution of a yield farming strategy with another asset than the originally pooled asset. Example: the ETH collected in the SimpleYield ETH pool can be put into Maker, to borrow the stablecoin DAI.

Phase 2 contains the yield-generating strategy and can range widely in complexity. The figure below shows that the input of this phase is either non-yield generating assets (red coins) or yield-bearing assets (green coins). As time passes, green coins generate yield and multiply. Example: the SimpleYield ETH Pool used ETH to borrow DAI and now puts that DAI to work into Compound, where the aggregator earns yield with cDAI tokens and COMP tokens as part of the Compound liquidity mining program.

Execution process of a single strategy. SC = smart contract

In the final phase, Phase 3, the yield generated in Phase 2 is sold in the open market for the original pool asset and flows back to Phase 0 where it can be re-deployed via Phase 1 and 2. The pool value has now increased without minting new shares, increasing the value of existing shares. Example: The COMP tokens generated in Phase 2 are sold for ETH on Uniswap, and flow back to Phase 0. Your originally minted # syETH tokens are now worth more because the pool value has just increased without minting other syETH tokens.

Example strategies

Now that we have seen how a yield aggregator typically works, the gist of the protocol is mostly in Phase 2, where yield is actually generated. Let’s look at some examples of yield farming strategies. Note that the examples described here are relatively simple and that these strategies can be a lot more complex in reality.

The evolution of the pool value has been simulated under controlled market circumstances. The results of that simulation can be found in the paper.

Simple Lending

The example used in the previous section is a simple lending strategy. Funds are deposited into a protocol for loanable funds (PLF) to gain interest and governance tokens as a part of a liquidity mining program.

Spiral lending

This strategy aims to maximize the amount of governance tokens earned through the liquidity mining program, by spiral lending/borrowing. The aggregator can deposit DAI into a PLF, use that deposit to borrow more DAI and supply that DAI again into the PLF. This cycle can be repeated multiple times, but depending on the supply and interest rate, simulation shows that this strategy becomes very risky when spiraling too many times.

Liquidity mining with AMM LP tokens

Automated market making (AMM) LP tokens are yield-bearing, as trading fees are retained in the AMM pool. When that AMM also has a liquidity mining program running, users are rewarded with governance tokens besides the yield they get from trading fees. This strategy is also considered relatively risky, as impermanent loss potentially eats a lot of the returns when prices of the underlying assets start to change.

The battle-tested yield aggregators: a comparison

Major existing and early stage yield aggregators — data from 1 May

Idle Finance

One of the first yield aggregating protocols is Idle Finance, launched in August 2019. Idle currently only makes use of the simple lending strategy and allocates pool funds over PLFs (Compound, Aave, Fulcrum, dYdX and Maker). There is a “Best-Yield” strategy and a “Risk-Adjusted” strategy. That first one seeks the best interest rate across the mentioned platforms, while the risk-adjusted strategy takes into account a risk factor, to optimize a risk-return score.

Pickle Finance

Launched in September 2020, Pickle offers yield through two products: Pickle Jars (pJars) and Pickle Farms. Jars are yield farming robots, earning returns on users’ funds, while farms are liquidity mining pools where users can earn PICKLE governance tokens by staking different kinds of assets. pJars use the “Liquidity mining with AMM LP tokens”-strategy. Farmers deposit Curve LP tokens or Uniswap/Sushiswap LP tokens which are used to generate governance tokens through liquidity mining programs.

Harvest Finance

Harvest launched in August 2020 and offers yield with compounding interest through their own FARM liquidity mining program. The protocol has two main kinds of strategies: Single asset strategies (includes “simple lending”-strategy) and LP token strategies (includes “Liquidity mining with AMM LP tokens”-strategy). 30% of the generated yield is used to buy FARM back in the open market, and flows to FARM stakers instead of the original pool.

Yearn Finance

The biggest yield aggregator, Yearn, was launched in July 2020. Yearn offers a multitude of products, of which Earn and Vaults are considered for this article. Earn pools employ the “simple lending”-strategy and deposit assets into the PLF with the highest interest rate. Vaults allow for more complex strategies.

Total value locked, data from https://defillama.com/home

Benefits and risks of yield aggregators

Benefits

  • Yield farmers don’t have to actively compose their own strategy, but they can make use of the workflows invented by other users, turning their investment strategy from active to a more passive approach.
  • Because cross-protocol transactions are happening through a smart contract, capital shifts are done automatically, removing the need for the user to transfer funds manually between protocols.
  • Funds are pooled in a strategy contract so the gas costs are socialized, resulting in fewer and thus lower interaction costs.

Risks

  • Lending and borrowing risks are ever-present when yield farming strategies put assets as collateral to borrow other assets and even when they only supply assets into a PLF. In the case of high utilization (high borrowed funds/supplied funds ratio), when many lenders withdraw at the same time, a certain amount of them might have to wait until some of the borrowers have paid back their outstanding loans. This is called “liquidity risk”. When borrowing funds, there is a “liquidation risk” when the value of the collateral falls below a pre-determined liquidation threshold.
  • Because yield farming strategies are often built upon a series of DeFi money legos, there is a composability risk. Both technical and economic weaknesses give rise to attractive exploit opportunities for malicious hackers.
  • The returns of a strategy are often determined by a lot of factors, and for some strategies, this creates an unstable APY. Fluctuating APYs, caused by divergence loss, low trading activities in AMMs or price changes in governance tokens can be considered unattractive to a lot of potential investors.

A Final Word

In the past year, a multitude of yield aggregator protocols have sprung up and while the general framework behind them is similar, they all have their own flavor. Idle Finance started in 2019 with a first version of their product, which deposited funds into the PLF that gives the best rate at a given time. Inspired by the liquidity mining program of Compound, Yearn Finance extended this model in July 2020 by inventing more complex strategies, called Vaults, next to their Earn product. As more forms of liquidity mining programs emerged, Harvest Finance and Pickle finance specialized in yield farming with LP tokens later that summer.

Yield aggregators have been and still are an attractive way to collect yield in DeFi. But how sustainable is this yield? Yield comes from three main sources as we have seen. While research on the sustainability of yield deserves a separate paper on its own, it could be argued that yield coming from native token distribution is relatively short-lived. Once emission schedules are finished, this kind of yield is depleted. Even though new protocols can blossom with their newly started emission schedules, it seems unlikely that this source of yield is sustainable. The demand for borrowing could be more sustainable in that regard, but it is highly dependent on market sentiment, especially for non-stablecoins. Yield from revenue sharing tokens seems to be the most durable, especially if DeFi is able to hold on to recent growth rates.

UCL Centre for Blockchain Technologies
Official Website: http://blockchain.cs.ucl.ac.uk/
Paper on ArXiv: https://arxiv.org/abs/2105.13891
Github: https://github.com/SimonCousaert/yieldAggregators
Twitter: Simon DeFi , UCL CBT

--

--