DeFi Lending: A Primer

Share

Share on facebook
Share on linkedin
Share on twitter
15

Contents

Introduction


Today, lending is one of the most important financial activities in society. It fuels economic growth and facilitates commercial activities. The size of the world’s debt markets as of 2020 was estimated to be more than $281 trillion, more than three times the world’s annual output.  This paper focuses on DeFi lending markets being created through the use of blockchain technology.


Traditional Lending and its Problems


Credit, offered by a lender to a borrower, is one of the most common forms of lending. Credit fundamentally enables a borrower to purchase goods or services while effectively paying later. Once a loan is granted, the borrower starts to accrue interest at the borrowing rate that both parties agree on in advance.

When the loan is due, the borrower is required to repay the loan plus the accrued interests. The lender bears the risk that a borrower may fail to repay a loan on time (i.e., the borrower defaults on the debt). To mitigate such risk, a lender, for example, a bank, typically decides whether to grant a loan to a borrower based on the creditworthiness of this borrower, or mitigates this risk through taking collateral – shares, assets, or other forms of recourse to assets with tangible value. Creditworthiness is a measurement or estimate of the repaying capability of a borrower . It is generally calculated from, for example, the repayment history and earning income, if it is a personal loan. 

The current mainstream lending market, led by banking institutions, is fraught with issues as highlighted below.


Financial Exclusion 


Individuals or entities with thin credit files face financial exclusion from present lending institutions, which have  stringent lending rules and underwriting models to reduce default risk. The International Finance Corporation estimates that 65 million firms have unmet financing needs of $5.2 trillion each year.


Liquidity inefficiency


The supply and demand side of lending is fragmented based on lending period, interest rate, credit rating etc.  in the present markets. This results in sub optimal liquidity.  Further, the oversupply of liquidity in one submarket cannot be promptly transferred to serve the demand of another submarket.


Subprime problems 


The financial exclusion in current systems has given rise to alternative lending entities, including peer-to-peer lending markets. These lending entities typically charge borrowers a premium for securing funding, understanding that the borrowers  are left with no other options to source funds. Because these markets are non-regulated, fraudulent activities and high default rates permeate these less strict lending markets. 

During 2007 financial crises, institutions were left holding trillions of dollars worth of near-worthless investments in subprime mortgages. 


Legacy infrastructure 


The dated information technology infrastructure used by mainstream lending entities is a crucial impediment to efficiency and speed. There is limited data exchange between financial institutions. Credit history and other related information is fragmented and opaque.


Key Concepts in DeFi Lending 


Despite their respective distinctions, most DeFi lending protocols share two features; they have replaced centralised credit assessment to codified collateral evaluation,  and they employ smart contracts to manage the system functionalities. Some key concepts being used by most DeFi protocols are highlighted below. 


Value locked 


Value locked represents the total  users’ deposits in a protocol’s smart contracts. The locked value serves as a collateral or reserve to back the system.


IOU token


Lending protocols issue users IOU (I Owe You) tokens against their collateral  deposits. These IOU tokens  redeem deposits at a later stage, and they are also transferable and usually tradeable in exchanges. 


Collateral


A loan’s collateral represents the entirety or part of the borrower’s deposit against the loan. The  collateral ratio determines how much loan a user is allowed to borrow. 


Liquidation


The liquidation of a loan is triggered automatically by a smart contract. When a loan’s collateral ratio drops below a critical threshold due to interest accrued or market movements, any network participant can trigger the function to liquidate the collateral. 


Interest Rates


Borrowing and lending interest rates are computed and adjusted by smart contracts according to the supply-borrow dynamics, based on protocol-specific interest rate models.


Yield


The total amount of profit or income produced from a business or investment is referred to as yield. In DeFi, it is often measured in terms of Annual Percentage Yield (APY). Yield is relevant to the suppliers of loans, and is largely dependent on borrowing demand.


Key Architecture Elements


Oracles


The market price information of locked and borrowed assets are supplied to smart contracts through external data feeds providers called “price oracles”.  An oracle imports  off-chain data into the blockchain so that it is readable by smart contracts.  There are different kinds of oracles that the lending borrowing protocols use. Such as, chainlink or any custom made DEX oracles such as uniswap’s TWAP. 


Lending pools 


Liquidity pools are  markets of loans for crypto-assets. Users called liquidity providers (LP), act as lenders and supply an asset to the protocol. In return, they receive a claim to the supplied asset represented as minted tokens (IOU). In return for liquidity provision or supplying assets, lenders are given incentive in the form of interest. At any time, lenders can redeem their IOUs by transferring minted IOU tokens to the protocol, which then pays back the original tokens (with accrued interest) to the redeemer, simultaneously burning the minted tokens (IOUs).  This can be seen by a simple representation of providing liquidity on Compound protocol shown below. A user supplies ETH as an asset and gets cETH as an IOU token, which can be redeemed back for the underlying ETH plus interest paid in the units of supplied asset, in this case ETH.



