DeFi Deep Dive
In this blog post we take a closer look at the world of Decentralized Finance. We start with examining its brief history and the iterations that have led to the current state of the art.
It is important to explain some of the verticals that exist in this new financial paradigm to introduce the reader to some of the innovations taking place. We’ll also explain where yield comes from and how it is sustainable. We would also like to caution the reader and make them aware of the risks involved with this still experimental technology.
The main goal of the article is not to explain every single aspect of DeFi. We could write a 500-page book about everything so far and once we would finish a first draft, another book could be written again. The rate of innovation and the iterative learning happens at such a fast pace that it really is a full-time field to spend time and attention on. Good thing we have a passionate team for whom this is second nature.
Bringing DeFi to life
An important building block on which DeFi was able to build its foundations was MakerDAO, a decentralized currency protocol on Ethereum. MakerDAO launched DAI, an overcollateralized stablecoin pegged to the US Dollar. DAI was magically created out of thin air, supply was added through the increase of a number in the smart contract. A very important caveat is that creation of DAI was always dependent on overcollateralization in MakerDAO. The user would have to deposit a higher value in ETH to secure this DAI minting. This meant that every DAI would always be backed by more assets being locked up. The experiment worked and DAI was embraced as an important stablecoin that allowed ETH owners to receive extra liquidity. This idea of over-collateralised borrowing is not new. It exists in traditional finance, for example when you mortgage your house or borrow against your stock portfolio. But now, for the first time, crypto-assets could be used as collateral and the system was built using smart contracts, allowing for all the interesting properties that we so applaud: verifiable execution, immutability, transparency and an open-source nature. MakerDAO was an absolute game-changer for Ethereum and remains an important protocol to this day.
We look for the true birth-date of DeFi somewhere in early 2020 with the launch of Compound Finance, an autonomous interest rate protocol for crypto-assets. Simultaneously, Curve Finance was launched: an exchange liquidity pool on Ethereum designed for extremely efficient stablecoin trading.
They present two important verticals within DeFi. Compound enabled the use case of lending and borrowing. It also relied on over-collateralization to enforce security and stability of loans. Users were able to deposit a certain crypto-asset to Compound and receive some borrowing power in return to borrow another asset. You could borrow stable coins (USDT, USDC and the new DAI) against your ETH or use your stable coins as a deposit to borrow ETH. In the first case, this looks similar to MakerDAO with the important difference that no supply is created when entering a position, rather the stable coins of another depositor are used for the borrower. Lending and borrowing crypto-assets without a middlemen regulated by a smart contract setting dynamic interest rates depending on supply and demand worked. Another experiment succeeded.
At the same time, users were juggling between different stable coins that all presented the same value but had a different on-chain representation. The need arose to swap these tokens against each other. Most centralised exchanges only accepted USDT and USDC, two centralised stable coins with a centralised party issuing and guaranteeing the backing and value. But MakerDAO users had DAI they minted against their ETH. Other DeFi protocols adopted DAI because of its decentralized nature and did not want to deal with USDT and USDC. So while the target value of all these stable coins was the same, depending on what you wanted to do with them, you needed a different one. Curve Finance was a true mathematical breakthrough that allowed users to swap these stable coins against each other with low fees and low slippage. It used the concept of StableSwap liquidity pools. These pools were comprised of all the assets possibly involved in the swap and they allowed for users to deposit these stablecoins and become liquidity providers to the pool. Now when a USDC owner wanted to swap to USDT or DAI, the protocol would add his USDC to the pool by increasing the pool balance for USDC and remove USDT or DAI from the pool by subtracting the pool balance. The swapper successfully received a different asset while the underlying pool distribution changed slightly. Users that contributed liquidity to the pool were rewarded with trading fees and an extra incentive in the form of Curve governance tokens. We refer the decentralised exchanges like Curve as automated market makers requiring no manual intervention or peer to peer order matching.
Interestingly these three projects, MakerDAO , Compound Finance and Curve Finance all had their own governance token. MAKER, COMP and CRV were given as an extra incentive on top of true protocol revenue resulting in a more profitable opportunity for liquidity providers than just the demand for swaps or borrowing. All these tokens gave voting rights in the protocol governance process. This usually meant public discussion of future changes or protocol parameters followed by a voting round to decide which choice would be made. Users and stakeholders were governing these protocols with the development team taking more of a backseat when it came to making decisions. In general, consensus would need to be reached within the community before significant changes could be enacted. This new type of governance resonated well with the crypto crowd in these early days.
With the appearance of these new and shiny governance tokens, people needed a place to trade these. The old process of talking to centralised exchanges and convincing them to list a token, often paying a hefty fee, was not suitable for the type of small and experimental projects that appeared in DeFi. These needed the ability to create liquidity pairs without permission or barriers of entry. Uniswap, the most sophisticated automated market maker that enabled token swaps of non-stable nature, had just launched its V2 and was in prime position to capture this new demand for decentralized token swaps and liquidity provision.
With all these primary building blocks in place, DeFi started to gain more traction and attention. Now that everyone was passively earning a return on their assets, protocols started to pop up that optimised the process of yield farming. Yearn.Finance was the first yield aggregator that enabled single-asset deposits through non-custodial vaults that enacted certain strategies to generate profit. Everbloom actually is based on this model first pioneered by Yearn.
The next years saw hundreds of new protocols pop up and either stay to capture some meaningful market share or disappear into irrelevancy. Since it was so easy to launch a protocol by copying open-source code and changing a few parameters, a lot of malicious actors found their way to DeFi. They would execute a so-called ‘rug-pull’, launching a protocol for it to attract liquidity and to then run off with the funds. Black hat hackers were also targeting smart contracts protocols in an attempt to find loopholes in the code. They could then withdraw funds that were not their own to extract millions of dollars from these protocols, leaving the protocol and its users with empty hands. All of this was one giant experiment with mistakes made and mistakes punished. But over time we’ve seen significant evolutions in programming and thinking. Attack surfaces are better known, the utility of tokens is ever-improving beyond some of the naive assumptions that were made during the first years and DeFi expanded to more exotic use cases such as decentralized options and futures.
We now have DeFi activity on a large amount of layer 1 blockchains. DeFi transactions, together with NFTs, at some point congested the Ethereum blockchain so badly that it accelerated the development and adoption of layer 2 initiatives to scale Ethereum and increase transaction capacity and throughput. Every day, the landscape improves on the day before. Either with a new protocol launch covering some unexplored segment of the market, a new exploit being discovered and patched or a new insight learned.
Slowly, banks and other financial institutions are making their entrance into this future of finance. As these protocols gain more and more maturity, confidence in its secure operation will rise. Everyday a protocol survives and does not get exploited by hackers, strengthens the security assumptions around it. At some point in the future, DeFi infrastructure will be used to power financial applications of every-day users and businesses, perhaps even without their knowledge in the background. This technology is not even three years old but the direction to us is clear: DeFi as we know it has laid the foundations for the financial railway of the future.
Origins of yield
A question we’ve often received in the past is the question of sustainability. Where are all these returns coming from ? Some of the yearly percentages that can be earned sound too good to be true, there must be a catch right ?
Yields in DeFi are of a dual nature. The first option is that you earn interest on a deposit, for example when you deposit assets to Aave, the leading lending/borrowing platform. This interest is paid by the borrower and a true economic activity is taking place. Funds are being lent at a certain interest rate and utility is created for the borrower. As a depositor, you enjoy your assets growing and the interest accrues to your balance.
The second form of yield comes in the form of tokens. Here we can make a further distinction between token incentives and protocol revenue. Smart contract protocols usually have a token governing the protocol, potentially providing additional benefits for those who hold the token while using the application. This token is usually distributed according to a certain emission schedule as a reward to supplying liquidity to the protocol. Liquidity pools on applications such as Uniswap and Curve become more efficient the deeper the liquidity is. Attracting digital assets to populate these pools is done by offering token incentives for depositors. They earn the governance token of their favourite protocol which can then be sold off to more familiar digital assets or kept and used for its benefits. These token incentives are not entirely sustainable but rather serve as a growth tool to attract initial capital and grow to a stage where fees can sustain the protocol without the additional incentive. Paying for liquidity through token inflation without following up on that through additional token utility has led to suboptimal results for the protocols that tried this. Much more successful were protocols that added some form of revenue share to the token utility or rewarded their liquidity providers with a share of fees. We are seeing a shift to these type of models as we write this post.
So yield can come from borrowing demand which is usually high when there is a lot of demand for leverage. When digital assets are in a bull market, speculators enter the space who leverage themselves in order to further expose themselves to appreciating assets. You can deposit ETH to Aave and borrow USDC, swap the USDC to ETH on Uniswap and deposit the resulting ETH to Aave again. You could do this a couple of times to gain increased exposure to ETH, which can be great when prices appreciate. When prices fall, losses are larger of course. This risky endeavour does not concern the lender, he just collects the borrowing fees by these speculators. So as a rule of thumb, demand for leverage and speculation is an important contributor to borrowing rates.
We’ve said most yield comes in the form of token rewards. Higher token prices mean higher rewards as they can be sold off for more dollars. So yield is tied to the performance of the general market, specifically the asset prices of governance tokens that are being earned. As these go up and down, yield fluctuates with it.
As you can see from the above explanation, there is a free market offering opportunities in return for tokens or interests rates. A DeFi liquidity provider takes what the market offers and tries to allocate as optimally as possible. At the current stage of the ecosystem, making assumption about yield percentages that span multiple years is not very accurate. Keeping a constant eye on the risk and reward of all available opportunities is a must if one is to outperform in this environment.
In the previous section, we discussed the possibility to earn returns on capital in DeFi. But of course, no free lunch exists. DeFi participants are exposed to a bunch of technology-related risks that we’ll go over here. We think it is absolutely crucial for DeFi users to be aware of these risks as the lack of clear risk understanding is one of the root causes of investor pain and disappointment.
By far the biggest risk is smart contract risk. Smart contract protocols are complex pieces of software and software is written by humans and humans sometimes make mistakes. Mistakes in the context of financial protocols mean that real funds are at risk and can be extracted by an entity exploiting the coding mistake. Over the past years, we’ve seen tons and tons of smart contract bugs exploited for millions of dollars. Liquidity providers to these protocols usually take a haircut in their deposited funds. The good thing is that every bug exploited also results in a bug fixed. New protocols often have to go through this phase of launching with a certain code base, attracting liquidity providers that are not risk-averse and seeing if their security assumptions hold up in a real live production environment. The best way to reason about the confidence you can place in a protocol is seeing how much value it is securing over which length of time. Smart contract bugs will continue to exist and will continue to lead to losses for participants. Especially new and experimental protocols are vulnerable to this, which is why we look at them with extra scrutiny.
Smart contract risk is one of those risks that we can not completely protect our depositors from. While the Everbloom code base has been audited and has multiple layers of security precautions, the funds we deploy through our strategies sit in third-party smart contract protocols. If an exploit happens there, our vault depositors will be indirectly impacted and might lose funds. If one is to capture DeFi yields, one has to accept this type of risk and deem it acceptable. That being said, some protocols have achieved an incredibly high level of trust. We focus our strategies to use these battle-tested as they provide the best risk/reward ratio for our clients.
Other risks that are possible are custodian risk or counter-party risk. This happens when you use assets such as wBTC, a wrapped version of Bitcoin on the Ethereum blockchain. It should be exchangeable for real Bitcoin through its custodian, but this relies on the custodian being trustworthy and solvent. USDC and USDT also rely on custodians to back the one dollar peg of these assets.
Another risky aspect of engaging with blockchains comes in the form of key management. To make transactions on blockchains, the user needs to sign these with a private key, which needs to be securely stored. Storing the key in a bank vault is not sufficient, as you will need it every time you make a transaction. In-browser wallets such as the widely used Metamask are popular and convenient but are a target for hackers and malware. We recommend usage of a hardware wallet always when securing any meaningful amount of value. This is one area where Everbloom can be used to mitigate these risks. An Everbloom users only needs to worry about depositing and withdrawing to Everbloom vaults. His funds are used by our software to procure yield, without requiring intermediate transactions by the end-user. So he can safely store the hardware wallet in a bank vault or hide it somewhere hard to reach. Everbloom separates ownership of the assets and execution of the strategies for those assets.
In general, DeFi is not for the faint of heart. The traditional financial system also carries risks with bank deposits being secured only up to a certain amount. Banks can collapse and user funds can also be lost. Companies can fail and the stock can go to zero. To engage in financial activity is to be exposed to risks and everyone’s goal is to minimise the impact of negative scenarios and to reason about the risk to reward ratio. Everbloom is one of the more secure and safe ways to engage in DeFi activity, especially for normal users.
We are convinced that DeFi will continue to grow and impact the world. We expect digitalisation of the financial world to happen over the course of the next five to ten years and we think public blockchains and DeFi are the prime candidate to be the supporting infrastructure. Everbloom prepares itself for a world where assets are increasingly tokenised and can be put to productive use in on-chain protocols providing some sort of value. Our expertise leads us to develop and maintain optimal solutions to make these opportunities available for clients and abstracting away all the complexities. Einstein’s eighth wonder of the world, compound interest, is alive and kicking in DeFi and we expect early adopters of this new paradigm to make outsized returns over the long term. And Everbloom will be the primary tool at your disposal.