Flash Loan Arbitrage | Aave Flash Loan Tutorial

  Рет қаралды 129,485

Block Explorer

Block Explorer

Жыл бұрын

Create an Aave Flash Loan arbitrage smart contract from scratch in this comprehensive flash loan tutorial. In this step-by-step DeFi tutorial we use the Aave v3 protocol to build a flash loan receiver smart contract. We'll then use a mock DEX contract to simulate a flash loan arbitrage.
Project repo:
github.com/jspruance/aave-fla...
Aave v3 Flash Loan documentation:
docs.aave.com/developers/guid...
docs.aave.com/developers/depl...
DAI-TestnetMintableERC20-Aave token (Goerli):
0xDF1742fE5b0bFc12331D8EAec6b478DfDbD31464
USDC-TestnetMintableERC20-Aave token(Goerli):
0xA2025B15a1757311bfD68cb14eaeFCc237AF5b43
AAVE PoolAddressProvider (Goerli):
0x5E52dEc931FFb32f609681B8438A51c675cc232d
Get Goerli test Eth here:
faucets.chain.link/
Get test ERC20 tokens here:
staging.aave.com/faucet/?mark...
Remix imports:
import {FlashLoanSimpleReceiverBase} from "github.com/aave/aave-v3-core/...";
import {IPoolAddressesProvider} from "github.com/aave/aave-v3-core/...";
import {IERC20} from "github.com/aave/aave-v3-core/...";
Dex.sol deployed (Goerli):
0xD6e8c479B6B62d8Ce985C0f686D39e96af9424df
Add liquidity:
USDC 1500
DAI 1500
Approve:
USDC 1000000000
DAI 1200000000000000000000
Request Loan - USDC (6 decimal):
0xA2025B15a1757311bfD68cb14eaeFCc237AF5b43,1000000000 // 1,000 USDC
0xA2025B15a1757311bfD68cb14eaeFCc237AF5b43,1000000 // 1 USDC

