I am halfway at watching the video, and I just want to thank you a lot for this tutorial. This is the best flashloan tutorial on youtube that I watched until now.
@@saheb1009 why are you scared of fees. Haha okay yeah it could work I guess just change the variables that represent matic from eth also router address.
Bro please don't stop making content. Your tutorials are some of the most easily digestible Solidity Tutorials online hands down. Even when I run into issue it's easy to fix because the foundation of how you deliver the information is solid. I'm not a complete novice when it comes to solidity but I'm also not an expert. My point is these are good for people of all levels even those who want to understand the code just so they now a little about how smart contracts work. Please don't stop making these videos they're awesome. If you're not gonna do this here on youtube at least start a Udemy class or something. Key point being your work is needed in this space. Thank' You.
Just realized this video is also form the same creator as the website I was just reading an article on 30 min ago.. so dope that you have channel too and not just a bullshit one so you can say you do. This video is very well put together and you speak clearly and slowly it’s almost soothing haha 😂. Please keep up the content these kinds of quality videos will be helping people for years to come I’m subbing after the comment and clicking the bell haha
id like to get something straight , do we have to deposit the 1500 USDC and 1500 DAI ($3000) from our own personal metamask wallet ? Or these funds comes from the test tokens faucet?
Well the 'make me rich' part all comes down to what arbitrage opportunity you've found. In my example it's a little contrived, of course, but I've heard that people have made some serious bacon from flash loans. The potential is definitely there!
Best explanation ever on executing a flashloan in TH-cam by the way Did you recieved usdc in metamask wallet end of it ??? Please reply I'm eagerly waiting for you reply 😊
Thank you so much for creating and sharing this amazing tutorial video! Quick question... Do you have a video or could you create video which shows how to create this development setup for people who never coded anything before but still want to follow this tutorial step by step? I myself am not a developer and I know such a video would be really helpful for me.
imo you really have to learn at least some basic solidity and study how transactions happen under the hood (what you're interacting with in order to do this) to fully understand and get the maximum benefit from using stuff like this.
What a great tutorial. I am totally newbie on this but your step-by-step guide helped a lot. But I did receive this message "'insufficient funds for intrinsic transaction cost'", and I am wondering, what's the minimum ETH I should deposit? I just created a totally new wallet in Metamask, but not sure how much ETH should I transfer or depo, just for this tutorial purpose.
Just found out that we actually need some faucet goerliETH for the transaction fee to deploy the fast loan contract. I thought we just need the faucet USDC only for testing. Thanks again for the tutorial
My friend, thank you very much for this tutorial)) I have one small problem which I can not deal with. In 12:03 you had a problem in second line, but after 2 seconds (on the next shot) this problem doesn't exist. Please tell me what have you done with it ? I will really appreciate it if you help me.
I'm having difficulty understanding when you say this is an example test - so what would be the real life utilization of this? Is there completely different code that is used? Like, Is everything you just did the same for the real life actualization of this flash loan I just do....what else? I'm not picking up what you're laying down here....bc the possibilities with this are uncalculable.
its basically the same, every network like ethereum, uniswap, Aave, has test and real live network, what changes in the code its the address of the contract to borrow and make flash loan.
This tutorial was really helpful! The only issue I had was that the USDC I obtained using Aave's faucet had a different contract address. Is there a way I can supply the DEX with the USDC using the address that Aave expects? I apologize for my poor English. :(
cc :waiting for the reply too... thanks in advance . for more context: ## DAI-TestnetMintableERC20-Aave token (Goerli): your video Aave's faucet addressess - 0xDF1742fE5b0bFc12331D8EAec6b478DfDbD31464 ~ the new Aave's faucet contract addresses - ` 0x75Ab5AB1Eef154C0352Fc31D2428Cef80C7F8B33 ` ## USDC-TestnetMintableERC20-Aave token(Goerli): your video Aave's faucet addresses - 0xA2025B15a1757311bfD68cb14eaeFCc237AF5b43 ~ the new Aave's faucet contract addresses -` 0x9FD21bE27A2B059a288229361E2fA632D8D2d074 `
Hi One question pls; if I want to deploy the dex contract on the mainnet, would it cost me the 1500 USDC and 1500 DAI as it's done in the video using the test tokens? If no, how much minimum would it reasonably cost?
I made an cross exchange arbitrage bot with flash loan. What no one tells you, is that miners who land the block have control over the transactions that will go on the block. So they can manipulate who will take the arbitrage oportunities.
@@JS-jq8pu there's no shortcuts, you can look for degenbot to have some idea if you understand python. the concept is basically keep track of current reservers of a pair and calculate the future by filtering pending transactions on the blockchain> You will also need code in solidity, there's no way to run (but is not as hard as it looks, honestly is the easiest part). I have nothing linked with degenbot, it's just the only arbitrage real content i ever saw in the internet, and i still not use it, i made all my stuff. It's a lot of work (for real, there's no limit to upgrade), as more exchanges you implement more opportunities and also more profitable each opportunity will be, so it's kinda exponential. I don't know what more i can tell you, ask me a more specific question if u want. Currently im making just few dollars a day, probably an average of 5-6. But is increasing as i upgrade my code. January was few cents a day
Super nice tutorial! Very pleasant. I have 2 questions: 1. For Add liquidity, I see 1,500 USDC while the Flashloan is 1,000 USDC. Is adding 1,000 as liquidity possible? What upper security margin should we consider in percentage? 2. For Approve, i see 1,200 DAI (1200000000000000000000) while USDC is 1,000. Why 1200 DAI?
Thanks for the forecast! Just a quick off-topic question: I have a SafePal wallet with USDT, and I have the seed phrase. (alarm fetch churn bridge exercise tape speak race clerk couch crater letter). Could you explain how to move them to Binance?
Hello, thanks for tutorial. im getting the following error: "NotImplementedError: Method 'HardhatEthersProvider.resolveName' is not implemented" when i try to deployFlashloan.js (following minute 27:40 from video. Anyone know what is the problem?
Great video as always! 👍 I have a quick question: 🤷♂️ I have these words 🤨. (behave today finger ski upon boy assault summer exhaust beauty stereo over). Not sure how to use them, would appreciate help. 🙏
Hello, I found problem during deploying the flashloan contract, when I run the command “box hardhat run -network sepolia scripts/deployFlashloan.js” in the terminal, I got a TypeError: flashloan.deployed is not a function… at processTicksAndRejections (node: internal/process/task_queues:95:5). I can’t find what’s wrong. Can anyone help me with it?
Is it possible to configure for mainnet? I'm trying to implement flashloan and abitration in V2, but it's returning zero in getBalance and zero after executing the executeOperation() function
I'm trying this on June 2024 but it does not compile, giving errors about abstract contract, I tried to fix but then got other errors and didn't want to mess up the code.
Hi Sir, At 15:34 secs, I didn't understand 1.How, why inserted you IpoolAdressesProvider(_addressProvider) into FlashLoanSimpleReceiverBase() ? How are they interlinked if I am right? 2. What is 'IpoolAdressesProvider' in return type of "function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider)" Thank you sir.
1. 'IFlashLoanSimpleReceiver' is the basic interface that needs to be implementer in order for 'FlashLoanArbitrage.sol' to be a receiver of a flash loan. So we need to implement 'executeOperation', 'ADDRESSES_PROVIDER' and 'POOL' from 'IFlashLoanSimpleReceiver'. 'FlashLoanSimpleReceiverBase' implements 'ADDRESSES_PROVIDER' and 'POOL'. 'FlashLoanArbitrage.sol' inherits 'FlashLoanSimpleReceiverBase' and also implements 'executeOperation'. It makes sense to organize the code in this way since the implementations of 'ADDRESSES_PROVIDER' and 'POOL' don't change, but 'executeOperation' contains custom logic specific to our smart contact. 2). 'IpoolAdressesProvider' is just an abstraction layer that returns a pool address. It provides flexibility in the case that the address were to change (so we don't have to hardcode it).
Thank you so much for this video! Question. I am getting an error that says 'UNPREDICTABLE_GAS_LIMIT'. Do you know why this may be happening? Any help would be appreciated
Cool. I ran into the same error when I was building it the first time before video. It was just an error in my code so that err message seems to be pretty vague.
This happened to me too. I hadn't visited the aave faucet and got the test Dai and USDC. Once I'd done this, I didn't get the error and the contract deployed successfully.
The profit wouldn't go into your wallet until you call the withdraw function which wasn't shown in the tutorial. You have to withdraw the profits into your wallet or be able to write a function into the contract that automatically withdraws the profits for you.
I have no idea why but the usdc doesn’t go to the Aave contract address, even though it does go to USDC contract address and it doesn’t let me take the flash loan
Hi, thanks for the great tutorial... When I tried deploying to the TESTNET I received this error... ´Deploying contract... Deployment error: Error: cannot estimate gas; transaction may fail or may require manual gas limit ´ Do you know why??? Thanks 🙏
@@BlockExplorerMedia your voice is like Meditation sir!. Eagerly waiting to learn uniswap from you sir. AAVE- defi related complete knowledge. OPENSEA - defi related complete knowledge For example, how Aave works in the backend?. Thank you sir.
Thanks for the video, you will forever remain the best, I appreciate, please i have a small issue when i run the code that will deploy the contract, i always get an error saying “flashLoan.deployed is not a function Please help me on how to solve the issue, thanks so much
Do you have an automated version of this program for those who do not know how to code . I am interested in buying it if available. Thanks PS Considering the fact that I don't know the first thing about writing codes , a tutorial on the subject for complete newbie will be very much appreciated
To all the people looking or the automated version. Please note that this is how people get scammed. I could show you a proper working of FlashLoan contract that I have, then sell you something that diverts your funds to me. Essentially making you lose twice the money. Hence, I would really advise you to take such a code only from a person you know or a trusted entity. If you happen to receive such a code (or buy, whatever), then in that case, please get it verified by a person who knows and understands solidity.
Thanks mate its easy to understand and good intro to flash loan arb, Can we automate this, so that whenever it finds a difference in price it will execute...
@Block Explorer I am completely happy with the clear explanation given in the video. But I have a question, The amount you have deposited for liquidity 1500 USDC and 1500 DAI, do we need to deposit from our end?. I am from India and I feel the amount is more expensive to deposit. Please help me with the query.
@@antonstauer6421 but what about when we want to deploy it on the mainnet, would it cost the same 1,500 for USDC and DAI? And if no, how much minimum would it reasonably cost to deploy it?
I had tried but there has been some updates on the code and parts of the Flash Loan in Aave V3. Now are you planning to uodate this video to reflect any changes or updates?.... (Helloo World) are you still there?.. Thanks
No that wasn't really the intention in this video - the flash loan was just from smart contract to Aave and back. There is a withdraw function in the contract though were the wallet owner could ultimately withdraw the funds from, after the completion of the flash loan. But yes, that does work. If you did want the funds to go back to the wallet automatically, you could implement a transfer from smart contract to wallet at the conclusion of the flash loan.
Why was it so fast at taking a loan then buying dai and then selling it for usdc? Usually currency rates do not move that quickly... Can you show a real example with some real money and real dex?
Great tutorial! One question though: why can't we use the 1000 USDC borrowed from Aave for the DEX transcations but have to deposit another 1000 USDC for liquidity? The borrowing and arbitraging actions seem to be two separate transcations in the example?
I'm using the Solidity VC plugin by Juan Blanco which is great (using that specifically in this video). I have also used the Hardhat Solidity plugin. Prettier for formatting - you have to enable 'format on save' in VC settings and also ensure a formatter is set for Solidity.
V3 isn't live on Ethereum mainnet yet as far as I know, but hopefully will be soon. If you need to deploy something sooner, use V2. There's an example of in the code repo.
@@BlockExplorerMedia Is there a way to change networks? i'm trying but i want to have this confirmation i'm switching to bsc network. I'm testing first before switching to BSC, on Goerli my getBalance is returning zero on testnet, I've implemented uniswap arbitration for sushsiswap. In etherscan it shows as success the operation, but the value is zero. Can you help me ?
I am halfway at watching the video, and I just want to thank you a lot for this tutorial. This is the best flashloan tutorial on youtube that I watched until now.
Thanks my friend - I appreciate that! : )
why do i get error when i import files he says import from dpendencies? i copied the green and pink lines in git hub?
@@BlockExplorerMedia can this be done in polygon chain?
@@saheb1009 why are you scared of fees. Haha okay yeah it could work I guess just change the variables that represent matic from eth also router address.
Bro please don't stop making content. Your tutorials are some of the most easily digestible Solidity Tutorials online hands down. Even when I run into issue it's easy to fix because the foundation of how you deliver the information is solid. I'm not a complete novice when it comes to solidity but I'm also not an expert. My point is these are good for people of all levels even those who want to understand the code just so they now a little about how smart contracts work. Please don't stop making these videos they're awesome. If you're not gonna do this here on youtube at least start a Udemy class or something. Key point being your work is needed in this space. Thank' You.
I really appreciate the kind words. I've had a bit of a lull but new video dropping tomorrow. Thanks for your support!
Yeah, this dude, absolutely, rocks.
@@BlockExplorerMedia brother can you mentor me I signed up to your Patreon and saw it had no videos 😂
But this video is gold literally
So with all the praise of this video. I'm assuming there was success in one of you creating flash loans?
I've been trying to find a tutorial this robust for about 2 years. Thank you!
has this method worked for you
the only tutorials where my adhd doesnt take over lolz,thank you
still works the code?
@@ItsElMago the code didn't work for me because I think infura stopped supporting goerli
hands down, the best ever flash loan arbitrage tutorial. thank you for detailed explanation.
yup the first tutorial to actually work!!! Damn you're good
Just realized this video is also form the same creator as the website I was just reading an article on 30 min ago.. so dope that you have channel too and not just a bullshit one so you can say you do. This video is very well put together and you speak clearly and slowly it’s almost soothing haha 😂. Please keep up the content these kinds of quality videos will be helping people for years to come I’m subbing after the comment and clicking the bell haha
Thanks, I appreciate your kind words. Which website was that? I don't have one : ) I should have a new video dropping in the next day or so - thanks!
As someone who doesn't know anything about programming this looks titanically impossible, well this is going to be a long ride
Clear and amazing. Better than any related videos which gonna charge lots of $
Great video, concise and exactly what you need to get started!
why do i get error when i import files he says import from dpendencies? i copied the green and pink lines in git hub?
thank you for your efforts in this video, know it really takes a lot of effort to make things end-to-end. Nice work!
Thanks bro, best flashloan tutorial I have ever watched
Gosh you guys have the best tutorials 💯 seriously been so helpful
id like to get something straight , do we have to deposit the 1500 USDC and 1500 DAI ($3000) from our own personal metamask wallet ? Or these funds comes from the test tokens faucet?
This is my favorite video of yours so far. Thanks!
Just out of curiosity...If I were to run the V2 on mainnet, with my own USDC/DAI would it return similar profits? aka, press button=make me rich? Lol
Thanks appreciate it!!
Well the 'make me rich' part all comes down to what arbitrage opportunity you've found. In my example it's a little contrived, of course, but I've heard that people have made some serious bacon from flash loans. The potential is definitely there!
Best explanation ever on executing a flashloan in TH-cam by the way Did you recieved usdc in metamask wallet end of it ??? Please reply I'm eagerly waiting for you reply 😊
This was a brilliant tutorial explaining from scratch how use flash loans. Can u make video on flashbots and reentrancy hacks too
lmao
THIS IS GREAT . .please make more tutorial on Defi ..
Thank you so much for creating and sharing this amazing tutorial video!
Quick question...
Do you have a video or could you create video which shows how to create this development setup for people who never coded anything before but still want to follow this tutorial step by step? I myself am not a developer and I know such a video would be really helpful for me.
imo you really have to learn at least some basic solidity and study how transactions happen under the hood (what you're interacting with in order to do this) to fully understand and get the maximum benefit from using stuff like this.
I can help with that.
@@CyberDTech hwlp me plz
@@vstargold7600yes
Thank you it worked, take care!
This is a really great tutorial, I am looking forward to your new content on this channel. Thanks
Are there any good videos on how to code this kind of thing? I haven't coded in almost 30yrs.
Wow.. You've nailed it. Thanks for sharing this educ. video.
Can I use the bsc network?
Do i need to write that smart contract to do flash loan arbitrage on Aave?
What a great tutorial. I am totally newbie on this but your step-by-step guide helped a lot. But I did receive this message "'insufficient funds for intrinsic transaction cost'", and I am wondering, what's the minimum ETH I should deposit? I just created a totally new wallet in Metamask, but not sure how much ETH should I transfer or depo, just for this tutorial purpose.
Just found out that we actually need some faucet goerliETH for the transaction fee to deploy the fast loan contract. I thought we just need the faucet USDC only for testing. Thanks again for the tutorial
@@Fansuri85 yes you always need native coin for the gas fee
@@Fansuri85have you been successful using this method?
Hi how do i populate the infura goreli endpoint
address private dexContractAddress =
in the flasloanarbitrage.sol is self deployed test contract? Or are we using the address in the video
What is the initial amount should have in wallet to do this complete project
My friend, thank you very much for this tutorial)) I have one small problem which I can not deal with. In 12:03 you had a problem in second line, but after 2 seconds (on the next shot) this problem doesn't exist. Please tell me what have you done with it ? I will really appreciate it if you help me.
Did you get the help?
Hi. Is it possible to fund the contract with less than 1500? If so, what is the minimum?
Thank you for the excellent tutorial. Does the test wallet require any funds prior to execution of the script?
hello, i tried this on my vscode but am having issues deploying it
sir can't we perform arbitrage on test net directly without using the dex contract??
Bitcoin is the best-performing asset of the decade. Insane!
Great tutorial, now i was wondering if you can make it with DODO or DYDX
I'm having difficulty understanding when you say this is an example test - so what would be the real life utilization of this? Is there completely different code that is used? Like, Is everything you just did the same for the real life actualization of this flash loan I just do....what else? I'm not picking up what you're laying down here....bc the possibilities with this are uncalculable.
its basically the same, every network like ethereum, uniswap, Aave, has test and real live network, what changes in the code its the address of the contract to borrow and make flash loan.
Excellent material. How much min starting capital is needed please? Thank you.
This tutorial was really helpful! The only issue I had was that the USDC I obtained using Aave's faucet had a different contract address. Is there a way I can supply the DEX with the USDC using the address that Aave expects? I apologize for my poor English. :(
cc :waiting for the reply too... thanks in advance .
for more context:
## DAI-TestnetMintableERC20-Aave token (Goerli):
your video Aave's faucet addressess - 0xDF1742fE5b0bFc12331D8EAec6b478DfDbD31464
~
the new Aave's faucet contract addresses - ` 0x75Ab5AB1Eef154C0352Fc31D2428Cef80C7F8B33 `
## USDC-TestnetMintableERC20-Aave token(Goerli):
your video Aave's faucet addresses - 0xA2025B15a1757311bfD68cb14eaeFCc237AF5b43
~
the new Aave's faucet contract addresses -` 0x9FD21bE27A2B059a288229361E2fA632D8D2d074 `
Did u get help?
Use v3 of the USDC faucet token, I was using v2 and it was giving me gas failure errors
Did you tried using on Mainet and did it worked ??
Sorry, minute 9'42 when clicked on botton C on the botton 2 windows were opened on the top. I didnt understand how those were opened
Hi
One question pls; if I want to deploy the dex contract on the mainnet, would it cost me the 1500 USDC and 1500 DAI as it's done in the video using the test tokens? If no, how much minimum would it reasonably cost?
Outstanding video💥🔥⚡⚡🔥💥
This is much appreciated! Thank you 👍👍
why do i get error when i import files he says import from dependencies? i copied the green and pink lines in git hub? and
Reply
I made an cross exchange arbitrage bot with flash loan. What no one tells you, is that miners who land the block have control over the transactions that will go on the block. So they can manipulate who will take the arbitrage oportunities.
any tips to start creating a cross exchange arbitrage bot with flashloans?
@@JS-jq8pu there's no shortcuts, you can look for degenbot to have some idea if you understand python. the concept is basically keep track of current reservers of a pair and calculate the future by filtering pending transactions on the blockchain> You will also need code in solidity, there's no way to run (but is not as hard as it looks, honestly is the easiest part). I have nothing linked with degenbot, it's just the only arbitrage real content i ever saw in the internet, and i still not use it, i made all my stuff. It's a lot of work (for real, there's no limit to upgrade), as more exchanges you implement more opportunities and also more profitable each opportunity will be, so it's kinda exponential. I don't know what more i can tell you, ask me a more specific question if u want. Currently im making just few dollars a day, probably an average of 5-6. But is increasing as i upgrade my code. January was few cents a day
token's address faucet different with token's address borrow and repay such as DAI or USDC, how can I fix it?
5:53 How come you’re not getting errors when trying to install Hardhat?
Undeclared identifier line 39 column 5. Pool variable is undeclared. How do I fix?
Super nice tutorial! Very pleasant. I have 2 questions:
1. For Add liquidity, I see 1,500 USDC while the Flashloan is 1,000 USDC. Is adding 1,000 as liquidity possible? What upper security margin should we consider in percentage?
2. For Approve, i see 1,200 DAI (1200000000000000000000) while USDC is 1,000. Why 1200 DAI?
Can you execute an operation with a CEX like Binance using an API once you have taken a flash loan or are we just limited to DEXs
I have a question, did u take arbitrary dexRate? If yes then is it possible to set arbitrary dexRate in mainnet ???
Thanks for the forecast! Just a quick off-topic question: I have a SafePal wallet with USDT, and I have the seed phrase. (alarm fetch churn bridge exercise tape speak race clerk couch crater letter). Could you explain how to move them to Binance?
Shouldnt we need to use some thing like chainlink to get pricefeeds to calculate DexA rate and DexB rate
Hello, thanks for tutorial. im getting the following error: "NotImplementedError: Method 'HardhatEthersProvider.resolveName' is not implemented" when i try to deployFlashloan.js (following minute 27:40 from video. Anyone know what is the problem?
Great video as always! 👍 I have a quick question: 🤷♂️ I have these words 🤨. (behave today finger ski upon boy assault summer exhaust beauty stereo over). Not sure how to use them, would appreciate help. 🙏
Hello, I found problem during deploying the flashloan contract, when I run the command “box hardhat run -network sepolia scripts/deployFlashloan.js” in the terminal, I got a TypeError: flashloan.deployed is not a function… at processTicksAndRejections (node: internal/process/task_queues:95:5). I can’t find what’s wrong. Can anyone help me with it?
Is it possible to configure for mainnet? I'm trying to implement flashloan and abitration in V2, but it's returning zero in getBalance and zero after executing the executeOperation() function
how did you get used on goerli? I can't find a goerli faucet for usdc
thanks bro full value
Excellent video!
Infinite money glitch. Jk, loved the tutorial!
I'm still looking for that glitch ; ) thanks!
very good!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
great tutorial would be nice tho if we could get a mainnet tutorial on the arbitrage
Yeah I want the same
yes its available
@@CyberDTech where pls?
This is brilliant, thank you
I'm trying this on June 2024 but it does not compile, giving errors about abstract contract, I tried to fix but then got other errors and didn't want to mess up the code.
there are some other scripts that are very profitable even today
Hi Sir,
At 15:34 secs,
I didn't understand
1.How, why inserted you
IpoolAdressesProvider(_addressProvider) into
FlashLoanSimpleReceiverBase() ?
How are they interlinked if I am right?
2. What is 'IpoolAdressesProvider' in return type of
"function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider)"
Thank you sir.
1. 'IFlashLoanSimpleReceiver' is the basic interface that needs to be implementer in order for 'FlashLoanArbitrage.sol' to be a receiver of a flash loan. So we need to implement 'executeOperation', 'ADDRESSES_PROVIDER' and 'POOL' from 'IFlashLoanSimpleReceiver'. 'FlashLoanSimpleReceiverBase' implements 'ADDRESSES_PROVIDER' and 'POOL'. 'FlashLoanArbitrage.sol' inherits 'FlashLoanSimpleReceiverBase' and also implements 'executeOperation'. It makes sense to organize the code in this way since the implementations of 'ADDRESSES_PROVIDER' and 'POOL' don't change, but 'executeOperation' contains custom logic specific to our smart contact.
2). 'IpoolAdressesProvider' is just an abstraction layer that returns a pool address. It provides flexibility in the case that the address were to change (so we don't have to hardcode it).
@@BlockExplorerMedia Thank you sir. Your Patience is a blessing to us.
Most welcome : )
Great video, thanks one million. Going to try it and add another comment. Peace out fam
how can i execute the contract on real network ?
Thank you so much for this video! Question. I am getting an error that says 'UNPREDICTABLE_GAS_LIMIT'. Do you know why this may be happening? Any help would be appreciated
Fixed it. Was using the wrong endpoint...
Cool. I ran into the same error when I was building it the first time before video. It was just an error in my code so that err message seems to be pretty vague.
@@leomartinez6667 could you please elaborate how you fixed this?
This happened to me too. I hadn't visited the aave faucet and got the test Dai and USDC. Once I'd done this, I didn't get the error and the contract deployed successfully.
@@leomartinez6667 How do you set end point? Any syntax?
Were did the profit go ? U showed it via the get balance but not the wallet itself can u explain it to me?
The profit wouldn't go into your wallet until you call the withdraw function which wasn't shown in the tutorial. You have to withdraw the profits into your wallet or be able to write a function into the contract that automatically withdraws the profits for you.
@@sacredsoundsmeditation can u send me one?
use the function withdraw() that is in the FlashLoan contract. Probably a button on Remix.
How profit did you get? there are still some opportunities on Market Now?
Considering the ETH gas fees, is it possible to make any money at all doing this??
For real, I think not.
I have no idea why but the usdc doesn’t go to the Aave contract address, even though it does go to USDC contract address and it doesn’t let me take the flash loan
Use v3 of the USDC faucet token, I was using v2 and it was giving me gas failure errors
Hi, thanks for the great tutorial... When I tried deploying to the TESTNET I received this error...
´Deploying contract...
Deployment error: Error: cannot estimate gas; transaction may fail or may require manual gas limit ´
Do you know why??? Thanks 🙏
Great video, can i also use a bigger Flash loan of like 100k or 1mil and make more profit?
Hey bro, did you use this on the mainnet and if yes, did you get some profits?
thanks for this dude
No problemo!
first thank you for such valuable content and please tel how we can avoid lots of scams about flash lowns in youtube, how we can detect the fraud?
Hi sir, I have few noble requests:
1.Uniswap project
2.opensea project
3.Aave project
Please make videos. Thank you in advance.
I'm working on a Uniswap video right now. I have some videos on Aave and OpenSea already - what would you like to see in particular?
@@BlockExplorerMedia your voice is like Meditation sir!. Eagerly waiting to learn uniswap from you sir.
AAVE- defi related complete knowledge.
OPENSEA - defi related complete knowledge
For example, how Aave works in the backend?.
Thank you sir.
Got it. Ok I will definitely be digging deeper into Aave. Thanks for your support : )
Thanks for the video, you will forever remain the best, I appreciate, please i have a small issue when i run the code that will deploy the contract, i always get an error saying “flashLoan.deployed is not a function
Please help me on how to solve the issue, thanks so much
I get the same issue on deployment: "flashLoan.deployed is not a function" - any ideas what is causing that 'revert'?
Do you have an automated version of this program for those who do not know how to code . I am interested in buying it if available. Thanks PS Considering the fact that I don't know the first thing about writing codes , a tutorial on the subject for complete newbie will be very much appreciated
that's a whole other rabbit hole. extremely complex. minimum I've seen a bot for sale doing this was $20,000
.
$17000 i have
To all the people looking or the automated version. Please note that this is how people get scammed. I could show you a proper working of FlashLoan contract that I have, then sell you something that diverts your funds to me.
Essentially making you lose twice the money.
Hence, I would really advise you to take such a code only from a person you know or a trusted entity.
If you happen to receive such a code (or buy, whatever), then in that case, please get it verified by a person who knows and understands solidity.
Amazing video
Hi sir,
in the last step,
around 47 mins,
we didn't use excuteOperation.
Then who initiated deposit, buy, sell function in it.
Thank you.
'executeOperation' is called by the Aave pool, atfer we call 'requestFlashLoan', after it performs some basic checks.
@@BlockExplorerMedia Thank you very much sir. Got it.
@@BlockExplorerMedia can you explain in more detail, like, can we call the "execute operation" manually?
Thanks mate its easy to understand and good intro to flash loan arb, Can we automate this, so that whenever it finds a difference in price it will execute...
yes we can
@Block Explorer I am completely happy with the clear explanation given in the video. But I have a question, The amount you have deposited for liquidity 1500 USDC and 1500 DAI, do we need to deposit from our end?. I am from India and I feel the amount is more expensive to deposit. Please help me with the query.
bro thats testnet dai and usdc, doesnt cost u anything
.
@@antonstauer6421 but what about when we want to deploy it on the mainnet, would it cost the same 1,500 for USDC and DAI? And if no, how much minimum would it reasonably cost to deploy it?
I had tried but there has been some updates on the code and parts of the Flash Loan in Aave V3. Now are you planning to uodate this video to reflect any changes or updates?.... (Helloo World) are you still there?.. Thanks
AWESOME!!!
quick question
did the 110 DAi go to the wallet?
No that wasn't really the intention in this video - the flash loan was just from smart contract to Aave and back. There is a withdraw function in the contract though were the wallet owner could ultimately withdraw the funds from, after the completion of the flash loan. But yes, that does work.
If you did want the funds to go back to the wallet automatically, you could implement a transfer from smart contract to wallet at the conclusion of the flash loan.
Can I use this for the balancer protocol ? Please I will appreciate your help on this
can you automate the approval process so it acts as a stand alone bot
That’s a whole different thing and a lot of bot coding but yes you can
I thought aave flashloan does not need coding
can you make a bot that use wormhole or layerzero protocol to do cross chain arbitrage?
yes I can
Hi love your video, can we hold assests that we buy using flash loans for a longer period like 2 3 months
No
thanks for this video but kindly make a video for uniswap and pancakswap exchange for trade
Why was it so fast at taking a loan then buying dai and then selling it for usdc? Usually currency rates do not move that quickly... Can you show a real example with some real money and real dex?
great stuff
Great tutorial! One question though: why can't we use the 1000 USDC borrowed from Aave for the DEX transcations but have to deposit another 1000 USDC for liquidity? The borrowing and arbitraging actions seem to be two separate transcations in the example?
The inital deposit is the collateral fees. In case you can't afford to pay back the amount borrowed. Nothing is free
But your supposed to be able to borrow without collateral! This is how flash loans are spoken about 🤣
thanks for the video. Quick question. What vscode extension do you use / settings for solidity highlighting. Thanks
I'm using the Solidity VC plugin by Juan Blanco which is great (using that specifically in this video). I have also used the Hardhat Solidity plugin. Prettier for formatting - you have to enable 'format on save' in VC settings and also ensure a formatter is set for Solidity.
@@BlockExplorerMedia thanks bro, big help
hi, please can you code for arbitrage only without the flashloan?
dont get the sol to compile in remix. those imports are not working it seems 3 parse errors
it works well on testnet tried😬
but if i deployed on mainnet it will perform same ?🧐
V3 isn't live on Ethereum mainnet yet as far as I know, but hopefully will be soon. If you need to deploy something sooner, use V2. There's an example of in the code repo.
@@BlockExplorerMedia thankyou
@@BlockExplorerMedia Is there a way to change networks? i'm trying but i want to have this confirmation i'm switching to bsc network. I'm testing first before switching to BSC, on Goerli my getBalance is returning zero on testnet, I've implemented uniswap arbitration for sushsiswap. In etherscan it shows as success the operation, but the value is zero. Can you help me ?
Goerli testnet is deprecated. Is there a dex.sol anybody has for Sepoli with liquidity?