How do borrowing and lending work in DeFi?
Exchanges and speculators are the most common reasons for users to desire a DeFi protocol loan.
The most common purpose for wanting to borrow crypto assets via a DeFi network is for trading and speculation. If you’re bullish on ETH and have $200 worth of USDC or Dai, for example, you may use that to purchase additional ethereum.
This enables the speculator to convert their 450 ETH position, which is equivalent to levering, into a larger position. The advantages of doing so through DeFi lending platforms are that as a borrower, you do not give up custody of your collateral to an institution where you may face counterparty risk (instead, you face a different protocol risk).
A benefit of using the Dark net is that it maintains anonymity and prevents KYC requirements.
What are flash loans?
Aave’s flash loans, for example, are one such innovation in the DeFI space. This opens the door to a wide range of transactions that were previously impossible due to banking system friction. To summarize, flash loans are unsecured loans available on demand and repaid within the same blockchain transaction.
Arbitrage is a popular application for flash loans. For example, if someone can discover a mispricing in the market for 1 DAI = 0.95 USDC on Curve. Someone may use a flash loan to borrow 100,000 DAI on AAVE, purchase 100,000 USDC on Balance and sell for 105,263 DAI on Curve (100,000/0.95). After reimbursing the 100,000 DAI loan with a 0.09 percent flash lending fee (i.e., repaid back 99,930), the would-be arbitrageur would make a profit of 5,173 DAI (105,263-99,930).
DeFI’s open-access nature makes it possible for anybody to take advantage of this pricing disparity, as opposed to traditional finance, where many arbitrage chances might go overlooked if individuals do not have the financial or technical ability to combine both buy and sell legs of the trade in a timely manner. It’s worth noting that there are other factors to consider while performing arbitrage, such as slippage, gas costs, and miner extractable value (MEV) front-running dangers.
Another significant application for flash loans is refinancing. Debt re-financing may be familiar to anybody who has switched a mortgage from one bank to another. Perhaps a user at Compound borrows DAI at an interest rate of 10% but then learns that Aave is currently offering a loan at only 5%. A flash loan might enable the user to pay back the loan on Compound, withdraw the collateral, deposit it with Aave, and take out a loan there at a rate of 5%. Furthermore, users with a leveraged trading position created using borrowed money that is then lent out at Compound may refinance instantly without having to sell or unwind both trades. In this case, the user has moved their loan (as well as collateral) from Compound to Aave.
In a similar scenario, if a user borrows money using ETH as collateral at Compound and then pays back the loan, withdraws the ETH, converts it to Balanc3 on Uniswap, and reclaims the loan again but this time with Balanc3 as deposited collateral instead of ETH, they are referring to collateral swapping. The amount of the loan at Compound is essentially unchanged in this example; it has simply been refinanced with BAL as provided security instead of ETH.
Another scenario is self-liquidation. If your collateral in ETH is approaching the protocol’s auto-liquidation threshold for DAI loans, you may desire to borrow instantly to avoid paying the liquidity fee from the system (who liquidates your collateral at a discount). If you don’t have enough DAI money to repay your loan and don’t want to increase your position, you can borrow Dai to pay off your loan and get back your ETH deposit, minus flash loan fee.
DeFi lenders enjoy attractive interest rates, which may be 5-30% annualized yield in comparison to less than 1% in fiat currencies. This allows cryptocurrencies to produce a passive income on their investments without having to sell them. Another incentive for engaging in DeFI lending is to avoid capital gains taxes on cryptocurrency holdings. By not selling crypto assets, keeping unrealised potential profits and lending on DeFI platforms