Borrowers can initiate a loan by borrowing tokens deposited in a pool. This can be seen by a simple representation of borrowing on Compound protocol shown below in which a user deposits ETH as collateral and gets cETH as an IOU token representing the collateral plus the borrowed DAI. The collateral can be redeemed by paying back the borrowed amount plus the interest. The interest rates paid and received by borrowers and lenders are determined by the supply and demand of each crypto asset. Interest rates are generated with every block mined.



To ensure that borrowers eventually repay the loan, they are required to provide a collateral (usually in the form of ETH).  An unpaid loan of  person A can be liquidated by person B, who pays (part of) A’s loan in return for a discounted amount of A’s collateral. For this to be possible, the value of the collateral must be greater than that of the loan. To illustrate this, let’s say a borrower has taken out a loan of 100 DAI by depositing $150 worth of ETH as collateral, given that the required collateralization ratio is 150%. If ETH falls in value and if the borrower’s collateral is now worth less than $150, then anyone can pay for the loan by paying 100 DAI for the loan, and in return can get the ETH deposited by the borrower as collateral at a discounted rate set by the protocol.


Tokens


In DeFi, tokens can represent a user’s share in a liquidity pool or serve the purpose of keeping the markets in equilibrium and to ensure that all actors behave honestly. Protocols also distribute governance tokens that allow holders to propose and vote on protocol changes, such as modification of interest rate models. Governance tokens are often given as a reward to incentivise participation, from both borrowing and lending sides, in a protocol. One more usage of governance tokens from the perspective of a protocol is to pay debt in the scenario of a black swan event. 


Key Participants 


Lender  and Borrowers 


They are the main users of the protocol. Lenders supply assets for loans in order to earn yield or interest income from their holdings. Borrowers on the other hand, take loans to get liquidity by providing collateral. They do this because they expect appreciation in the price of their collateral and don’t want to sell it to access liquidity. The loan can be used for consumption, allowing the person to overcome a temporary liquidity squeeze or to acquire additional crypto assets for leverage exposure.


Keepers 


Protocols may require that the on-chain state is continually updated to maintain certain standards such as collateral ratio.  To trigger state updates, certain protocols rely on external entities called Keepers. Keepers are generally financially incentivized to trigger such state updates. For instance, if a protocol requires a user’s collateral to be automatically liquidated under certain conditions, the protocol will incentivize Keepers to call transactions to trigger such liquidation and in return the Keeper will receive the liquidated collateral at a discounted price. The network of Keepers can be based on pure P2P execution or a consortium based on some consensus protocol such as PoA, or PoS.


Governance 


Governance, in DeFi, is the process through which a protocol is able to make changes to the parameters which establish the terms of interaction among participants. Such changes can be performed either algorithmically or by agents.  Presently, a common approach to  governance is for a protocol to be initiated with a foundation. The foundation has control over governance parameters, with a promise  to eventually decentralize its governance process in future. Such decentralization of the governance process is instantiated through the issuance of a governance token, an ERC-20 token which entitles token holders to participate in protocol relative to their share of total supply. Governance can be both full on-chain, off-chain or a hybrid combination of both.

Basic coin voting can empower large whales to vote on the system and virtually hijack it. But this can be mitigated through Quadratic voting. Detailed information on the topic of DeGov can be found here.  


Types of DeFi Lending Approaches 


Protocols in DeFi follow different approaches for lending: Collateralized debt positions, P2P collateralized debt markets, Under collateralized borrowing and Flash loans.


Collateralized Debt Positions


Contrary to the traditional lending markets, the lack of a creditworthiness system and enforcement tools on defaults leads to the necessity of overcollateralization in most lending and borrowing protocols (e.g. Compound, Aave). Over-collateralization means that a borrower is required to provide collateral that is higher in value compared to the debt being taken out. To maintain the over-collateralization status of all the borrowing positions, lending pools need to fetch the prices of cryptocurrencies from price oracles.

Once a borrowing position has insufficient collateral to secure its debts, liquidators are allowed to secure this position through liquidations. Liquidation is the process of a liquidator repaying outstanding debts of a position and, in return, receiving the collateral of the position at a discounted price. At the time of writing, there are two dominant DeFi liquidation mechanisms. One is the fixed spread liquidation, which can be completed in one blockchain transaction, while the other one is based on auctions that require interactions within multiple transactions.

