No video

Flash Loan Arbitrage | Aave Flash Loan Tutorial

  Рет қаралды 141,613

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/jsp...
Aave v3 Flash Loan documentation:
docs.aave.com/...
docs.aave.com/...
DAI-TestnetMintableERC20-Aave token (Goerli):
0xDF1742fE5b0bFc12331D8EAec6b478DfDbD31464
USDC-TestnetMintableERC20-Aave token(Goerli):
0xA2025B15a1757311bfD68cb14eaeFCc237AF5b43
AAVE PoolAddressProvider (Goerli):
0x5E52dEc931FFb32f609681B8438A51c675cc232d
Get Goerli test Eth here:
faucets.chain....
Get test ERC20 tokens here:
staging.aave.c...
Remix imports:
import {FlashLoanSimpleReceiverBase} from "github.com/aav...";
import {IPoolAddressesProvider} from "github.com/aav...";
import {IERC20} from "github.com/aav...";
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

Пікірлер: 428
@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 9 ай бұрын
@@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 10 ай бұрын
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 6 ай бұрын
Yeah, this dude, absolutely, rocks.
@bxmoreno1988
@bxmoreno1988 6 ай бұрын
@@BlockExplorerMedia brother can you mentor me I signed up to your Patreon and saw it had no videos 😂 But this video is gold literally
@JRis44
@JRis44 29 күн бұрын
So with all the praise of this video. I'm assuming there was success in one of you creating flash loans?
@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
@lunalogicradio3555
@lunalogicradio3555 9 ай бұрын
the only tutorials where my adhd doesnt take over lolz,thank you
@ItsElMago
@ItsElMago 6 ай бұрын
still works the code?
@Dreadz530
@Dreadz530 11 ай бұрын
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 10 ай бұрын
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!
@jrsantos1737
@jrsantos1737 Жыл бұрын
hands down, the best ever flash loan arbitrage tutorial. thank you for detailed explanation.
@tamaraebiogosi9076
@tamaraebiogosi9076 Жыл бұрын
yup the first tutorial to actually work!!! Damn you're good
@zhaofour9833
@zhaofour9833 Жыл бұрын
Clear and amazing. Better than any related videos which gonna charge lots of $
@antonytoaquiza187
@antonytoaquiza187 Жыл бұрын
As someone who doesn't know anything about programming this looks titanically impossible, well this is going to be a long ride
@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?
@comosaycomosah
@comosaycomosah Жыл бұрын
Gosh you guys have the best tutorials 💯 seriously been so helpful
@jakovpavlov6268
@jakovpavlov6268 2 ай бұрын
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.
@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!
@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
@wenrui2554
@wenrui2554 5 ай бұрын
Hi how do i populate the infura goreli endpoint
@laurennoyb539
@laurennoyb539 5 ай бұрын
Are there any good videos on how to code this kind of thing? I haven't coded in almost 30yrs.
@andriikliuiko7267
@andriikliuiko7267 Жыл бұрын
thank you for your efforts in this video, know it really takes a lot of effort to make things end-to-end. Nice work!
@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
@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 2 ай бұрын
I can help with that.
@jerrywang3225
@jerrywang3225 Жыл бұрын
This is a really great tutorial, I am looking forward to your new content on this channel. Thanks
@sihledlamini6971
@sihledlamini6971 7 ай бұрын
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?
@dominiciyasele9865
@dominiciyasele9865 Ай бұрын
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?
@gilliangertse4796
@gilliangertse4796 5 ай бұрын
Hi. Is it possible to fund the contract with less than 1500? If so, what is the minimum?
@onostv9175
@onostv9175 Жыл бұрын
Thanks bro, best flashloan tutorial I have ever watched
@sergiofarias1648
@sergiofarias1648 Ай бұрын
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
@Bella-nz6go
@Bella-nz6go 3 ай бұрын
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?
@SnapDragon6101
@SnapDragon6101 4 ай бұрын
Do i need to write that smart contract to do flash loan arbitrage on Aave?
@Supercool7042
@Supercool7042 Жыл бұрын
THIS IS GREAT . .please make more tutorial on Defi ..
@salemabualem
@salemabualem 3 ай бұрын
how can i execute the contract on real network ?
@Sianae
@Sianae 10 ай бұрын
Best explanation ever on executing a flashloan in KZfaq by the way Did you recieved usdc in metamask wallet end of it ??? Please reply I'm eagerly waiting for you reply 😊
@shaikazaruddin45
@shaikazaruddin45 Жыл бұрын
What is the initial amount should have in wallet to do this complete project
@user-pv7xk9zr8d
@user-pv7xk9zr8d Жыл бұрын
hello, i tried this on my vscode but am having issues deploying it
@JackBNimbletradez
@JackBNimbletradez 5 ай бұрын
Undeclared identifier line 39 column 5. Pool variable is undeclared. How do I fix?
@pneptune5851
@pneptune5851 3 ай бұрын
Thank you it worked, take care!
@sometimesalways1259
@sometimesalways1259 Жыл бұрын
token's address faucet different with token's address borrow and repay such as DAI or USDC, how can I fix it?
@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 9 ай бұрын
​@@Fansuri85have you been successful using this method?
@snehamandal5376
@snehamandal5376 Жыл бұрын
sir can't we perform arbitrage on test net directly without using the dex contract??
@WesleySouza-bm3ee
@WesleySouza-bm3ee Жыл бұрын
Can I use the bsc network?
@ivanlagade
@ivanlagade Жыл бұрын
Wow.. You've nailed it. Thanks for sharing this educ. video.
@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 2 ай бұрын
yes its available
@dominiciyasele9865
@dominiciyasele9865 Ай бұрын
@@CyberDTech where pls?
@satria22138
@satria22138 Ай бұрын
thanks bro full value
@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 11 ай бұрын
Did you tried using on Mainet and did it worked ??
@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
@126Natethegreat
@126Natethegreat Жыл бұрын
Infinite money glitch. Jk, loved the tutorial!
@BlockExplorerMedia
@BlockExplorerMedia Жыл бұрын
I'm still looking for that glitch ; ) thanks!
@Isaac-Ft3
@Isaac-Ft3 8 күн бұрын
Hi love your video, can we hold assests that we buy using flash loans for a longer period like 2 3 months
@ertugrulgazihalimasultanes3950
@ertugrulgazihalimasultanes3950 12 күн бұрын
thanks for this video but kindly make a video for uniswap and pancakswap exchange for trade
@luce36
@luce36 Жыл бұрын
Shouldnt we need to use some thing like chainlink to get pricefeeds to calculate DexA rate and DexB rate
@abinashburman4622
@abinashburman4622 Жыл бұрын
I have a question, did u take arbitrary dexRate? If yes then is it possible to set arbitrary dexRate in mainnet ???
@danielmwangi3362
@danielmwangi3362 Жыл бұрын
Outstanding video💥🔥⚡⚡🔥💥
@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
@MrMike44v
@MrMike44v Жыл бұрын
Great tutorial, now i was wondering if you can make it with DODO or DYDX
@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
@quantaraum
@quantaraum Жыл бұрын
how did you get used on goerli? I can't find a goerli faucet for usdc
@CryptoWizards
@CryptoWizards Жыл бұрын
Excellent video!
@LORDUPAKO
@LORDUPAKO Жыл бұрын
Thank you for the excellent tutorial. Does the test wallet require any funds prior to execution of the script?
@johnnyrockyhorror5253
@johnnyrockyhorror5253 2 ай бұрын
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 🙏
@Silvervalist
@Silvervalist 5 ай бұрын
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?
@gavan2410
@gavan2410 6 ай бұрын
Considering the ETH gas fees, is it possible to make any money at all doing this??
@ShimoriUta77
@ShimoriUta77 5 ай бұрын
For real, I think not.
@randyseff9252
@randyseff9252 Жыл бұрын
Great video, thanks one million. Going to try it and add another comment. Peace out fam
@jakerich6531
@jakerich6531 Жыл бұрын
No more getting scammed for me thank you thank you thank you!
@user-qf4rz7xp1f
@user-qf4rz7xp1f Жыл бұрын
very good!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@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?
@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.
@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
@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?
@McGyans
@McGyans Ай бұрын
can you automate the approval process so it acts as a stand alone bot
@dadsquad_8914
@dadsquad_8914 19 күн бұрын
That’s a whole different thing and a lot of bot coding but yes you can
@SnapDragon6101
@SnapDragon6101 5 ай бұрын
I thought aave flashloan does not need coding
@stanislav5262
@stanislav5262 5 ай бұрын
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?
@piccadilly0x
@piccadilly0x Жыл бұрын
This is brilliant, thank you
@pokiito9140
@pokiito9140 Жыл бұрын
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 8 ай бұрын
I get the same issue on deployment: "flashLoan.deployed is not a function" - any ideas what is causing that 'revert'?
@TheGaneshshow
@TheGaneshshow Жыл бұрын
Hi sir, I have few noble requests: 1.Uniswap project 2.opensea project 3.Aave project Please make videos. Thank you in advance.
@BlockExplorerMedia
@BlockExplorerMedia Жыл бұрын
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?
@TheGaneshshow
@TheGaneshshow Жыл бұрын
@@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.
@BlockExplorerMedia
@BlockExplorerMedia Жыл бұрын
Got it. Ok I will definitely be digging deeper into Aave. Thanks for your support : )
@shavelmaurrasse2665
@shavelmaurrasse2665 Жыл бұрын
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
@omega3fatass61
@omega3fatass61 Жыл бұрын
that's a whole other rabbit hole. extremely complex. minimum I've seen a bot for sale doing this was $20,000
@abulaizalaiz5993
@abulaizalaiz5993 Жыл бұрын
.
@praveenmatheesha4394
@praveenmatheesha4394 Жыл бұрын
$17000 i have
@thedemonlord300
@thedemonlord300 11 ай бұрын
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.
@heldersantos4935
@heldersantos4935 3 ай бұрын
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?
@dogmaticent
@dogmaticent 4 ай бұрын
Can I use this for the balancer protocol ? Please I will appreciate your help on this
@daniel7007
@daniel7007 Жыл бұрын
AWESOME!!!
@FunDumb
@FunDumb Жыл бұрын
I really wish I knew what all of this was. OR how to implement it. This needs to brew in my head like a pot of kimchi.
@thedemonlord300
@thedemonlord300 11 ай бұрын
start from the basics.
@royanhilmy5446
@royanhilmy5446 6 ай бұрын
i cant inherit from FlashLoanSimpleReceiverBase .. it even didnt show on emmet
@cryptoji1303
@cryptoji1303 6 ай бұрын
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 2 ай бұрын
yes we can
@justsavvysnipes
@justsavvysnipes 5 ай бұрын
I am getting an error saying invalid project id when trying to run the code. Anyone have any solutions ?
@kman009
@kman009 5 ай бұрын
If I need to pay gas fees to get money from the faucet it defeats the purpose of using the faucet the gas fees are too high
@chandanmaka5498
@chandanmaka5498 Жыл бұрын
Amazing video
@bitsbytes5069
@bitsbytes5069 Жыл бұрын
dont get the sol to compile in remix. those imports are not working it seems 3 parse errors
@aaronliruns
@aaronliruns 9 ай бұрын
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 8 ай бұрын
The inital deposit is the collateral fees. In case you can't afford to pay back the amount borrowed. Nothing is free
@Samsonit50
@Samsonit50 4 ай бұрын
But your supposed to be able to borrow without collateral! This is how flash loans are spoken about 🤣
@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 Жыл бұрын
Goerli testnet is deprecated. Is there a dex.sol anybody has for Sepoli with liquidity?
@TheGaneshshow
@TheGaneshshow Жыл бұрын
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.
@BlockExplorerMedia
@BlockExplorerMedia Жыл бұрын
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).
@TheGaneshshow
@TheGaneshshow Жыл бұрын
@@BlockExplorerMedia Thank you sir. Your Patience is a blessing to us.
@BlockExplorerMedia
@BlockExplorerMedia Жыл бұрын
Most welcome : )
@LOC2210
@LOC2210 7 ай бұрын
How profit did you get? there are still some opportunities on Market Now?
@alkindivv
@alkindivv 7 ай бұрын
can you make a bot that use wormhole or layerzero protocol to do cross chain arbitrage?
@CyberDTech
@CyberDTech 2 ай бұрын
yes I can
@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 Жыл бұрын
.
@dominiciyasele9865
@dominiciyasele9865 Ай бұрын
@@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?
@ABCDEFGH-or2eb
@ABCDEFGH-or2eb 8 ай бұрын
5:53 How come you’re not getting errors when trying to install Hardhat?
@pendingdownload
@pendingdownload 9 ай бұрын
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.
@andresm9051
@andresm9051 2 ай бұрын
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.
@danieladdison6373
@danieladdison6373 7 ай бұрын
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 6 ай бұрын
.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
@TheGaneshshow
@TheGaneshshow Жыл бұрын
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.
@BlockExplorerMedia
@BlockExplorerMedia Жыл бұрын
'executeOperation' is called by the Aave pool, atfer we call 'requestFlashLoan', after it performs some basic checks.
@TheGaneshshow
@TheGaneshshow Жыл бұрын
@@BlockExplorerMedia Thank you very much sir. Got it.
@THEBHIMACADEMY
@THEBHIMACADEMY Жыл бұрын
​@@BlockExplorerMedia can you explain in more detail, like, can we call the "execute operation" manually?
@roguerepublic1460
@roguerepublic1460 5 ай бұрын
Awesome video. It’s just when I type npx hardhat , I see a message in red: the term ‘npx’ Is not recognized
@CyberDTech
@CyberDTech 2 ай бұрын
you need to install it
@lucaahrenbeck9081
@lucaahrenbeck9081 Жыл бұрын
Great video, can i also use a bigger Flash loan of like 100k or 1mil and make more profit?
@dominiciyasele9865
@dominiciyasele9865 Ай бұрын
Hey bro, did you use this on the mainnet and if yes, did you get some profits?
@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
@kevbo75149
@kevbo75149 Жыл бұрын
ok correct me if I am wrong. You sent the contract 1500 USDC and 1500 DAI. That equaled to 3000. You then borrowed 1000 USDC. Where did the extra tokens go from the contract? You lost 2890 coins. It would of been cheaper to just perform the arbitrage yourself.
@gilliangertse4796
@gilliangertse4796 5 ай бұрын
Makes no sense. Im also waiting for a response from the creator of this vid/contract
@AsadAli-ye8ns
@AsadAli-ye8ns 2 ай бұрын
these days there are some peoples making 5k with just 400$??? so i dont understand why your profit was very less
@mrshephu
@mrshephu Жыл бұрын
thanks for this dude
@BlockExplorerMedia
@BlockExplorerMedia Жыл бұрын
No problemo!
@juliansiuksta2805
@juliansiuksta2805 Жыл бұрын
Cant withdraw my 94 USD from Cefax, unless I pay 150? Some crap about verification, Scam?
ERC20 Token Tutorial | Create Your Own Cryptocurrency
1:13:56
Block Explorer
Рет қаралды 134 М.
Look at two different videos 😁 @karina-kola
00:11
Andrey Grechka
Рет қаралды 13 МЛН
Stay on your way 🛤️✨
00:34
A4
Рет қаралды 32 МЛН
Bony Just Wants To Take A Shower #animation
00:10
GREEN MAX
Рет қаралды 6 МЛН
FREE No Code Flash Loan Arbitrage Bot! TRADE INSTANTLY
9:08
HustleMedia
Рет қаралды 38 М.
Aave Flash Loan Tutorial - Finding Arbitrage
17:20
Patrick Collins
Рет қаралды 178 М.
Why Agent Frameworks Will Fail (and what to use instead)
19:21
Dave Ebbelaar
Рет қаралды 43 М.
Build a RAG Based LLM App in 20 Minutes! | Full Langflow Tutorial
24:03
Aave Tutorial (How to Lend & Borrow Crypto on Aave)
16:26
MoneyZG
Рет қаралды 17 М.
Top 10 FREE OSINT tools (with demos) for 2024 - And FREE OSINT course!
1:08:19
Look at two different videos 😁 @karina-kola
00:11
Andrey Grechka
Рет қаралды 13 МЛН