Chapter 6: Decentralized Lending

CoinGecko
2022-07-04 20:03:14
Collection

Funding loans are one of the most common services provided by the financial industry, facilitated by the concepts of credit and collateral.

It can be said that the invention of commercial-scale lending brought about the Renaissance, allowing less affluent individuals to obtain startup capital through borrowing, thus triggering a surge in economic activity. As a result, the economy began to grow at an unprecedented rate^9^.

Entrepreneurs can borrow the initial capital needed to establish a business by mortgaging their enterprises, while families can take out loans against their homes to buy houses, as cash purchases would otherwise be too costly. On the other hand, accumulated wealth can be lent to borrowers as capital. This system reduces the risk of borrowers absconding with the funds.

However, this lending system requires some form of trust and intermediaries. The role of intermediaries is taken on by banks, while trust is maintained by a complex credit system, where borrowers must demonstrate their ability to repay loans to qualify for borrowing, which is one of the series of qualifications and requirements set by banks.

This has led to various criticisms and flaws in the current lending system, such as restrictive fundraising standards, geographical or legal limitations on accessing banking services, high barriers to loan approval, and the fact that the wealthy enjoy the benefits of low-risk, high-return lending.

In the case of DeFi, such barriers no longer exist as banks are no longer needed. As long as there is sufficient collateral, anyone can access funds to do what they want. Lending is no longer the exclusive domain of the wealthy; everyone can contribute to decentralized liquidity pools, and borrowers can withdraw funds from them and repay loans at an algorithmically determined interest rate. Unlike applying for loans through banks with strict Know Your Customer (KYC) and Anti-Money Laundering (AML) policies, users only need to provide collateral to borrow in DeFi.

We will explore how Compound Finance (a DeFi lending protocol) achieves a bankless lending mechanism.

Compound

image

Compound Finance is an open-source money market protocol built on Ethereum, where anyone can frictionlessly provide or borrow cryptocurrencies. As of February 2020, seven different tokens are available for providing or using as collateral on the Compound platform, including Basic Attention Token (BAT), Dai (DAI), Ethereum (ETH), Augur (REP), USD Coin (USDC), Wrapped Bitcoin (WBTC), and 0x (ZRX).

Compound operates as a liquidity pool built on the Ethereum blockchain. Liquidity providers supply assets to the pool and earn interest, while borrowers take loans from the pool and pay interest on their debts. Essentially, Compound bridges the gap between lenders who wish to earn interest on idle funds and borrowers who wish to take loans for production or investment purposes.

In Compound, interest rates are expressed as Annual Percentage Yield (APY), and this value varies between different assets. Compound derives the interest rates for different assets using an algorithm that measures supply and demand.

Essentially, Compound reduces lending friction by allowing lenders/borrowers to interact directly with the protocol to obtain interest rates without negotiating loan terms (such as maturity date, interest rate, counterparty, collateral), thus creating a more efficient money market.

How much interest will you earn or pay?

Different assets have different annual interest rates (APY) because this value is set algorithmically based on asset supply and demand. Generally, the higher the borrowing demand, the higher the annual interest rate (APY), and vice versa.

image

Using the DAI stablecoin as an example, lenders will earn 7.58% interest over the year (as of February 2020), while borrowers will need to pay 8.00% interest after one year.

Do I need to register an account to start using Compound?

No, you do not need to register an account, which is the charm of decentralized finance. Unlike traditional financial applications where users must go through lengthy processes to start using them, Compound users do not need to register anything.

Anyone with a supported cryptocurrency wallet (such as Argent and Metamask) can immediately start using Compound.

Start earning interest on Compound

To earn interest, you must provide assets to the protocol. As of February 2020, Compound accepts seven tokens.

Once you deposit your assets into Compound, you will immediately start earning interest on the deposited assets! Interest will accumulate on your investment and be calculated after each Ethereum block (approximately every 13 seconds).

When you deposit, you will receive the corresponding amount of cTokens. If you deposit DAI, you will receive cDAI; if you provide ETH, you will receive cETH, and so on. Interest is not immediately allocated to you but accumulates on the cTokens you currently hold, which can be redeemed for the underlying assets and interest they represent.

What are cTokens?

cTokens represent your balance in the protocol and will accrue interest over time. In Compound, the earned interest is not immediately distributed but accumulates on the cTokens.

Let’s illustrate with an example. Suppose you supplied 1,000 DAI to the liquidity pool on January 1, 2019. Meanwhile, the APY remained at 10.00% for the entire year of 2019.

On January 1, 2019, after depositing 1,000 DAI, you received 1,000 cDAI. In this case, the exchange rate between DAI and cDAI is 1:1.

