Real Mainnet example for Aave Flash loans on Uniswap?

Hi, I went through the Ethereum programming 101 course and the Defi 201 course up through creating flash loans. I’m getting more familiar, but I’m still rather shaky on how the mainnet implementations for Aave and flash loans would look like or where to find that info exactly.

Does anyone have a Github template for this that can be run on remix? My understanding is that the koven example in the course would not work on live uniswap.

Thanks.

1 Like

In the code what you must change are the addresses of the assets and the lending pool to the Mainnet, here is the information:
https://docs.aave.com/developers/deployed-contracts/deployed-contract-instances

Like looking for the uniswap contracts to exchange the tokens, for example the DAI-ETH pool contract 0xA478c2975Ab1Ea89e8196811F51A7B7Ade33eB11

But you must be careful of the high gas rates of the network.

Thanks have you already tried this with success - just changing the addresses using this same contract?

As a side note, I found this dapp https://furucombo.app that has an awesome interface for doing flash loans among other things. But I can’t figure out why no matter what I try, it always predicts a loss at the end. I find pairs on different exchanges that SHOULD create a gain when trading them in the sequence but it never works. Not sure if this is just a problem with this app or what.

1 Like

I’m interested in this as well and I’m just starting so i’m quite confuesed. Anyway did you considered that the issue could be the gas fees that take all the profit and turn it up into a loss?

If you are asking about the gas with Furucombo, no it’s not that. The gas fees are charged by metamask after you initiate the transaction, so they are not included in the pre caclulation as I understand.

Hello, I have not tried it on mainnet because the cost of gas is too high, I do not like to use the network when it is in these values.
With Furucombo if you have opportunities but you have to be patient for example at the time I answer you there is an opportunity to pass DAI-USDC first in 1inch and then USDC - DAI in Curve

Interesting. I see the first part of that opportunity with Dai-> USDC but cannot seem to make the other half of it work out in the numbers.

How did you even find out about the first part?

Try each pair by making combinations by buying on one DEX and selling on another.

You could also program a bot that locates these opportunities automatically.