What are flash loans in DeFi? By Cointelegraph
![What are flash loans in DeFi?](https://i-invdn-com.investing.com/news/Cryptocurrencies_800x533_L_1535981327.jpg)
A large majority of DeFi hacks are flash loan attacks. Since the technology is new, vulnerabilities are not readily apparent and may require skilled developers to identify.
Flash loan attacks can cost DeFi protocols and their users hundreds of millions. As such, safeguards must be put into place to ensure that a protocol is robust and sanitized.
Decentralized pricing oracles to protect against slippage
Tools for detecting possible attacks
Flash loan arbitrage
Collateral swaps
Debt refinancing
- Borrow assets from Aave liquidity
- Payback debt on Compound
- Withdraw collateral from Compound
- Deposit collateral on Dydx
- Mint debt on Dydx
- Return liquidity to Aave
- The borrower applies for a flash loan on Aave.
- The borrower creates a logic of exchanges to try making a profit, such as sales, DEX purchases, trades, etc.
- The borrower repays the loan, makes a profit, and pays a 0.09% fee.
- If any of the following conditions occur, the transaction is reversed, and the funds are returned to the lender:
Use of smart contracts
Unsecured loan
Instantaneous transactions
Fusion Media or anyone involved with Fusion Media will not accept any liability for loss or damage as a result of reliance on the information including data, quotes, charts and buy/sell signals contained within this website. Please be fully informed regarding the risks and costs associated with trading the financial markets, it is one of the riskiest investment forms possible.