i did the flash loan. the manual was before.
I have done all the whole process at the end
Great Course Amadeo
I must admit the flashloan hacking was a bit too in depth for me , since I really need to finish Ethereum programming 201 .
Arbitrage is very opportunistic and in my mind not really an opportunity unless you want to program a bot who does this automatically
I see a lot of potential in the lending side of DEI, when will there be a Defi 301 course?
Looking forward to it
Kindr regards
Thomas
Bro can you please give me your email. I want to contact with you and know something about arbitrage.
my email: [email protected]
I went ahead and created a flash loan contract that borrows from AAVE, and then swaps at Uniswap and then at Kyber before paying back. It of course checks at the end to see if there is a profit and revert if not.
Now, monitoring the prices on these exchanges I try to run an arb but it always give me the message:
Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?
execution reverted: Did not profit...
But what doesnât make any sense to me is that when I go to invoke the initial function to start this whole process it IMMEDIATELY gives me the did not profit message. How is that even possible? A complex transaction of sending some tokens to someone else takes minutes to complete AT LEAST, but somehow my contract is managing to request a flash loan and get the money, then swap on uniswap then swap on kyber and then get that money back all before seeing if I profited and finding that I didnât and all that happens in ONE SECOND???
What am I missing here?
Thank you for trying to do more complex functions.
This is always hard to analyze and next lvl complex.
We programmed in the Did not profit function so that you get the feedback that the transaction was reverted and so the whole transaction is not executed.
Maybe just try a simple function first?
If that works add other steps.
Then letâs go
I am also still searching for that amazing Flash Loan arbitrage it is really complex and it seems a lot of people will jump on it if the opportunity presents it self.
Thanks for the response but not sure you are getting my point. My point is that the SPEED of response on my contract doesnât make sense to me.
For example. if I were to send you some Eth right now, how long might that take to arrive in your wallet? At least a few minutes typically?
OK, so in my arb contract I am invoking a function on Aave, which then should send my contract a bunch of eth. That alone could take a few minutes logically to receive those funds.Then I am inviking a function on Uniswap which is swapping the Eth for WETH, then swapping for a token, and then sending that to my contract. Then I am invoking a function on Kyber to swap the token back for eth.
So all that needs to happen before my contract checks if I have profited. How can all that occur in one second? Doesnât make sense. yet Remix is telling me a didnât profit IMMEDIATELY after I click the button to invoke the initial flash loan function on Aave.
So there is something I clearly donât get here. Either there is something seriously wrong in my contract or there is a big misunderstanding I have on how these contracts execute. I was hoping someone could explain this to me.
This is a great question thank you.
The TX can see if it makes a profit or not so it kind of never happens this data as available before the transaction is singed so you directly get feedback.
This also shows that ZK Rollups etc are much better solution then how it now functions only isssue is the UX and getting everyone to understand this.
I donât really know about ZKRollups. I guess I should learn about it.
So somehow the transaction can sort of virtually walk through the transaction and predict itâs outcome ahead of time, before it does it? I guess that would explain it and I wondered if this is possible. Where can I read more about this facet of solidity? Iâve never seen it discussed.
Hi man, it is indeed super amazing but jet complex with indeed not that much material of it online just jet. TIME TO GET AN ADVANTAGE!
With solidity, you can basically explore the mempool: https://www.blocknative.com/explorer
Try to understand this concept then you will also understand what I just said more I think.
Basically all data is known since it already happened ⌠so you now broadcast a flash loan and in a mater of milliseconds it is known if the transaction will be profitable or not since time basically did not move jet.
@amadeobrands
I am attempting the âProgram a Basics Flash Loan Part 1â and canât seem to get past getting test ETH. The link https://faucet.kovan.network/ doesnât seem to work. I get 502 Bad Gateway - Page missing.
Did this site move or is something messed up on my computer?
Thanks.
Hey @Samm, hope you are well.
Some times the faucet does not work correctly, have to try it in another moment.
Also you can try to use another one, like this one: https://faucet.metamask.io/
If you have any more questions, please let us know so we can help you!
Carlos Z.
Thanks very much, but also this doesn´t work no more. I get an error: to many requestâŚ
other alternatives to https://faucet.kovan.network ?
Ellecrypto
This one could also work, you have to register yourself and ask in the chat to âsendâ some ethers to your kovan address.
https://gitter.im/kovan-testnet/faucet
Carlos Z.
Amazing
Good job.
Thanks for the trick
Hi Amadeo, hi Carlos
I tried also https://gitter.im/kovan-testnet/faucet one hour ago, but nothing is happened.
If is possible I need 1 Kovan ETH to diese Adresse: 0x02cf403244eef54e7919b7ee8EC650c30565A8E7
Thanks guys
Lorenzo
Iâve sent you 0.5 KETH (kovan ETH), please verify your wallet
Also here is the tx id: https://kovan.etherscan.io/tx/0x7c3109879d6b56e3feee9b997542556905cb3be5d6413b4af7c583d0c0c2f193
If you have any more questions, please let us know so we can help you!
Carlos Z.
Hello, can I please have some KETH to try out the course flash loan? All the other web sites donât work⌠Thanks! 0x05B256927b8b4e6D931dA099Ce522eD88E5648f6