Hashtag Web3 Logo

Lending and Borrowing in DeFi

7 min
intermediate

Loans without banks

If you want a loan from a bank, they check your identity, your income, and your credit score. They need to know you are trustworthy because they are giving you money you do not currently have.

Many permissionless lending markets rely on collateral and contract rules rather than an assessment of the borrower's identity or credit history. Other on-chain lending products use identity checks and credit underwriting.

A collateralized position generally needs collateral worth more than the borrowed amount. The permitted loan-to-value ratio depends on the asset, market, and configured risk parameters.

Borrower Has: 1 ETH ($2000) Needs: $1000 USDC Lending Protocol (Aave / Compound) Locked Collateral: 1 ETH 1. Deposits ETH 2. Borrows USDC Lenders Deposit USDC Earn 5% APY Supply Liquidity

Why overcollateralize?

Why borrow $1,000 if you already have $1,500?

  1. Keep your exposure: You believe ETH will go up in value. If you sell your ETH for cash, you miss out on the gains. By borrowing against it, you get cash while keeping the ETH.
  2. Avoid taxes: In many jurisdictions, selling crypto is a taxable event. Borrowing against it is not.
  3. Leveraged exposure: Borrowing to buy more of an asset increases exposure to its price and adds borrowing costs and liquidation risk.

Liquidation

This system has a strict rule: your debt can never exceed the value of your collateral. If it does, the protocol goes bankrupt.

To prevent this, protocols use a Liquidation Threshold. If you deposit $2,000 of ETH and borrow $1,500 USDC, you are safe. But if the market crashes and your ETH is suddenly only worth $1,600, your loan is too risky.

The smart contract will automatically trigger a liquidation. It allows a third party (a liquidation bot) to buy your ETH at a discount to immediately pay off your USDC debt. You lose your ETH, but the protocol stays solvent.

Algorithmic Interest Rates

In DeFi, no central bank sets interest rates. They are determined by use (supply and demand).

If a pool has 10 million USDC and borrowers have taken 1 million USDC, the use is 10%. There is plenty of supply, so interest rates are low (e.g., 2% APY).

If borrowers take 9 million USDC, use is 90%. The pool is almost empty. The algorithm automatically spikes the interest rate (e.g., to 20% APY). This does two things:

  1. High rates force borrowers to pay back their loans.
  2. High rates entice new lenders to deposit USDC to earn the yield.

The rate model encourages changes in supply and borrowing, but does not guarantee liquidity or repayment. Governance and risk administrators may also change market parameters.

Key takeaways

  • DeFi lending relies on overcollateralization instead of credit checks.
  • If your collateral value drops too low, it is automatically liquidated.
  • Interest rates are driven by an algorithm based on pool use.
  • Lenders earn interest, and borrowers get liquidity without selling their assets.

Quiz: Lending and Borrowing in DeFi

1 / 5

How does DeFi solve the problem of not having credit scores?