Lending and Borrowing in DeFi

DeFi & Web3

In DeFi debt markets, users can provide assets to earn yield or borrow funds against eligible collateral.

Koin Bülteni · Updated:

On this page
  1. Are supplying assets and providing collateral the same thing?
  2. Why do you borrow less than the value of your assets?
  3. Understanding the health factor with an example
  4. How do transaction steps proceed?
  5. Why do interest rates change?
  6. How is debt closed before withdrawing collateral?
  7. What happens in liquidation?
  8. Sources

Lending in DeFi involves depositing crypto assets into a market managed by smart contracts and making them available to users who wish to borrow. Borrowers typically provide collateral that is worth more than the value of their debt. The person depositing the asset can earn a variable interest rate, while the borrower pays interest and must ensure their collateral remains sufficient. Although the terminology is similar to depositing money into a bank account, the mechanics and risks are different.

Are supplying assets and providing collateral the same thing?

When you deposit USDC into a debt market, this asset can be lent to others under the rules of that market. In return, you may receive a record or a token representing the amount you deposited plus the accumulated yield. Interest can fluctuate based on borrowing demand and available liquidity. The annual rate shown on the screen may not be a promise of a locked-in yield for a year starting today.

Using the deposited asset as collateral, on the other hand, allows you to borrow as well. Some assets can be deposited but are not accepted as collateral. In some interfaces, the use of collateral can be toggled on or off. A position where you only deposit an asset does not carry the same liquidation risk as a position where you use that same asset as collateral to borrow. Nevertheless, even a simple deposit involves smart contract and market liquidity risks.

Why do you borrow less than the value of your assets?

Many DeFi markets use on-chain collateral instead of proof of income. Since the price of collateral can drop, borrowing capacity is not set equal to its full value. For example, let’s assume the maximum initial borrowing ratio for $10,000 worth of ETH collateral is 70 percent. In this case, the borrowing capacity is $7,000. This amount is not a recommendation but the upper limit allowed by the system under those conditions.

The borrowing limit and the liquidation threshold can be different. Assuming the liquidation threshold in the same example is 80 percent, the position becomes problematic when the debt-to-collateral ratio reaches this level. The difference provides a margin against small price movements. However, if the collateral drops rapidly, interest on the debt increases, or the borrowed asset appreciates in value, this margin narrows. The high collateralization ratio seen at the beginning is not permanent.

Understanding the health factor with an example

In systems like Aave, the health factor is an indicator summarizing the distance to liquidation. In a simple single-collateral example, the collateral value is multiplied by the liquidation threshold and divided by the total debt. For $10,000 in collateral, an 80 percent threshold, and a $5,000 loan, the result is 1.6. If the value of the same collateral drops to $7,000, the result becomes 1.12. The growth of the debt due to interest during this time would pull the indicator even lower.

Under these assumptions, the result reaches 1 when the collateral drops to $6,250. This calculation is only valid for the values in the example; different assets, weighted thresholds, and market rules will change the result. It is not correct to accept a single health factor as safe for all positions. A highly volatile collateral asset may behave differently than assets that track closely to the same currency.

How do transaction steps proceed?

First, select the correct network and market in the protocol’s official application. Interest rates, accepted collateral, and limits may differ across different networks of the same protocol. Check the contract address of the token to be deposited, the spending allowance, and the network fee. After the deposit is complete, verify that the position appearing in the app was created with the correct asset and amount.

If you are going to borrow, distinguish specifically which asset you are borrowing. Borrowing 1 ETH is not the same as borrowing a fixed amount in dollars; if ETH rises, the dollar value of the debt also increases. Stablecoin debt can also change due to the token’s deviation from its target price and the accumulation of interest. See the new health factor, interest type, and available exit paths before approving the borrowing. Leave the network’s native fee asset in your wallet for transaction fees.

Why do interest rates change?

When most of the assets in a pool are borrowed, the liquidity available to meet new demand decreases. The interest model may make borrowing more expensive and encourage depositing assets under these conditions. Therefore, a borrowing cost that looks low today could be higher in the following weeks. The annual rate can also be an annualized representation of a condition that formed over a short period.

In a simple calculation, a $2,000 debt with a constant 10 percent simple interest would produce a cost of $200 over a year. In reality, if the rate changes and interest accumulates at different intervals, this calculation will not yield a definitive result. If you invest the asset obtained by borrowing into another yield product, the difference between the two rates will not remain constant either. While the yield decreases, the borrowing interest may increase; the risk of the second product does not eliminate the obligation to repay the initial debt.

How is debt closed before withdrawing collateral?

Repayment is usually made with the asset you borrowed. If there is a USDC debt, simply having ETH in the wallet does not automatically close the debt; you must first acquire the appropriate asset or use a supported repayment path. The full closing amount also includes accumulated interest. Since the debt amount may change between the moment you prepare the transaction and the moment it is confirmed, check the app’s full repayment option and the transaction result.

Withdrawing a portion of the collateral while the debt is ongoing can lower the health factor. The system may block withdrawals that exceed the limit. On the side of the person depositing assets, the withdrawable amount may depend on the momentary available liquidity in the pool. Just because your total balance appears on the screen does not mean it can all be withdrawn at the same time under every condition. Understanding the exit hierarchy of a product before transacting reduces encountering unexpected obstacles in times of need.

What happens in liquidation?

When a position becomes eligible for liquidation, other participants can pay a portion or, depending on the rules, the entirety of the debt to receive a portion of the collateral plus an additional incentive. This is not a voluntary sale made by the user at their desired price. The liquidation amount, bonus, and limits vary by market. The value you see on the price indicator and the oracle price used by the protocol may also differ.

Adding collateral or reducing debt can improve the ratio; however, network congestion, insufficient balance, or sudden price movements can prevent these transactions from being completed in time. Receiving notifications is not automated protection. Contract audits also do not guarantee against price loss, oracle issues, or a stablecoin’s deviation from its value. The decision to lend or borrow should not be made based solely on the highest yield rate.

Sources

Related news

Topic archive ↗

Follow the topic archive for the latest relevant news.