On January 1, 2020, one year later, your 1,000 cDAI will appreciate by 10%. The new exchange rate between DAI and cDAI will be 1:1.1. Your 1,000 cDAI can now be exchanged for 1,100 DAI.

image

To calculate accrued interest, cTokens can be redeemed for their underlying assets, which increase over time. cTokens are also ERC-20 tokens, meaning if someone wants to take over as a liquidity provider, you can easily transfer the "ownership" of the assets you provided.

Start borrowing on Compound

Before borrowing, you must provide assets to the system as collateral for your loan. Each asset has a different collateralization ratio. The more assets you provide, the stronger your borrowing capacity.

The borrowed assets will be sent directly to your Ethereum wallet, and from then on, you can use them as you wish! Please note that borrowing incurs a small fee of 0.025% to prevent abuse and misuse of the Compound protocol.

Price fluctuations of collateral assets

If you are considering putting up collateral to obtain a loan, you might ask—what happens if the value of the collateral changes? Let’s take a look:

  1. Collateral appreciates: If the asset you collateralized appreciates, your collateralization ratio will increase, and everything is fine—nothing will happen, and if you wish, you can withdraw more loans.
  2. Collateral depreciates: On the other hand, if the collateral depreciates, causing your collateralization ratio to fall below the required ratio, your collateral will be partially liquidated, and a 5% liquidation fee will be charged. The process of liquidating collateral to reach the minimum collateralization ratio is called liquidation.

Liquidation

Liquidation occurs when the value provided by the collateral falls below the loan amount. This is to ensure that fund withdrawals and loans always have excess liquidity while protecting borrowers from default risk. The current liquidation fee is 5%.

That’s Compound. If you want to start or experiment, we provide a step-by-step guide on how to: (i) inject funds into the liquidity pool and (ii) borrow from the liquidity pool. Otherwise, please proceed to the next section to read more about the next DeFi application!

Compound.Finance: Step-by-step Guide

Providing funds to the liquidity pool:

image

Step 1

  • Go to https://app.compound.finance
  • Connect your wallet. Follow the instructions from your wallet.
  • Deposit cryptocurrency into the liquidity pool (any of the 7 tokens).

image

Step 2

  • Receive cTokens.
  • When you complete a term deposit agreement, the bank will issue a term deposit receipt as proof. Similarly, after providing assets, you will receive cTokens representing the type and amount of your deposited assets.
  • cTokens are used for redeeming deposits and recording the interest you earn. Likewise, you must use them to redeem or withdraw your assets.

image

Step 3

  • Earn interest
  • When you deposit assets, you start earning interest. By holding cTokens, interest will accumulate in your account.

Step 4

  • Redeem cTokens
  • Over time, interest will gradually accumulate. Each cToken can be redeemed for the appreciated underlying asset. You can redeem cTokens at any time, and you will immediately receive the assets returned to your wallet.

Borrowing from the liquidity pool

Please note:

  • Before you start borrowing, you must provide valuable assets to Compound as collateral.
  • Each token has its own collateralization ratio. The collateralization ratio is the proportion of the asset value you must collateralize to borrow.
  • Another note is that you cannot provide and borrow the same token simultaneously.

image

Step 1

  • Go to Compound's homepage https://app.compound.finance/
  • Select the token you wish to borrow from the right sidebar. I will choose USDC as an example.

image

Step 2

  • A pop-up for USDC will appear.
  • New users need to permit it.
  • Each token must be permitted individually.

image

Step 3

  • Enter the amount you wish to borrow. In this example, I want to borrow 2 USDC.
  • Confirm the transaction using your wallet.

image

Step 4

  • Done!
  • You can see how much you have provided and borrowed on the homepage.

Recommended Reading

  1. The DeFi Series -- An overview of the ecosystem and major protocols (Alethio) https://medium.com/alethio/the-defi-series-an-overview-of-the-ecosystem-and-major-protocols-da27d7b11191

  2. Compound FAQ (Robert Leshner) https://medium.com/compound-finance/faq-1a2636713b69

  3. DeFi Series #1 - Decentralized Cryptoasset Lending & Borrowing (Binance Research) https://research.binance.com/analysis/decentralized-finance-lending-borrowing

  4. Zero to DeFi -- A beginner's guide to earning passive income via Compound Finance (Defi Pulse) https://defipulse.com/blog/zero-to-defi-cdai/

  5. I took out a loan with cryptocurrency and didn't sign a thing (Stan Schroeder) https://mashable.com/article/defi-guide-ethereum-decentralized-finance.amp

  6. Earn passive income with Compound. (DefiZap) https://defitutorials.substack.com/p/earn-passive-income-with-compound

ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
banner
ChainCatcher Building the Web3 world with innovators