To illustrate the concept, let’s take the example of Compound protocol. Users of  Compound can lend and borrow ETH and other ERC-20 tokens. Users who lend their token receive IOUs in the form of cToken (e.g. cETH, cDAI) of an equivalent value in return. The IOUs  can be used to redeem the supplied asset by the lender and accrue the interest. The deposits of all lenders are pooled together and they start earning interest right when they deposit their funds in the smart contract based pool. However, the interest rates are dependent on the pool’s utilization rate.  When liquidity supply is high loans will be cheap as interest rates will be lower. When loans are in demand, borrowing will become more expensive with interest rates becoming higher.  

Lending pools have the additional advantage that they can maintain relatively high liquidity for the individual lender in case of redemption. The role of the keepers comes into play in the CDPs liquidation process.


P2P collateralized debt markets  


This approach works by matching lenders with borrowers. In other words, for someone to be able to borrow ETH,  there must be another person willing to lend ETH. Loans are collateralized in this approach too in order to mitigate counterparty risk and to protect the lender, the collateral is locked in a smart contract.  Under this approach, the lenders  do not automatically start earning interest, but only once there is a match with a borrower. The advantage of this approach is that the lenders and borrowers can specify terms of loan such as time period and fixed interest rates.

From a technical perspective, a state channel can be opened between both parties with the signature verification done on the base chain. And the channel will be closed only if both parties agree that settlement has been done correctly.


Under-collateralized 


Under-collateralized borrowing also exists in DeFi (e.g. AlphaHomora), however in a limited and restricted manner. A borrower is allowed to borrow assets exceeding the collateral in value, however, the loan remains in control of the lending pool and can only be put in restricted usages (normally through the smart contracts deployed upfront by the lending pool). For example, the lending pool can deposit the borrowed funds into a profit generating platform (e.g. Curve ) on behalf of the borrower.


Flash Loans


An alternative to over-collateralized loans are flash loans. Flash loans take advantage of the atomicity of blockchain transactions. Atomicity means that multiple actions can be executed within a single transaction. Even if one of the actions is not executed, the whole transaction is reverted. Because flash loans are taken out only for the duration of a single transaction, they allow the borrower to take out loans and repay the full borrowed amount plus fees by the end of a single transaction. Aave is one of the first protocols that supports “flash loans”, later on followed by Uniswap.


DeFi Lending Snapshot


We can see from the chart below that the Total Value Locked (TVL) in DeFi lending has meteorically increased over the last year rising from almost $4B to $39B, posting an increase of almost 10X.

In terms of protocols with highest TVL, Aave tops the list with a current share of approx. 37.5% followed by Compound (25%) and Maker (21.8%). InstaDapp is a lending aggregator, hence we do not account for it here as this could result in double counting the TVL. The combined TVL of the 3 highlighted platforms constitutes approx. 85% of the entire DeFi lending TVL which shows their dominance.

Interest Per Year (IPY) is the speed at which interest is accruing in DeFi. IPY is calculated by multiplying the current borrow rate by the total outstanding debt. The composite IPY of the entire lending space is shown below for the last one year. In general, each asset listed on a lending protocol has its own market and terms for loans. Data from each cryptocurrency / asset listed by a protocol is combined to arrive at its composite IPY. 

We can see from below that the overall IPY in the last year has increased starting from around $70M to currently standing at $885M. Around July the IPY fell considerably possibly due to the crypto market downturn, still it was able to stay above $500M. The IPY since the downturn appears to have rebounded back, though one can infer that borrowing demand is correlated to the overall crypto market cycles.

As far as individual protocol’s IPY is concerned, Aave appears to take the lead on this metric too. It generates almost 2.5 times the IPY of Compound and almost 12 times the IPY of Maker.  This implies that Aave is able to attract much more borrowing demand compared to the other two. It would be worth investigating the reasons for this. One possible reason could be that Aave allows borrowers to select a stable or variable interest rate, while Compound and Maker only have variable interest rate options. This introduces uncertainty in interest payment amounts both for borrowers and lenders. Other possible reasons could be better user experience and newly added features in Aave V2 as highlighted in this article.


Discussion


Users seem to be engaging with DeFi lending protocols for a variety of reasons.  One of the  motivations has been to receive participation rewards e.g. valuable, tradable governance tokens resulting in overall higher APY compared to traditional lending.  By guaranteeing IOU tokens’ redeemability, DeFi lending protocols also ensure full transferability and exchangeability of debt holdings.  

