Understanding the Yield Protocol
The borrower, the lender, and the liquidity provider
The Yield Protocol launched a beta version this week. The whole concept is to allow borrowing and lending at fixed rate up with a maturity currently up to 15 months.
Why do we need fixed rates?
Let say you expect ETH to gain 7% during the next year. You are already 100% exposed to ETH but you want leverage. Your best option right now is to use your existing ETH putting it in a Maker Vault and borrow DAI at 2% interest rate and buy ETH with that. You pocket an additional 5% (7% of ETH increase minus 2% interest rate). Neat. Happy with that, you take a one-year vacation from DeFi.
The next day, DAI demand fall. To keep the peg on DAI (that should always be worth $1), MakerDAO increase the interest rate on ETH to 10% (not something unseen). Now you are on a path to lose 3% (7% of ETH increase minus 10% interest rate). Ouch!
Because of that, no one is taking a one-year vacation from DeFi (that’s my theory at least).
Fixed interest rates are taking care of this risk. Instead of having a variable interest rate, Yield offer you a fixed interest rate (currently around 4% for 1 year). You will earn only 3% (7% of ETH increase minus the 4% interest rate). A lower reward, but no rate variation risk.
The same is true for the lender. For instance, you might be attracted to Alpha Homora to earn above 10% for lending ETH (like I did). Then, other people join, and the interest rate goes to a small 3% after a few day. Let’s be honest, it happens for every farming. Being early is not rewarded that much. You can’t count on the yield to stay high. With fixed interest rates, what you see is what you get for a year (or whatever the term is), not for a few days.
Usually the issue with a fixed term loan is that you have to hold it until maturity. If you borrow 10k DAI for 1 year at 5%, there is a lender on the other side that expect to earn 5% on 10k DAI for 1 year.
Luckily, you can have some liquidity on such loans. That even unlock a whole new world of speculation.
Introducing fyDAI, the bond token
For every problem there is a token, Yield Protocol introduce the fyDAI token. There is a kind of fyDAI for each maturity (for the end of each quarter). For this post, we consider fyDAI to be a one-year maturity. A bond is just a fungible version of a loan.
For instance, in the below example, Jon has 100 ETH and want to borrow 1000 DAI for 1 year with a 5% interest rate. Lea want to earn interest on her 1000 DAI and is happy to lend those for a year (T-1). The Yield Protocol keep the ETH as collateral, transfers the 1000 DAIs from Lea to Jon and issue 1050 fyDAI (T+0).
After a year, Jon repays 1050 DAI (what he borrows plus 5 % interest rate) to get his 100 ETH back (T+365). During the same day (T+365′) Lea redeem her 1050 fyDAI to get 1050 DAI.
The cool stuff is that the Yield Protocol allows Jon and Lea to act any time after maturity (but the amount in question might change). Lea can ask for redemption before Jon repays or the opposite. Jon can wait for a few more month as well as the Protocol will use the Maker Protocol at maturity (the interest rate is therefore unknown and can change anytime).
Each fyDAI token will bring 1 DAI at maturity. Those are ERC-20 token and therefore can be bought and sold. That bring liquidity. Lea might be able to find a buyer (Fred) for her 1050 fyDAI for 1025 DAI after 6 months. She will no longer be in the deal. Jon doesn’t know Fred and doesn’t care. Fred doesn’t know Jon and doesn’t care neither. He will get 1050 DAI for his 1050 fyDAI in 6 months.
Now the question is how does Lea (who want to sell fyDAI) find a buyer, Fred?
Introducing the liquidity pool
In DeFi when you want to swap a token, the solution is usually Uniswap. Anyone can create a DAI-fyDAI trading pair and add an equal value of DAI and fyDAI as liquidity. This will enable anyone to buy and sell fyDAI for a price (that will fluctuate thanks to the constant product formula). The liquidity provider will earn 0.3% of each trade.
Yield introduce a dedicated exchange mechanism for DAI and fyDAI that works differently. You can read the whitepaper for the theoretical formulas, I will just present actuals cases.
For instance, Lea can add 10k DAI in the pool. Depending on the internal interest rate of the pool (that can change depending on supply and demand), the pool will mint some fyDAI tokens using DAI as collateral. To ensure there is enough reserve at maturity, the system can mint 1 fyDAI per DAI posted as collateral.
Now when Jon wants to borrow money, the first step is to mint some fyDAI token using ETH as collateral (step 1). With those fyDAI, he can get DAI from the liquidity pool. For instance, we pretend there is an interest rate of 5% so for 1050 fyDAI he can get only 1000 DAI (he will need 1050 DAI to unlock his collateral at maturity).
At maturity, Lea will end up with 10050 DAI, she actually was lending 1000 DAI and had 9000 DAI sitting idle. As you can see, if the system doesn’t have enough DAI as collateral, Lea will be stuck in the pool until maturity (there isn’t enough DAI to convert the fyDAI she has). Most likely, there will be others liquidity providers so Lea can withdraw her 10050 DAI before maturity if she want. That’s a 0.5% gain.
Now what happens if there is a lender? In the example below, Fred is willing to lend to the Yield Protocol. Again, Lea provides liquidity.
Lending money is just buying a fyDAI token from the liquidity pool. Using the 5% interest rate, Fred might buy 1050 fyDAI (worth 1050 DAI at maturity) from the pool for 1000 DAI.
If Lea want to withdraw her liquidity, she will lose 50 DAI in the process. She has minted fyDAI at a rate 1 fyDAI = 1 DAI but has sell it for around 0.95 DAI. She is basically playing the borrower role for Fred. She can leave anytime as there is enough DAI in the system, but she has lost the same amount that she would at maturity. Not a good day for being liquidity provider.
As we have seen, being a liquidity provider is speculating that there will be more borrowers than lender in the future. But if there is more borrowers, you might be stuck until maturity and still earning less than a lender (assuming interest doesn’t change, which is not the case). Obviously, providing a service, you want to earn fees as well on every transaction.
Adding fees to the liquidity provider
The liquidity provider has another tool to generate profit for himself: quoting a different interest rate for the borrower and the lender. If the interest rate is 5%, he will quote 4.75% for a lender and 5.26% for a borrower.
As you can see above, after two transactions, Lea is already earning money. As the fees are relative to the interest rate, I would be more profitable on longer dated maturity (that should have an higher interest rate most of the time). It is too early to tell where in the yield curve trading volume will happen.
Again, it is best for Lea that the cumulative amount of borrowers is equals or superior to the lenders.
The impact of changing interest rates
Trading bonds, you should also understand the duration concept. It expresses the price sensitivity of the bond regarding an interest rate move. In the figure below, we study the impact of the fluctuation of interest rate (annualized) on the price of fyDAI (the bond). With 1000 DAI, assuming a 5% interest rate, we can buy 1050 fyDAI at a one-year maturity. It is only 1005 at a 10% of a year maturity and 1276 for a 10-year maturity (not available currently).
If the interest rate stays constant, the appreciation of those fyDAI will be the same regardless of the maturity (except the short one will stop increasing at maturity).
If interest rate raises, the value of fyDAI decrease (we keep the number of fyDAI we were able to buy at 5%). It’s almost nothing at the shortest maturity, 1% for a one-year maturity and 5% for a 5 year maturity. Those are rounded numbers, but you can keep the idea that the impact is 1% per year. You will not lose money if you keep the bond until maturity.
On the other side, if interest rate decreases, you can be happy to have bought at the best time regarding the interest you will receive AND you can also make a profit by selling.
How to play the game?
Let’s summarize what we have learn to profit from it.
If interest rates are high and you are either satisfied with them or expect them to fall
Lend money, if interest rate stays the same, you will have a good return. If they fall and are no longer enough for you, you can cash the profit.
This is quite a safe move.
You might want to roll over the position to stay always on the longer dated maturity.
If interest rates are low and you expect them to increase
You either want to borrow (using ETH collateral) or provide liquidity as increasing interest rates means buyers’ pressure. More buyers mean profit. You might end up locked using the liquidity pool (but unlikely if there is many others liquidity providers).
You expect trading activity
The profitability of the liquidity provider is currently unknown. There is more risk than a Uniswap pool. Will the volume compensate for that?
In fact, a DAI-fyDAI is a better play, but it is unlikely you can source enough fyDAI and that people will be willing to pay 0.3% fees for a 1 year bond.