How Flash Loans Attacks Work: Price Manipulation and Arbitrage


In this series of articles, we will see some of the most widespread attacks in DeFi. In this case, we are not talking about hacking smart contracts but about exploiting price variations. Let's start with Flash Loan Attacks. Flash Loan Attacks involve borrowing an amount of crypto (e.g. ETH) that must be returned in the same transaction. The attack is based on price manipulation (oracles) and arbitrage strategies. The attacker borrows a large amount of token A from a lending protocol such as Aave (without using collateral) and then uses it to buy a token B on Uniswap (increasing its price on that dex, since prices are given by the balancing of the pools). Then the purchased token is dumped on a dex with an unmanipulated price. The loan is returned.

For example:
The attacker wants to take advantage of the volatility and low liquidity of a memecoin (Elon Doge) to manipulate the price on a DEX and earn through arbitrage between different markets.

Suppose the memecoin ElonDoge is listed on two DEX:
1) Uniswap
2) Sushiswap
The attacker uses a flash loan to borrow a large amount of ETH on Aave to manipulate the price of ElonDoge on Uniswap. After manipulating the price, the attacker arbitrages by selling ElonDoge at a higher price on Sushiswap, earning a profit.

Imagine borrowing 10,000 ETH via a flash loan from Aave. The attacker must return this loan within the same transaction because he does not use collateral. The attacker uses 7,000 ETH to buy a large amount of ElonDoge on Uniswap (ETH/ELON pool). This large purchase quickly drives up the price of ElonDoge on Uniswap, due to the low liquidity of the memecoin. The price is artificially inflated because a large purchase of ElonDoge reduces the ElonDoge supply and increases its price.

The attacker then sells ElonDoge for ETH on Sushiswap at a higher price than the price he previously paid on Uniswap (before the manipulation). ElonDoge is sold at a price that is not yet affected by the manipulation. The attacker uses part of the arbitrage funds to return the 10,000 ETH flash loan plus a fee.

522d4563bb4c645e532357a68a632e0b69135476dda8deb0272cb7844eed12a8.png

-Another technique involves taking a flash loan, manipulating prices on Uniswap by pushing up the value of a less liquid stablecoin, borrowing this same asset, selling it at a higher price by exploiting the price difference, and returning the flash loan.

-Other attack methods used: attacking a Governance (borrowing large amounts of the DAO token, voting in favor of your own proposal; imagine proposing to send a certain amount of money to your address and repay the loan with that).

 

Are you interested in ways to earn crypto bonus? Check it out here: Some Sites To Earn Crypto Bonus (Old & New) 

How do you rate this article?

111


☑️0🆇D̺͈͙͕̿ͧ̑ͣ🅰🆅🅸🅳eͤ
☑️0🆇D̺͈͙͕̿ͧ̑ͣ🅰🆅🅸🅳eͤ Verified Member

I have been using Bitcoin since 2012. I also love NFT. #BTC #ETH #ATOM #SNX #MLBSorare⠀⠀⠀⠀⠀⠀


Darknet
Darknet

The topics will be 🅒🅡🅨🅟🅣🅞, of course. BTC and Degen crypto since 2012.⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.