0

I am quite new to flash loan and I don't fully understand it. I've been reading on flash loan attacks lately and notice often times it involves a huge dump on Uniswap to skew the price of a coin. I am wondering if I can take out a flash loan, say 10000 ETH from AAVE, and dump all that in Uniwap to exchange BTC. Is this going to increase the price of BTC for a short time (a few seconds)? If yes, then what I can do is I immediately sell some of my own BTC on Uniswap after I skewed the price of BTC with the flash loan and buy it back when the price corrects itself. I don't even need to pay back the flash loan since all I need is to skew the price for a short moment (a few seconds) and do arbitrage with my own holdings. Pretty sure I'm missing something here but I don't know which part is wrong.

My second part of the question is say during a flash loan attack I manipulated a price of some coin. If a user queries the price of that coin in the middle of my flash loan attack, is that user seeing the manipulated price or the normal price?

1 Answer 1

1

Is this going to increase the price of BTC for a short time (a few seconds)?

No. Flash loans are opened and terminated within the same transaction. The "time" per see is infinitely small. This guarantees the borrower does not run away with the loan. The transaction fails unless the loaned money is returned by the end of the transaction.

If a user queries the price of that coin in the middle of my flash loan attack, is that user seeing the manipulated price or the normal price?

This depends on the price feed. Maybe, maybe not. Generic answer is not possible and you need to cite a specific example.

3
  • Say at time T0 Alice pulled out a flash loan of 10000 ETH. At T1 Alice dumped all that in Uniswap to swap for BTC. So at T2 BTC is worth more ETH than usual. Assume Bob is querying Uniswap for the price of ETH/BTC at T2, is Bob going to see the manipulated price by flash loan or just a regular price without flash loan interaction? Also Alice won't repay the flash loan, so flash loan will be reverted at T5.
    – Lagrange S
    Apr 17, 2021 at 9:46
  • Bob cannot query manipulated price, because Bob cannot see inside Alice's transaction. Apr 17, 2021 at 9:55
  • The attack vector can be only triggered when different smart contracts are interacting within the same transaction. Apr 17, 2021 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.