Пікірлер: 399
@Abdulkadir-vb3vj
@Abdulkadir-vb3vj Жыл бұрын
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.
@BlockExplorerMedia
@BlockExplorerMedia Жыл бұрын
Thanks my friend - I appreciate that! : )
@Ninjajitsu562
@Ninjajitsu562 Жыл бұрын
why do i get error when i import files he says import from dpendencies? i copied the green and pink lines in git hub?
@saheb1009
@saheb1009 Жыл бұрын
@@BlockExplorerMedia can this be done in polygon chain?
@onekycarscanners6002
@onekycarscanners6002 7 ай бұрын
@@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.
@ekwh84
@ekwh84 Жыл бұрын
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.
@BlockExplorerMedia
@BlockExplorerMedia 8 ай бұрын
I really appreciate the kind words. I've had a bit of a lull but new video dropping tomorrow. Thanks for your support!
@MrLawalker
@MrLawalker 4 ай бұрын
Yeah, this dude, absolutely, rocks.
@bxmoreno1988
@bxmoreno1988 4 ай бұрын
@@BlockExplorerMedia brother can you mentor me I signed up to your Patreon and saw it had no videos 😂 But this video is gold literally
@arieloxford6790
@arieloxford6790 Жыл бұрын
I've been trying to find a tutorial this robust for about 2 years. Thank you!
@Ninjajitsu562
@Ninjajitsu562 Жыл бұрын
has this method worked for you
@jrsantos1737
@jrsantos1737 Жыл бұрын
hands down, the best ever flash loan arbitrage tutorial. thank you for detailed explanation.
@zhaofour9833
@zhaofour9833 Жыл бұрын
Clear and amazing. Better than any related videos which gonna charge lots of $
@lunalogicradio3555
@lunalogicradio3555 6 ай бұрын
the only tutorials where my adhd doesnt take over lolz,thank you
@ItsElMago
@ItsElMago 3 ай бұрын
still works the code?
@Dreadz530
@Dreadz530 9 ай бұрын
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
@BlockExplorerMedia
@BlockExplorerMedia 8 ай бұрын
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!
@tamaraebiogosi9076
@tamaraebiogosi9076 Жыл бұрын
yup the first tutorial to actually work!!! Damn you're good
@comosaycomosah
@comosaycomosah Жыл бұрын
Gosh you guys have the best tutorials 💯 seriously been so helpful
@onostv9175
@onostv9175 Жыл бұрын
Thanks bro, best flashloan tutorial I have ever watched
@DomedIsDoomed
@DomedIsDoomed Жыл бұрын
Great video, concise and exactly what you need to get started!
@Ninjajitsu562
@Ninjajitsu562 Жыл бұрын
why do i get error when i import files he says import from dpendencies? i copied the green and pink lines in git hub?
@andriikliuiko7267
@andriikliuiko7267 10 ай бұрын
thank you for your efforts in this video, know it really takes a lot of effort to make things end-to-end. Nice work!
@Supercool7042
@Supercool7042 Жыл бұрын
THIS IS GREAT . .please make more tutorial on Defi ..
@ivanlagade
@ivanlagade Жыл бұрын
Wow.. You've nailed it. Thanks for sharing this educ. video.
@josephdelgiorgio3997
@josephdelgiorgio3997 Жыл бұрын
This is my favorite video of yours so far. Thanks!
@josephdelgiorgio3997
@josephdelgiorgio3997 Жыл бұрын
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
@BlockExplorerMedia
@BlockExplorerMedia Жыл бұрын
Thanks appreciate it!!
@BlockExplorerMedia
@BlockExplorerMedia Жыл бұрын
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!
@pneptune5851
@pneptune5851 13 күн бұрын
Thank you it worked, take care!
@jerrywang3225
@jerrywang3225 Жыл бұрын
This is a really great tutorial, I am looking forward to your new content on this channel. Thanks
@LearnCrypto101
@LearnCrypto101 Жыл бұрын
You can check out my tutorials on flashloans if your intrested
@deeparker6019
@deeparker6019 Жыл бұрын
This is much appreciated! Thank you 👍👍
@Ninjajitsu562
@Ninjajitsu562 Жыл бұрын
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
@LORDUPAKO
@LORDUPAKO Жыл бұрын
Thank you for the excellent tutorial. Does the test wallet require any funds prior to execution of the script?
@danielmwangi3362
@danielmwangi3362 10 ай бұрын
Outstanding video💥🔥⚡⚡🔥💥
@piccadilly0x
@piccadilly0x Жыл бұрын
This is brilliant, thank you
@sihledlamini6971
@sihledlamini6971 5 ай бұрын
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?
@PakluPapito
@PakluPapito Жыл бұрын
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
@CryptoWizards
@CryptoWizards Жыл бұрын
Excellent video!
@Sianae
@Sianae 7 ай бұрын
Best explanation ever on executing a flashloan in KZbin by the way Did you recieved usdc in metamask wallet end of it ??? Please reply I'm eagerly waiting for you reply 😊
@antonytoaquiza187
@antonytoaquiza187 Жыл бұрын
As someone who doesn't know anything about programming this looks titanically impossible, well this is going to be a long ride
@abinashburman4622
@abinashburman4622 Жыл бұрын
I have a question, did u take arbitrary dexRate? If yes then is it possible to set arbitrary dexRate in mainnet ???
@MrMike44v
@MrMike44v Жыл бұрын
Great tutorial, now i was wondering if you can make it with DODO or DYDX
@luce36
@luce36 Жыл бұрын
Shouldnt we need to use some thing like chainlink to get pricefeeds to calculate DexA rate and DexB rate
@lucaahrenbeck9081
@lucaahrenbeck9081 Жыл бұрын
Great video, can i also use a bigger Flash loan of like 100k or 1mil and make more profit?
@samora00
@samora00 Жыл бұрын
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
@animeshkumar688
@animeshkumar688 Жыл бұрын
I can't able to install Redhat in my windows. Can you please let me know is there any devices configuration is needed for deployment of Flashloans or I can do it in windows
@user-qf4rz7xp1f
@user-qf4rz7xp1f Жыл бұрын
very good!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@SnapDragon6101
@SnapDragon6101 Ай бұрын
Do i need to write that smart contract to do flash loan arbitrage on Aave?
@randyseff9252
@randyseff9252 Жыл бұрын
Great video, thanks one million. Going to try it and add another comment. Peace out fam
@daniel7007
@daniel7007 Жыл бұрын
AWESOME!!!
@laurennoyb539
@laurennoyb539 3 ай бұрын
Are there any good videos on how to code this kind of thing? I haven't coded in almost 30yrs.
@chandanmaka5498
@chandanmaka5498 Жыл бұрын
Amazing video
@mrshephu
@mrshephu Жыл бұрын
thanks for this dude
@BlockExplorerMedia
@BlockExplorerMedia Жыл бұрын
No problemo!
@michaelraasch5496
@michaelraasch5496 7 ай бұрын
This is a top shelf video. Thanks man.
@dogmaticent
@dogmaticent Ай бұрын
Can I use this for the balancer protocol ? Please I will appreciate your help on this
@snehamandal5376
@snehamandal5376 Жыл бұрын
sir can't we perform arbitrage on test net directly without using the dex contract??
@bhilder
@bhilder Жыл бұрын
thanks for the video. Quick question. What vscode extension do you use / settings for solidity highlighting. Thanks
@BlockExplorerMedia
@BlockExplorerMedia Жыл бұрын
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.
@bhilder
@bhilder Жыл бұрын
@@BlockExplorerMedia thanks bro, big help
@Silvervalist
@Silvervalist 3 ай бұрын
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?
@gabrielgomes5551
@gabrielgomes5551 Жыл бұрын
great stuff
@Hash01011
@Hash01011 Жыл бұрын
This was a brilliant tutorial explaining from scratch how use flash loans. Can u make video on flashbots and reentrancy hacks too
@omega3fatass61
@omega3fatass61 Жыл бұрын
lmao
@quantaraum
@quantaraum Жыл бұрын
how did you get used on goerli? I can't find a goerli faucet for usdc
@hashimnaushahi
@hashimnaushahi Жыл бұрын
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.
@omega3fatass61
@omega3fatass61 Жыл бұрын
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.
@CyberDTech
@CyberDTech 6 күн бұрын
I can help with that.
@gilliangertse4796
@gilliangertse4796 2 ай бұрын
Hi. Is it possible to fund the contract with less than 1500? If so, what is the minimum?
@aaronliruns
@aaronliruns 7 ай бұрын
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?
@kwayekant
@kwayekant 5 ай бұрын
The inital deposit is the collateral fees. In case you can't afford to pay back the amount borrowed. Nothing is free
@Samsonit50
@Samsonit50 2 ай бұрын
But your supposed to be able to borrow without collateral! This is how flash loans are spoken about 🤣
@sometimesalways1259
@sometimesalways1259 Жыл бұрын
token's address faucet different with token's address borrow and repay such as DAI or USDC, how can I fix it?
@pfaq
@pfaq Жыл бұрын
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
@JS-jq8pu Жыл бұрын
any tips to start creating a cross exchange arbitrage bot with flashloans?
@pfaq
@pfaq Жыл бұрын
@@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
@LOC2210
@LOC2210 4 ай бұрын
How profit did you get? there are still some opportunities on Market Now?
@doc.greenthumb
@doc.greenthumb Жыл бұрын
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. :(
@_SleekGeek
@_SleekGeek Жыл бұрын
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 `
@saheb1009
@saheb1009 Жыл бұрын
Did u get help?
@jm7990
@jm7990 Жыл бұрын
Use v3 of the USDC faucet token, I was using v2 and it was giving me gas failure errors
@praghav1988
@praghav1988 8 ай бұрын
Did you tried using on Mainet and did it worked ??
@wenrui2554
@wenrui2554 3 ай бұрын
Hi how do i populate the infura goreli endpoint
@WesleySouza-bm3ee
@WesleySouza-bm3ee Жыл бұрын
Can I use the bsc network?
@giancarlofrigerio5352
@giancarlofrigerio5352 Жыл бұрын
Hi! Thanks a lot fpr the video!! Can you help me write the code to connect the bot to real exchanges please?
@shaikazaruddin45
@shaikazaruddin45 Жыл бұрын
What is the initial amount should have in wallet to do this complete project
@jusquaddy5568
@jusquaddy5568 5 ай бұрын
how would i make the funds go back into my wallet at the end of the arbitrage ?
@Fansuri85
@Fansuri85 Жыл бұрын
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.
@Fansuri85
@Fansuri85 Жыл бұрын
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
@sherpya
@sherpya Жыл бұрын
@@Fansuri85 yes you always need native coin for the gas fee
@bakhshizade
@bakhshizade 6 ай бұрын
​@@Fansuri85have you been successful using this method?
@user-pv7xk9zr8d
@user-pv7xk9zr8d 11 ай бұрын
hello, i tried this on my vscode but am having issues deploying it
@aluranarveez9021
@aluranarveez9021 Жыл бұрын
Thanks lot
@bersmizaev307
@bersmizaev307 Жыл бұрын
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.
@saheb1009
@saheb1009 Жыл бұрын
Did you get the help?
@skgroupofficial6686
@skgroupofficial6686 Жыл бұрын
@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
@antonstauer6421 Жыл бұрын
bro thats testnet dai and usdc, doesnt cost u anything
@abulaizalaiz5993
@abulaizalaiz5993 Жыл бұрын
.
@roxanabraescu6180
@roxanabraescu6180 Жыл бұрын
Hi, great video. I want to ask is there a way to code a flashloan to take arbitrage from example binance to kucoin or is there a different name that I'm not familiar with for this example
@hugogonzalez1749
@hugogonzalez1749 Жыл бұрын
Yes there is. You have to grab the Binance contracts and look for their liquidity pool factory. Import the factory's interface as well as the liquidity pool's. Repeat for kukoin. On the backend you'll need to subscribe to both of their apis and query quotes for certain pairs. I recommend monitoring stable coins to make your like easier. If you use polygon, I highly recommend to use dydx or equalizer flashloans as they charge 0% fees will make million dollar trades viable. Anyways good luck
@CyberDTech
@CyberDTech 6 күн бұрын
yes there is.
@user-br9ey1be6i
@user-br9ey1be6i 9 ай бұрын
Very helpful video, thank you bro. Just a noob question though. The 10% discount for the DAI, I assume it depends on the price of DAI right? I mean we can't enforce the 10% discount on DAI, it just depends on what the DAI's price at the time we want to arbritage them? So the 10% is purely for tutorial purposes not the real situation? Thank you again for the great video.
@BlockExplorerMedia
@BlockExplorerMedia 8 ай бұрын
Yes, the 10% is just for tutorial purposes so I can have a controlled way to demonstrate how an arbitrage would work. In the wild, you'd have to find a real arbitrage opportunity by comparing token values across different DeFi protocols or DEXes.
@user-br9ey1be6i
@user-br9ey1be6i 7 ай бұрын
@@BlockExplorerMedia Got it. Thank you.
@cryptoji1303
@cryptoji1303 3 ай бұрын
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...
@CyberDTech
@CyberDTech 6 күн бұрын
yes we can
@samuelnqai6037
@samuelnqai6037 Жыл бұрын
hi block explorer can i use it on mainnet
@126Natethegreat
@126Natethegreat Жыл бұрын
Infinite money glitch. Jk, loved the tutorial!
@BlockExplorerMedia
@BlockExplorerMedia Жыл бұрын
I'm still looking for that glitch ; ) thanks!
@realentertainers7655
@realentertainers7655 Жыл бұрын
hi, please can you code for arbitrage only without the flashloan?
@krissradev6708
@krissradev6708 4 ай бұрын
can i use python instead of js? or it will be slow
@leomartinez6667
@leomartinez6667 Жыл бұрын
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
@leomartinez6667
@leomartinez6667 Жыл бұрын
Fixed it. Was using the wrong endpoint...
@BlockExplorerMedia
@BlockExplorerMedia Жыл бұрын
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.
@ramyachalla5306
@ramyachalla5306 Жыл бұрын
@@leomartinez6667 could you please elaborate how you fixed this?
@jims7089
@jims7089 Жыл бұрын
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.
@rajmandaliya942
@rajmandaliya942 Жыл бұрын
@@leomartinez6667 How do you set end point? Any syntax?
@cryptobambino4401
@cryptobambino4401 Жыл бұрын
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
@jm7990
@jm7990 Жыл бұрын
Use v3 of the USDC faucet token, I was using v2 and it was giving me gas failure errors
@baronsonics
@baronsonics Жыл бұрын
address private dexContractAddress = in the flasloanarbitrage.sol is self deployed test contract? Or are we using the address in the video
@Money_Science
@Money_Science 3 ай бұрын
Hi can we deploy mev on unisawap borrowed eth from ave
@AllJokesAsideBenKirby
@AllJokesAsideBenKirby Жыл бұрын
Will this work on Polygon network?
@gavan2410
@gavan2410 3 ай бұрын
Considering the ETH gas fees, is it possible to make any money at all doing this??
@ShimoriUta77
@ShimoriUta77 2 ай бұрын
For real, I think not.
@funnycartoon6235
@funnycartoon6235 Жыл бұрын
sir, can you make eth frontrunning smart contract?
@jordanwhitfield8429
@jordanwhitfield8429 Жыл бұрын
quick question did the 110 DAi go to the wallet?
@BlockExplorerMedia
@BlockExplorerMedia Жыл бұрын
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.
@armaniallie8547
@armaniallie8547 11 ай бұрын
Goerli testnet is deprecated. Is there a dex.sol anybody has for Sepoli with liquidity?
@JackBNimbletradez
@JackBNimbletradez 3 ай бұрын
Undeclared identifier line 39 column 5. Pool variable is undeclared. How do I fix?
@pokiito9140
@pokiito9140 9 ай бұрын
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
@cybertrade7908
@cybertrade7908 5 ай бұрын
I get the same issue on deployment: "flashLoan.deployed is not a function" - any ideas what is causing that 'revert'?
@hazelcham3le0n1
@hazelcham3le0n1 Жыл бұрын
This is fucking amazing
@lgprabanjan7560
@lgprabanjan7560 Жыл бұрын
bro can i excecute on this in mainnet and earn money bro will it work now
@royanhilmy5446
@royanhilmy5446 4 ай бұрын
i cant inherit from FlashLoanSimpleReceiverBase .. it even didnt show on emmet
@evansfaso9715
@evansfaso9715 Жыл бұрын
Is this a testnet transaction or mainnet
@ABCDEFGH-or2eb
@ABCDEFGH-or2eb 6 ай бұрын
5:53 How come you’re not getting errors when trying to install Hardhat?
@heldersantos4935
@heldersantos4935 Ай бұрын
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?
@unfortunately3435
@unfortunately3435 Жыл бұрын
Were did the profit go ? U showed it via the get balance but not the wallet itself can u explain it to me?
@sacredsoundsmeditation
@sacredsoundsmeditation Жыл бұрын
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.
@user-wk5rn9lv5m
@user-wk5rn9lv5m Жыл бұрын
@@sacredsoundsmeditation can u send me one?
@jm7990
@jm7990 Жыл бұрын
use the function withdraw() that is in the FlashLoan contract. Probably a button on Remix.
@stanislav5262
@stanislav5262 2 ай бұрын
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?
@jakerich6531
@jakerich6531 Жыл бұрын
No more getting scammed for me thank you thank you thank you!
@bitsbytes5069
@bitsbytes5069 Жыл бұрын
dont get the sol to compile in remix. those imports are not working it seems 3 parse errors
@nathangandawa3034
@nathangandawa3034 Ай бұрын
Hey, can this be done in BSC?
@TheGaneshshow
@TheGaneshshow Жыл бұрын
Hi sir, @31.32 seconds Why we should send USDC to contract? Thank you sir.
@BlockExplorerMedia
@BlockExplorerMedia Жыл бұрын
There is a small fee that Aave charges for flash loans (currently 0.09%) so we need to have at least that amount in the contract to cover the fee or else the transaction will be reverted.
@BlockExplorerMedia
@BlockExplorerMedia Жыл бұрын
Needs to be covered either by initial deposit or successful arbitrage.
@TheGaneshshow
@TheGaneshshow Жыл бұрын
@@BlockExplorerMedia Got it. Thank you very much sir.
@ashishjanghel9340
@ashishjanghel9340 Жыл бұрын
@@BlockExplorerMedia Since we are gaining profit at the end of the transaction but as i checked the same amount of USDC is also getting drained from the Dex contract...that means eventually we are earning zero ??? Can you please explain sir whats happenning......
@mahto9329
@mahto9329 8 ай бұрын
You're explaining it in an awsome way, but i still managed to get confused 😅 which private key should we put in the env file ? The deployer's private key??! Also what endpoint can I use to interact with polygon main net? 🤔
@praghav1988
@praghav1988 8 ай бұрын
Hey did you got any result for this! Even I am stuck hear
@mahto9329
@mahto9329 8 ай бұрын
@@praghav1988 I think that the private key and endpoint are only used in the local testing environment (locally simulated blockchain) and that when really deploying the contract to a testnet or a main net we won't need them as the browser wallet will handle those, normally.. Not 100% sure though.. it doesn't make sense to give a private key of a real wallet while we will do all the approvals and signing manually through metamask while using the contract.. Metamask will handle the rpc endpoint too.. Plus the env file won't be deployed with the contract anyway..
@mahto9329
@mahto9329 8 ай бұрын
@@praghav1988 anyway it should be the private key of the deployer address, a fake wallet for hardhat to simulate signing...
@BlockExplorerMedia
@BlockExplorerMedia 8 ай бұрын
Yes, it's the private key for the account that you want to use to deploy the smart contract. You can find the Polygon mainnet endpoint in your Infura account under dashboard > endpoints. It should look like this: polygon-mainnet.infura.io/v3/{API_KEY}
@BlockExplorerMedia
@BlockExplorerMedia 8 ай бұрын
Yes, never deploy your .env file anywhere over the internet because that would expose your private key and allow anyone who has it to control your wallet. You normally do deployments from your local dev env anyways, so no need to have the env file anywhere but on yur local machine. You would use the Hardhat config with network endpoint and private key for both testnet and mainnet deployments - it works exactly the same way, just different endpoint.
@danieladdison6373
@danieladdison6373 4 ай бұрын
I have a question. I notice at the beginning when you ran the aave packages with the dotenv package, the env package populated. When I ran the aave packages with the dotenv package, it didn't populate. Anyone know why that is?
@blindperdition4931
@blindperdition4931 3 ай бұрын
.env files are private files that hold secret information so they don’t get committed to repos. I checked the GitHub project and there is a .env.example so you could just clone the repo and rename the .env.example file to just .env
@hazelcham3le0n1
@hazelcham3le0n1 Жыл бұрын
So does this only work on the Goerli test network? Does it work on the actual Ethereum network?
@CyberDTech
@CyberDTech 6 күн бұрын
yes it does
@joseph5058
@joseph5058 Жыл бұрын
great tutorial would be nice tho if we could get a mainnet tutorial on the arbitrage
@QuentinBSmith
@QuentinBSmith Жыл бұрын
Yeah I want the same
@CyberDTech
@CyberDTech 6 күн бұрын
yes its available
@darkknightpepe
@darkknightpepe Жыл бұрын
Is there a guide to use this on mainnet? Would I need a node running? Thanks
@CyberDTech
@CyberDTech 6 күн бұрын
yes I can help with that
@cryptoBlockchainDev
@cryptoBlockchainDev 2 ай бұрын
Is that solidity codes?
Aave Flash Loan Tutorial - Finding Arbitrage
17:20
Patrick Collins
Рет қаралды 175 М.
КАРМАНЧИК 2 СЕЗОН 5 СЕРИЯ
27:21
Inter Production
Рет қаралды 584 М.
КАРМАНЧИК 2 СЕЗОН 6 СЕРИЯ
21:57
Inter Production
Рет қаралды 411 М.
小路飞姐姐居然让路飞小路飞都消失了#海贼王  #路飞
00:47
路飞与唐舞桐
Рет қаралды 95 МЛН
КАКОЙ ВАШ ЛЮБИМЫЙ ЦВЕТ?😍 #game #shorts
00:17
No-Code Flashloan: Create a Flashloan with NO CODING
11:02
EatTheBlocks
Рет қаралды 85 М.
How to Become a Blockchain Developer
25:33
Block Explorer
Рет қаралды 52 М.
How to Make a Flash Loan Using Aave V3
18:47
QuickNode
Рет қаралды 11 М.
ERC20 Token Tutorial | Create Your Own Cryptocurrency
1:13:56
Block Explorer
Рет қаралды 124 М.
Anaconda (Conda) for Python - What & Why?
26:10
Academind
Рет қаралды 216 М.
Build and Deploy a Modern Web 3.0 Blockchain App | Solidity, Smart Contracts, Crypto
3:13:48
Дени против умной колонки😁
0:40
Deni & Mani
Рет қаралды 9 МЛН
#miniphone
0:18
Miniphone
Рет қаралды 11 МЛН
Which Phone Unlock Code Will You Choose? 🤔️
0:14
Game9bit
Рет қаралды 12 МЛН