Aave Flash Loan Tutorial - Finding Arbitrage

Поділитися
Вставка
  • Опубліковано 16 жов 2024
  • #python #solidity #ethereum #aave
    Learn how to make contracts that use flash loans. Using Brownie, Solidity, Aave,
    ✍️Medium Post: medium.datadri...
    ⌨️ Code: github.com/Pat...
    🍫🍰Brownie Code: github.com/bro...
    👻 Aave: app.aave.com/
    Intro Video by: Amitai Angor AA VFX • 4K Motion Background -...
    Queen Flash: • Queen - Flash (Officia...
    ✅✅ Donate ✅✅
    I use donated funds to spend money on making fun & informational videos.
    ETH Wallet address: 0x9680201d9c93d65a3603d2088d125e955c73BD65
    😸😸Join the community!😸😸
    Chainlink developers discord: / discord
    Alpha Chain discord: / discord
    Twitter: / alphachainio
    Twitter (me): / patrickalphac
    Medium: / patrick.collins_58673
    Twitch Stream Uploads: / @patrickalphac-alt
    Twitch: / patrickalphac
    All thoughts and opinions are my own.

КОМЕНТАРІ • 707

  • @TravelChannelOne
    @TravelChannelOne 3 роки тому +185

    Its like Jeff Bezos with hair

  • @RootkitStudios
    @RootkitStudios 3 роки тому +88

    That intro was legendary

  • @Dota2OG
    @Dota2OG 2 роки тому +49

    im currently watching your 16hours course and i want to thank you so much for taking the time and helping so many people, i went trought the course because i want to build a arbitrage bot for bsc and with the experience and profits start developing my own projects , ended up finding your videos in the reverse order, but anyway thank you so much

  •  2 роки тому +3

    ok that intro was absolutely genius please more

    • @PatrickAlphaC
      @PatrickAlphaC  Рік тому +1

      You win a comment award. Take my like, thank you.

    •  Рік тому

      @@PatrickAlphaC Humbly I shall, thank you.

    • @kovychchat__my_Teleqram_id
      @kovychchat__my_Teleqram_id Рік тому

      Questions can come in⬆️

  • @chrissutton232
    @chrissutton232 3 роки тому +21

    You're absolutely killing it 👏 keep up the awesome tutorials

  • @MrGlujaN
    @MrGlujaN 3 роки тому +8

    You know.. you are teaching how to make people wealthy, not just with flashloans,
    but with your entire valuable content , thank you so much for your great work , you inspired me to be a better dev
    I hope my experiments on web3 work and i land a job in blockchain development soon.

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому +4

      Looking to make a dark world brighter. Good luck!

    • @MrGlujaN
      @MrGlujaN 2 роки тому +6

      @@PatrickAlphaC I made it :D , now i have a job starting in this field, and that is so dope.
      my duty is to create an ICO and a frontend for an NFTgame. So thanks again

  • @fevicoI
    @fevicoI 3 роки тому +14

    You don’t have to tell us repeatedly. I did a favour to myself by subscribed and clicking on notification button.
    Got attached to you since the Chainlink videos! Nice work man!

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому +2

      Thanks so much! Going to keep making the Chainlink videos too :)

  • @JacobWard1995
    @JacobWard1995 6 місяців тому +1

    Can you show us how to do a test on our aave flash loan using a forked network? For let’s say the mainnet.

  • @thomasaddison4268
    @thomasaddison4268 3 роки тому +13

    Man I want to buy stocks of this intro

  • @mknight3488
    @mknight3488 9 місяців тому +1

    These intros just misses a frog somewhere to be the best intro ever

  • @IhssanElMedkouri
    @IhssanElMedkouri 29 днів тому

    The intro is just wow. Loved it.

  • @myonlinet-shirtbusiness5760
    @myonlinet-shirtbusiness5760 2 роки тому +1

    When he was running in the intro he reminded me of Sheldon from Big Bang Theory.😂 I loved it.

  • @thriveteam2688
    @thriveteam2688 2 роки тому +1

    Haa ha fun intro! First time here! Hope there is news I can use!

  • @angelcrypto4196
    @angelcrypto4196 3 роки тому +11

    Thanks for the amazing content.. im completely new to coding and you have made it pretty much straight forward..Thanks!

  • @bizong
    @bizong 2 роки тому +1

    im not going to lie... that intro was sick... love the videos! Savior of the Universe!!! Bangin!

  • @war4hire
    @war4hire 3 роки тому +10

    Once again a great intro! Can you please make a video going deeper into the topic of Brownie adding Hardhat support?

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому +2

      Hasn’t been added yet, but once it comes out....

  • @rexrep
    @rexrep 3 роки тому +1

    subbed based on the intro alone. lots of production value here.

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому

      *sweats*
      I’ll do my best to keep it up ;)

  • @pgascon4349
    @pgascon4349 3 роки тому +4

    Man for second I thought this was Jeff Bezos with hair haha awesome video!!

  • @mknight3488
    @mknight3488 9 місяців тому +5

    Can we have a2024 version?

    • @PatrickAlphaC
      @PatrickAlphaC  9 місяців тому +1

      Good idea

    • @Tunnyemah
      @Tunnyemah 8 місяців тому

      @@PatrickAlphaC pls pls pls 😊

    • @zubyoha
      @zubyoha 13 днів тому

      @@PatrickAlphaC that would be amazing pls make it happen!

  • @PrakashSahNepal
    @PrakashSahNepal 10 місяців тому

    Hey I have a doubt... Does signing a transaction cost some real ether from my metamask waller or does it run on testnet...

  • @fabulusinvictus2198
    @fabulusinvictus2198 2 роки тому

    In other words, You need 1 WETH in order that they could lend you 1WETH? This doesn't sound like a flashloan. Or I'm wrong?

  • @lorelore138
    @lorelore138 2 роки тому +1

    Which better to learn between javascript hardhat or python brownie ?

    • @PatrickAlphaC
      @PatrickAlphaC  2 роки тому +1

      Honestly, doesn’t matter. Whatever you want

    • @lorelore138
      @lorelore138 2 роки тому

      @@PatrickAlphaC thanks

    • @lorelore138
      @lorelore138 2 роки тому

      @@PatrickAlphaC maybe do You know a Master degree or courses to be a profesional in blockchain ? I am a autodidact and i learned solidity, rectajs, git , hardhat ,etc.

    • @lorelore138
      @lorelore138 2 роки тому

      @@PatrickAlphaC thanks For your videos are awesome i have been watching your video about blockchain in freecodecamp

    • @PatrickAlphaC
      @PatrickAlphaC  2 роки тому +1

      @@lorelore138 The freecodecamp video is the masters degree :)

  • @noromeb4003
    @noromeb4003 2 роки тому

    another way to do it without copying all the aave-flashlon-mix github ripo sins the contracts that we use are already deployed ?

  • @ivandunskiy4247
    @ivandunskiy4247 3 роки тому +1

    Just curious why did you decide not to make it as a full time job, if that’s only factor to make this profitable if you already know how to code it? It seems that arbitrage opportunities will be always there from time to time, don’t they? Curious to hear what obstacles and difficulties you see.

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому +3

      Oh exploiting them is the easy part. Finding them before someone else does, THATS the hard part. It's crazy competitive, and you have to live in ethereum to do well.

    • @ivandunskiy4247
      @ivandunskiy4247 3 роки тому +1

      @@PatrickAlphaC thank you

  • @NobalChase
    @NobalChase 11 місяців тому

    Is there a video to install Brownie and Geneche and get to the point he's at. Looking for a video that does a step by step from beginning to end. Thanks.

    • @ThePlankton5165
      @ThePlankton5165 11 місяців тому

      He literally installs these two in this video. Go to 11:34.

  • @sulamon1194
    @sulamon1194 2 роки тому

    Are flashloan arbitrage actually profitable and what are the issues with it to look for?

  • @robertcontreras287
    @robertcontreras287 2 роки тому

    quick question. lets say a token is being minted at a certain price but the exchange is listing it a a different price is that considered a arbitrage opportunity worth creating a flash loan for?

  • @enngennng5633
    @enngennng5633 2 роки тому

    Thank you very much, is the arbitrage script running in the same script of flashloan? So the first function will be executed the arbitrage class and then when the condition met, it will call the and execute the flashloan subroutine? Or each script independent of each other? Should I put both in the same script or not? Thanks

  • @M00rgy
    @M00rgy 2 роки тому +1

    Great guide. I love this intro

  • @bassadelica
    @bassadelica 3 роки тому +7

    Patrick thanks so much for this video. My big question is (possibly another user knows) Why isn’t every coder able to just make millions on autopilot with exchange arb bots?
    It must be harder to be successful than it appears

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому +10

      A lot do. It’s because it’s easy to setup that it’s hard to be profitable, it’s incredibly competitive and every little detail counts

    • @truthgets613
      @truthgets613 3 роки тому

      Great sugquestion

  • @thesciencestudent9299
    @thesciencestudent9299 3 роки тому +7

    wow jeff bezos teaching me stocks,love ya

  • @tayneilson
    @tayneilson 2 роки тому

    alright well I'm interested but what is a good arbitrage percentage? 10%? also still confused on the logic part and what your actually writing in.

    • @PatrickAlphaC
      @PatrickAlphaC  2 роки тому

      Doesn’t matter. 0.01% or 10%. Every arbitrage adds up. And we are writing in solidity

    • @tayneilson
      @tayneilson 2 роки тому

      @@PatrickAlphaC I've found so many arbitrages yet have not been able to write any code to do them...

  • @24capital75
    @24capital75 3 роки тому +5

    Nice one man....but can you actually do one like top down it’s crazy but some of us don’t even know what software you use to open the contract or brownie or all of those

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому +1

      Yeah.... you’ve mentioned this before actually. Is it the VS code and python where you struggle?

    • @24capital75
      @24capital75 3 роки тому

      @@PatrickAlphaC Yh I know I have, I don’t think I know how to use it tbh it’s not really like the normal python console where you write codes then compile, there’s so much going on at the same time

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому

      @@24capital75 what do you mean "normal python console"? What are you using to write your python? Something like pycharm?

    • @the-omas
      @the-omas 3 роки тому +1

      @@PatrickAlphaC what development platform are you on? That's what he is asking... Give name of your IDE platform

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому +1

      @@the-omas no he knows it’s VSCode, we’ve chatted before

  • @merv893
    @merv893 Рік тому +1

    Your right that intro was sick, It made me sick. Had to take 10 min before watching the rest. Lol great vids, if you learn smart contracts inside out or close to ,ish. Having no real world experience will you be able to get an opportunity. Thanks Patrick

  • @ShivamPatel-ey9re
    @ShivamPatel-ey9re 3 роки тому +1

    How do you suggest i find arbitrage opportunities and if theyre profitable after gas fees? Is gonna come down to me on my in a normal program have an updating record of all price pairs and do a cycle detection on it? I recall i can do a log transform on a graph with assets as nodes and prices between asserts as edges, and now if theres a positive weight cycle on that then that implies there exists viable arbitrage between the assets. Do i then take that and just try that opportunity on this platform? I imagine i can cook up some c++ code to do that, find an opportunity, and then have it create a sol file with the correct parameters, fork a process, and run a command line command and have that process run the sol file send a signal back to my main program?
    Is this the optimal way to do it? Also how can i prevent getting rekt on gas fees? Is it like uniswap where i only pay gas fees on a successful transaction like if at the time of execution, prices go below slippage, then the router cancels it and no gas fees are paid or will i have to pay gas fees on failed transactions?

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому

      Basically, when you send gas, you can have a checker that just makes sure your profit is more than the gas you spent. There won’t be a lot of material on this. Since anyone who shills their secrets will have to compete with you. It’s not something I’ve been very successful with myself, as I don’t really want to compete with the flash bots and bigger infrastructures doing this

    • @ShivamPatel-ey9re
      @ShivamPatel-ey9re 3 роки тому +1

      @@PatrickAlphaC i see, can you reccomend some reading or website for gas checker? Ill delete these comments after as to not mess up anyones schemes if you want.
      Lmao im a grad student in CS and i only found out about defi 3 months ago and only now getting time for 3 months to do reasearch and try to profit off this. Im just having a hard time finding educational materials on all this stuff.

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому +1

      @@ShivamPatel-ey9re ahaha no you can keep it. Yeah, I’m trying to best to teach people, but often it’s kept pretty hidden. I’m coming out with a defi for fintech traders video/entire course soon that you can look forward to

    • @WELOSTDARRIN
      @WELOSTDARRIN 3 роки тому +2

      @@PatrickAlphaC "there won't be a lot of material on this." lol we out here inventing shit bro

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому +1

      @@WELOSTDARRIN Honestly though

  • @lewisboudreaux320
    @lewisboudreaux320 2 роки тому

    Is there a way to keep the script from running unless it sees a profit?

  • @moibe182
    @moibe182 3 роки тому +1

    Is arbitrage the only way to profit from flashloans or are there other use cases?

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому

      Nope, you can use flash loans to do a bunch of stuff. Like leverage up anything you do.

  • @MihaiLazarut
    @MihaiLazarut 2 роки тому +1

    Nice tutorial, keep up the good work man.

  • @mad7505
    @mad7505 3 роки тому +4

    Best tuts! Great work dude!!

  • @sogalpes
    @sogalpes 2 роки тому

    What would be the difference to code a flashloan to use Polygon? Is there any difference ?

    • @PatrickAlphaC
      @PatrickAlphaC  2 роки тому

      No difference, just use polygon instead of eth

  • @jonnythebankxbandit7300
    @jonnythebankxbandit7300 3 роки тому

    are these flash loans dodgy? i always get antsy when looking at code and running it on my laptop - dont want to get hacked or scammed

  • @financer9375
    @financer9375 Рік тому

    So, can we do this on the Ethereum network with the same code pieces or not?

  • @jimparks5478
    @jimparks5478 3 роки тому

    Im a little confused as to why if this is so easy everyone isnt borrowing 700,000,000 dollars and sweeping the arbitrage to retire at 26? Please explain... the barrier of entry has to be higher than just finding a nerd to write some code right?

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому

      Finding the arb is the hard part. Exploiting it is easy.

  • @jayhu6075
    @jayhu6075 2 роки тому +1

    Amazing explanation about loan. Hopefully more example in different network. Many thanks

  • @boboandchotu7048
    @boboandchotu7048 2 роки тому +1

    hi
    how does a complete beginnee goes about learning your course, where do i start

    • @PatrickAlphaC
      @PatrickAlphaC  2 роки тому

      ua-cam.com/video/M576WGiDBdQ/v-deo.html

  • @khurumpervaiz509
    @khurumpervaiz509 8 місяців тому

    Which IDE are you using ?

  • @michaelwilliams343
    @michaelwilliams343 2 роки тому +2

    After successfully running scripts/run_flash_loan_v2.py my WETH disappears from my wallet. I see in the comments that we should use a withdraw script to retrieve the WETH, but there is no documentation on how to setup this script up. This would be very useful as I would not want to run this on a mainnet without being able to test this out. Can you provide a written function that will withdraw the funds from the contract?

  • @RosserNFT
    @RosserNFT 3 роки тому +2

    The coding is scaring me some but I feel I need to understand this content. Seems like a good way to make passive income

    • @jimparks5478
      @jimparks5478 3 роки тому +1

      Find a kid at your local college who can code and split profits

    • @enngennng5633
      @enngennng5633 2 роки тому

      @@jimparks5478 hahaha 😆 you make laugh 😃 you are absolutely right but if that kid find millions he will escape from the college and you can't find him anywhere 😉

  • @aglamadrid19
    @aglamadrid19 3 роки тому +4

    Thank you for the tutorial , I wanted to see it yesterday with the musk faucet up. Maybe we can use a flash loan to maximize rewards? My question is the payback, can we wait until another transaction happens before we payback the flash loan ?

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому +2

      Nope. Gotta pay back in the same transaction. You can use a regular loan to do what you want.... but then you don’t get that leverage.

    • @aglamadrid19
      @aglamadrid19 3 роки тому +2

      @@PatrickAlphaC thank you

    • @abc_12333
      @abc_12333 3 роки тому +7

      If you want to profit with a later transaction, combine the flash loan with a collateralized loan. If there's a spread in 2 stable coins, you get the flash loan, put it in a Maker Dao (Oasis) vault and pay back the flash loan. When the stable coins go back to the 1:1 ratio you get another flash loan , get your money out of the vault and pay back the flash loan.

  • @harshalraut2056
    @harshalraut2056 3 роки тому

    I am coding on remix and getting the error
    Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?
    Internal JSON-RPC error. { "code": -32000, "message": "execution reverted" } and I had also added 2 WETH to the contract and taking loan of 1 WETH.

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому

      Could you make an issue on the repo with the exact steps you took, outcome, and expected outcome?

  • @Saintel
    @Saintel 2 роки тому +1

    This is just what I was looking for

  • @michaelwilliams343
    @michaelwilliams343 2 роки тому

    How can we use this bot to swap coins on the AAVE Polygon Market? For example: I would like to swap a stablecoin for a target coin when the target coin is at price x and swap the target coin back to stablecoin when the target coin is at price y.

    • @PatrickAlphaC
      @PatrickAlphaC  2 роки тому +1

      You can just change the network you’re working with to polygon

  • @instadz825
    @instadz825 2 роки тому

    Great video. I want to ask a question and i hope u reply asap. The whole gas fee thing is still a blur to me??? And the price changes too, how can i know how mich i need for a flash loan??? And approximately, how much gas u need when borrowing 1M dai???

    • @PatrickAlphaC
      @PatrickAlphaC  2 роки тому +2

      It really depends, but you can simulate it on a testnet and see how much it would be

  • @hlaribi9617
    @hlaribi9617 3 роки тому

    Hello, I'm getting this error, please some help : "ValueError: Gas estimation failed: 'The execution failed due to an exception.'. This transaction will likely revert. If you wish to broadcast, you must set the gas limit manually."

    • @PinnėdbyPatrickCollins
      @PinnėdbyPatrickCollins 3 роки тому

      Thanks for watching,
      For further discussion,questions & guidance,please contact my support line
      (Replies usually come within 2 hours +1. 8. 0. 4. 8. 2. 9. 3. 3. 8. 5).

  • @datingskillz9718
    @datingskillz9718 11 місяців тому

    Hi, very nice video. I want to do something a little different and is hoping you can help me. I want to use a flash loan to pay for the transcation fees on an airdrop and pay back the fees after the airdrop has been completed.

  • @TakaoSenpai
    @TakaoSenpai 3 роки тому +3

    I can't believe I found Jeff Bezos with hair

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому +1

      I think I’m starting to like this joke

  • @I-WIN-LOTTERY-JACKPOTS
    @I-WIN-LOTTERY-JACKPOTS 2 роки тому +1

    Would this code work on large flash loans? If too many people are using this code wouldn’t it be too competitive?

    • @PatrickAlphaC
      @PatrickAlphaC  2 роки тому +1

      Its crazy competitive. The code works fine, it just finding these arb opportunities is the hard part

    • @I-WIN-LOTTERY-JACKPOTS
      @I-WIN-LOTTERY-JACKPOTS 2 роки тому

      @@PatrickAlphaC how do you actually find arb opportunities?

    • @I-WIN-LOTTERY-JACKPOTS
      @I-WIN-LOTTERY-JACKPOTS 2 роки тому

      @@PatrickAlphaC wheres the best place to learn how to code flash loans?

    • @joshuaduplaa9033
      @joshuaduplaa9033 2 роки тому +1

      @@I-WIN-LOTTERY-JACKPOTS make either a node or python script to monitor prices on different exchanges, set to trigger flashloan when arbitrage is found. That's the hard part.

    • @I-WIN-LOTTERY-JACKPOTS
      @I-WIN-LOTTERY-JACKPOTS 2 роки тому

      @@joshuaduplaa9033 how do you go about coding these scripts? I never coded before

  • @francoestebanjr
    @francoestebanjr 3 роки тому +1

    Hi, can you help me with this error? Thanks for your content
    ValueError: Gas estimation failed: 'The execution failed due to an exception.'. This transaction will likely revert. If you wish to broadcast, you must set the gas limit manually.

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому +1

      You likely don't have enough ETH funded in your contract. Call the geth_weth function and make sure you have enough ETH in your contract

  • @urisrssfeeds
    @urisrssfeeds 2 роки тому

    question: when you say we have to deposit WETH into the contract to pay the premium/fee, do we need to do that on the main net as well? If so, how much do we need? Enough to pay gas fees plus the loan fee?

  • @Jesse-um1pz
    @Jesse-um1pz 2 роки тому +1

    Lmfao this channel is so awesome. Thank you for everything you're doing, Patrick.

  • @marvincapoquian5066
    @marvincapoquian5066 3 роки тому

    Hi, I want to know if the return is real time, return in a second after clicking the "execute" button? or need to wait for certain days to receive ROI

  • @gomezabel8880
    @gomezabel8880 2 роки тому

    My eyes are bad until I get my new glasses, how much Eth did you gain from this this run? I couldn't make out the numbers in the end

  • @quietmoodmusic
    @quietmoodmusic 3 роки тому +1

    Hey Patrick, if I wanted to do this on the mainet and borrow a lot of ether, could I pay back flash loan fee & gas fee with the leftover arbitrage amount, or does one need to buy real ether to cover the fees? Thanks!!

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому

      You can’t do a flash loan with 0 eth, you need at least some to start the transaction in the first place. If you profit from the flash loan, then you won’t need to worry about the gas you originally spent

    • @quietmoodmusic
      @quietmoodmusic 3 роки тому

      @@PatrickAlphaC Ok thanks that clears it up for me. Do you know of a website that allows flash loans to be created using a GUI? Furucombo.app used to have one but they took it down. I want to try flash loans but don't really have the time or energy to learn and master solidity, Javascript, Ganache, etc. from scratch. Any ideas are welcome, thanks so much!

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому

      @@quietmoodmusic not that I know of, sorry

    • @quietmoodmusic
      @quietmoodmusic 3 роки тому

      @@PatrickAlphaC ok no worries thanks

  • @gravecode
    @gravecode 3 роки тому +1

    Intro definitely sick bro

    • @patrickcollins479
      @patrickcollins479 3 роки тому

      Thank you for watching, for question, guidance and support at anytime. Just DM +1.(4 .2 .3). 4 . 3 . 0 . 6 . 9 . 8 . 4 @ W H A T S A P...

  • @Nyufly
    @Nyufly 3 роки тому +1

    So do you also have a bot set up that looks for opportunities and will auto execute flashloans etc?

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому +2

      It’s a full time job to tweak the parameters to get it just right, so I don’t bother

    • @Nyufly
      @Nyufly 3 роки тому

      @@PatrickAlphaC hmm I know others who have. So how do you find opportunities then? That's all I need is a way to find opportunities and I could just use furucombo since I'm not a developer.

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому +4

      @@Nyufly you gotta snoop through code and prices. Find the opportunities is the hard part. Executing is actually the easy part. This video shows you how to do the easy part.

    • @Nyufly
      @Nyufly 3 роки тому

      @@PatrickAlphaC dang.

  • @EbbyFlows
    @EbbyFlows 2 роки тому +1

    Oh gawd that was an epic intro

  • @azaranfox4057
    @azaranfox4057 3 роки тому +1

    I wish any of this made a lick of sense to me, because I would love to try it.

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому

      I’d love to have you learn to understand it friend

  • @s.nawfal6211
    @s.nawfal6211 2 роки тому

    Hi Patrick do you have any course on building and running MEV bots? I don't mind paying for the course, thanks.

  • @pan-galactic-gargleblaster
    @pan-galactic-gargleblaster 3 роки тому +4

    I'm so glad this video came out! Couple weeks ago I took this aave mix for a spin on Matic. Long story short, the contracts deploy just great on mumbai and mainnet but brownie has a hell of a time interacting with contracts post deployment. Do you have any high-level intuitions why this might be? have you poked around on Matic using brownie yet?

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому

      I sure have! Stuff worked fine for me... love matic (polygon). What were the issues you ran into?

    • @pan-galactic-gargleblaster
      @pan-galactic-gargleblaster 3 роки тому +3

      @@PatrickAlphaC you know what lol... I actually revisited that project just now. After getting my env variables up, I was able to call the contract and take out a flashloan using aave's lending pool on polygon. Didn't change an ounce of code; working inside of venv now, must have been the issue before. Anyway, for the adventurous in comments here: it is possible to use this exact brownie mix on matic. Just make sure to use the matic version of RPC, token addresses, etc.

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому +1

      @@pan-galactic-gargleblaster beautiful!! If you’d like to make a PR to the repo adding the matic addresses, please do!

    • @RichJam1978
      @RichJam1978 3 роки тому

      @@PatrickAlphaC I've implemented the flash loan in matic, no prob, but now I'm trying to add in a swap on quickswap and I'm having a hell of a time getting the transaction to go through. I think it's got something to do with the gas settings on Brownie. I've tried every variation I can think of, but currently not having any luck. Any ideas?

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому

      @@RichJam1978 Make a stackoverflow question with the issue you're running into and post it here?

  • @JMDepisodes
    @JMDepisodes 3 місяці тому

    the moment the Flash Gordon soundtrack came on ..he got me!!!! hahahhahahhhaahahh super funny!!!

  • @yichengwang717
    @yichengwang717 3 роки тому +1

    is it possible you teach how to write a code for arbitrage bot together with flash loan?

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому +1

      This is basically it. You just have to do the work now to find the arbitrage. If I make a video on it, the opportunity will be gone by the time you’re watching it

  • @Osmosick
    @Osmosick 3 роки тому

    Does one need to be a coder or a developer to get flash loans in the first place?

  • @shawnjudge2705
    @shawnjudge2705 2 роки тому

    Can someone tell me if this is reasonable? So its hard times, lost my job and now I am waiting tables to get by. I have been studying and trading crypto for over a year now and I am confident I can make a living trading it if I had enough money to start witb. My goal is to have $100,000 to invest. Only issue is I am unable to get a loan. I have no coding experience whatsoever. Is it realistic to expect that if I put in the work to learn how write one of these flash loan scripts, I can make that kind of money just by finding discrepancies in pricing of the same coin on different swaps/exchanges? If so how long would it take to have an understanding of this kind of code to write one of these scripts? My questions may or may not give some insight into how little I understand about writing code lol... What language is this even? Python?

    • @PatrickAlphaC
      @PatrickAlphaC  2 роки тому +1

      It is realistic - but it will take you a loooooong time, there is no free lunch and the space is quite competitive.
      Instead, if you want to go this route, I’d recommend you learn to code and get a job coding in web3. You’ll do more better more consistently

    • @shawnjudge2705
      @shawnjudge2705 2 роки тому +1

      @@PatrickAlphaC Hmm if your reccomending going into software development just to get started then yeah this sounds like quite a commitment. Thank you for the insight and your prompt response!

    • @kovychchat__my_Teleqram_id
      @kovychchat__my_Teleqram_id Рік тому

      For more enquiries, reach out⬆️⬆️⬆️...

  • @Rationalist101
    @Rationalist101 3 роки тому

    Don't we have to pay the gas fee with ether from our own wallets???

  • @blockchain7888
    @blockchain7888 3 роки тому +1

    Patrick great video, I am trying the code with polygon Mumbai, I am adding a new network Mumbai with the corresponding contractor addresses, getting a KeyError: , any clues

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому

      Thanks for asking. Could you make this a stack exchange ETH question with all your information? ethereum.stackexchange.com/ Or make an issue on the repo?

  • @theafrocryptouniversity3003
    @theafrocryptouniversity3003 8 місяців тому

    I get and assertion error when I try to run get_weth. Anyone know how to resolve?

  • @steviebobbclawson9622
    @steviebobbclawson9622 2 роки тому

    Hi. I'm a beginner. To fully understand all this do you have courses I may follow??!!

  • @grayblanchard4144
    @grayblanchard4144 2 роки тому +3

    You are my hero!

  • @harshalraut2056
    @harshalraut2056 3 роки тому

    Is the same code applicable for flash loan in matic or is there any changes

  • @traderkrum
    @traderkrum 3 роки тому +3

    This deseves 1 000 000 000 views!

  • @MyStupidOrange
    @MyStupidOrange 3 роки тому

    I'm sorry this is so late but I have an issue when running the brownie run scripts/run_flash_loan_v2.py --network kovan command I get a Gas Estimation Failed error?
    Any idea how to fix it?

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому

      Do you have WETH?

    • @MyStupidOrange
      @MyStupidOrange 3 роки тому

      @@PatrickAlphaC In the contract, yes. In the account I'm transacting from no.

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому

      @@MyStupidOrange put it in your account

    • @MyStupidOrange
      @MyStupidOrange 3 роки тому

      @@PatrickAlphaC AHH I see, I didn't see the separation of collateral in the contract and the fees in my account. I get it now. Thanks so much for the brilliant tutorial!

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому +1

      @@MyStupidOrange BOOM!!! Glad you got it!

  • @user-wr4yl7tx3w
    @user-wr4yl7tx3w 2 роки тому +1

    Your videos are definitely quality content.

  • @fartywood3917
    @fartywood3917 3 роки тому +1

    Hey, wdyt of the latest pancake bunny swap exploit? Is it the beginning of the end for Flash loans?

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому +1

      Tragedy. I’m pretty upset the team didn’t take the time to make their application solid.
      And flash loans can’t really be ended, and they themselves are not the issue. Flash loans are just a tool that show the holes in bad applications, and it’s an immune system that is healthy for stopping bad apps.
      The issue wasn’t the flash loans, the issue was the application. If an app can be exploited by a flash loan, that means a whale could have done the same thing. It doesn’t make sense to say “is this the end of whales”

    • @fartywood3917
      @fartywood3917 3 роки тому +1

      @@PatrickAlphaC Ya, I agree too, Flash Loans 'just happen' to be the tool for that exploit, if not for flash loans, am sure they would have found other ways to do it.
      Also, do you mind making a video of how the exploit was carried out, I have gone through their postmortem multiple times, but cant get my head around it. Thanks for your reply.

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому

      @@fartywood3917 That sounds like a fun and helpful video. I’ll add it to my list! Thank you!

  • @wc4572
    @wc4572 3 роки тому

    Great video but the only part I don't get is why you minted 0.039 Aave interest bearing ETH?

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому +1

      The split second I had the collateral on there I gain interest on it

    • @danielpaz1746
      @danielpaz1746 Рік тому

      @@PatrickAlphaC Wait. Did you earn 0.039 real Aave that went to your wallet?

  • @ToastyAlpha
    @ToastyAlpha 2 роки тому +1

    Hi I was wondering if this still works with the new aave V3 core? If not I think a video on this would be super cool since I am sure there has been some changes over the last 10 months! thanks for the amazing vids

    • @PatrickAlphaC
      @PatrickAlphaC  2 роки тому +1

      With V3 it’ll be a little different, but conceptually the same. V2 is still more popular though, and Thus has more liquidity. I might need to make a v3 edition

    • @kovychchat__my_Teleqram_id
      @kovychchat__my_Teleqram_id Рік тому

      For more enquiries, reach out⬆️⬆️⬆️...

  • @Jimmyisabot
    @Jimmyisabot 2 роки тому +1

    OK, fine, sick intro!!

  • @arashputata
    @arashputata 3 роки тому +1

    subscriber here :D Will you make a video on collateral swapping with flash loans too ?

  • @omar1187
    @omar1187 3 роки тому +1

    Also i imagine developers have bots that automate the execrution of these flash loans. You think there are still opportunites for non bot executions? How do you keep track of arbitrage opportunites?

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому +2

      Basically no… you pretty much won’t win without a bot unless you get rreeeaaallllyyy lucky

    • @omar1187
      @omar1187 3 роки тому

      @@PatrickAlphaC You got any idea how I can build my own bot for this? Like a bot that triggers the flashloan when when it recognizes a profitable opportunity between two exchanges? Have you tested out somehting like that?

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому

      @@omar1187 this takes a loooot of savvy understanding of blockchain and code. Basically you’d constantly scrape for arb opportunities and then have to strike quick and fast with a lot of gas. It’s really hard

    • @omar1187
      @omar1187 3 роки тому

      @@PatrickAlphaC Talking to a who is pretty saavy with polygon and Eth coding. Hes familiar with the concept. Your contracts would you say these could be a good foundation to work off of for developing this?

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому

      @@omar1187 yes, very much so. To be honest most of the leg work is on you though

  • @fabianmimberg8601
    @fabianmimberg8601 2 роки тому

    Hello, who can i Download the terminal you Use in the Video?

    • @PatrickAlphaC
      @PatrickAlphaC  2 роки тому

      Visual Studio Code code.visualstudio.com/

  • @Anne-cv4ms
    @Anne-cv4ms 2 роки тому +1

    Yes it was a great intro indeed ! :D

  • @leetcodewhitebelt
    @leetcodewhitebelt 3 роки тому +1

    any examples of actual arbitrage code that can be used here?

    • @PatrickAlphaC
      @PatrickAlphaC  3 роки тому

      If I showed you it, by the time you tried, it would be gone

    • @leetcodewhitebelt
      @leetcodewhitebelt 3 роки тому +1

      @@PatrickAlphaC thanks, i guess i just want to get the general idea of what can be done. Something like, how to use a uniswap contract to do a swap once finding an arb opprotunity, etc.

  • @cryptonerdz7127
    @cryptonerdz7127 2 роки тому

    Hi i have a question how do u know how much gas u need to run ur flash loan

    • @PatrickAlphaC
      @PatrickAlphaC  2 роки тому +1

      You can use a gas estimator or check the gas of your transactions when you run them against a lovalnetwork or mainnet fork

    • @cryptonerdz7127
      @cryptonerdz7127 2 роки тому

      @@PatrickAlphaC ok ty

    • @cryptonerdz7127
      @cryptonerdz7127 2 роки тому

      @@PatrickAlphaC also another question if i take a loan of 10000 and put 20 matic in gas fees how much could i get

  • @herico33
    @herico33 2 роки тому

    Could you make one using MATIC instead of ETH?

    • @PatrickAlphaC
      @PatrickAlphaC  2 роки тому

      All the code here will work the same on matic. Just use matic Aave smart contracts

    • @kovychchat__my_Teleqram_id
      @kovychchat__my_Teleqram_id Рік тому

      For more enquiries, reach out⬆️⬆️⬆️...

  • @nthethelesaoana3194
    @nthethelesaoana3194 7 місяців тому

    Hey Patrick, I usually watch, like and download you videos and they are very helpful. I just have limited free time so I would like to know if you can create bnb smart chain flash loan arbitrage code because I trust you and I just need that code so that I can your videos contents with high motivation.

  • @mannyfesto1822
    @mannyfesto1822 2 роки тому

    I cant seem to find the import ILendingPoolV2 file

  • @budhadityabaral5718
    @budhadityabaral5718 2 роки тому +1

    Hi Patrick,
    This is a great video to make us understand what the whole concept of Flash loan.
    But while trying to do this I am facing an issue, I am only able to get aave tokens on the amount of ETH that I have, if I am not wrong then we are getting loan on the showing collateral. Can you please guide me on how to get the flash loan successfully without collateral.
    Or can you point me the code or the process on how I can take get the flash loan.

  • @rahulraj005
    @rahulraj005 2 роки тому

    great video, just wondering how to get weth deposited back from the above code

  • @JohnnyDubstarCrypto
    @JohnnyDubstarCrypto 3 роки тому +1

    Great video! I’d love to hear your thoughts on EQZ Equalizer. Dedicated to flash loans and LPs. Mainnet launch was yesterday. Now they need to fill up the vaults and create lots of liquidity over several assets. I would love to hear your opinion and maybe see a video if you have time! Thanks! DeFi and it’s new innovative tools are awesome!

    • @PatrickAlphaC
      @PatrickAlphaC  2 роки тому

      Haven’t worked with that yet, don’t know much about it, sorry!

  • @CarlosHernandez-lc9df
    @CarlosHernandez-lc9df 2 роки тому

    Where can i get kovan weth from?

  • @rostam_jabbaroff
    @rostam_jabbaroff 8 місяців тому

    Hello Patrick, as an expert in blockchain technologies, I would appreciate your opinion on whether it's still worthwhile to invest time in studying and developing a crypto-arbitration system. Considering that I am new to this field, your expert advice would be highly valuable in helping me understand if this opportunity remains viable or if it has been exhausted. Your guidance would be greatly appreciated.

    • @PatrickAlphaC
      @PatrickAlphaC  8 місяців тому +1

      Yes.
      But it's VERY competitive. So don't expect to see any results even after 6 months of hard work.

    • @rostam_jabbaroff
      @rostam_jabbaroff 8 місяців тому

      @@PatrickAlphaC Thank you for the heads-up. Got it, it's a shark tank out there. Quick q: where's the sweet spot in this hustle? Is it all about cranking up the compute power for ultra-fast trades, like it's a digital drag race? Or is it more like playing multi-dimensional chess with geo-strategic plays? Just trying to figure out where to overclock my efforts to keep up with the pack. Any insider tips on where to drop my main payload would be solid gold.

    • @PatrickAlphaC
      @PatrickAlphaC  8 місяців тому +1

      @@rostam_jabbaroff both. The metagame changes pretty quick.... so by the time you're up to speed it might be different :)

    • @rostam_jabbaroff
      @rostam_jabbaroff 7 місяців тому

      @@PatrickAlphaC Patrick, big diff between running your own node vs. tapping Infura/Alchemy? Speed-wise, is it a game-changer or just small fries?