Sophisticated investors as well as institutional investors leverage DeFi lending for trading. For example, an investor bullish on ETH may borrow, say, DAI to buy some ETH. In expectation of a price increase of ETH, investor would swap borrowed DAI for ETH on an exchange, hoping that the purchased ETH can be worth more DAI in the future to such an extent that it exceeds the loan amount and leaves the investor some profit. Similar to the borrow spiral discussed above, an investor can repetitively (i) borrow DAI, (ii) swap DAI for ETH, (iii) re-deposit borrowed ETH as collateral, (iv) borrow more DAI. As such, a “leveraging spiral” is formed to maximize the investor’s long exposure to a crypto-asset that is expected to appreciate. 

Flash loans have opened up a huge space for innovation in arbitrage and to unlock collateralized borrow positions on lending protocols, however they can also be used for malicious actions e.g. in case of governance voting

It is important to highlight that competing blockchains and overcollaterization problems may stifle growth of DeFi lending. Several protocols such as Cosmos, Polkadot and Solana are rushing to kickstart DeFi ecosystems on their own platforms, this may pull some developers and liquidity away from Ethereum based DeFi systems. However healthy competition and increased interest just goes on to demonstrate the value in the potential of DeFi. But perhaps the biggest limitation of current DeFi systems is overcollateralization of crypto assets. This causes capital inefficiency. Further, it does not help the unbanked since without a crypto collateral, they cannot access capital. 

Overcollaterization problem can be potentially resolved via a credible reputation/credit system in DeFi. With this approach, based on the credit history and other relevant parameters, loans can be provided to users that meet certain criteria. This would allow for financial inclusion and induce more liquidity in the market to serve user needs.


Conclusion


Decentralized lending has enabled borrowers and lenders to earn yield and maximise their returns on investment on their crypto holdings, without needing to go through any centralised intermediaries. Though the current DeFi lendings’ offer exceptional yields (which are partly there to fuel adoption), it is unlikely these yields will be sustainable. However, billions of dollars worth of value locked,  institutional interest and the increasing network effects make it likely that the DeFi lending platforms will continue to grow and offer acceptable yields to its users.



References:


Xu, J., & Vadgama, N. (2021). Arxiv.org. Retrieved 11 September 2021, from https://arxiv.org/pdf/2104.00970.pdf


Arxiv.org. (2021). Retrieved 11 September 2021, from https://arxiv.org/pdf/2101.08778.pdf


Bloomberg, S. (2021). World’s $281 trillion debt pile set to rise again in 2021, says IIF. Business-standard.com. Retrieved 11 September 2021, from https://www.business-standard.com/article/international/world-s-281-trillion-debt-pile-is-set-to-rise-again-in-2021-iif-says-121021800277_1.html#:~:text=Governments%2C%20companies%20and%20househ


Polkadot [IOU] is now available for trading on Poloniex. Medium. (2021). Retrieved 11 September 2021, from https://medium.com/poloniex/polkadot-iou-is-now-available-for-trading-on-poloniex-c18c0e13d180


What is Quadratic Voting? | Hacker Noon. Hackernoon.com. (2021). Retrieved 11 September 2021, from https://hackernoon.com/what-is-quadratic-voting-253zo3xa5


MakerDAO issues warning after a flash loan is used to pass a governance vote. The Block. (2021). Retrieved 11 September 2021, from https://www.theblockcrypto.com/post/82721/makerdao-issues-warning-after-a-flash-loan-is-used-to-pass-a-governance-vote


Ifc.org. (2021). Retrieved 11 September 2021, from https://www.ifc.org/wps/wcm/connect/03522e90-a13d-4a02-87cd-9ee9a297b311/121264-WP-PUBLIC-MSMEReportFINAL.pdf?MOD=AJPERES&CVID=m5SwAQA


Decrypt. (2021). What is Compound? A 3-minute guide to the DeFi lending project – Decrypt. Decrypt. Retrieved 11 September 2021, from https://decrypt.co/resources/compound-defi-ethereum-explained-guide-how-to


Supplying Assets to the Compound Protocol. Medium. (2021). Retrieved 11 September 2021, from https://medium.com/compound-finance/supplying-assets-to-the-compound-protocol-ec2cf5df5aa


Borrowing Assets from the Compound Protocol. Medium. (2021). Retrieved 11 September 2021, from https://medium.com/compound-finance/borrowing-assets-from-compound-quick-start-guide-f5e69af4b8f4


(2021). Retrieved 11 September 2021, from https://medium.com/aave/aave-v2-the-seamless-finance-d52075d97a7



Also Read: Bitcoin Dawn of Innovation

Share

Share on facebook
Share on linkedin
Share on twitter

Read More Articles

Bitcoin
Digital Identification on blockchain with Microsoft ION
connext