LEVERAGED Yield Farming on Compound (with Solidity Tutorial)

  Рет қаралды 12,793

EatTheBlocks

EatTheBlocks

Күн бұрын

Пікірлер: 47
@merunasg
@merunasg 4 жыл бұрын
Unbelievable the potential is inmense. Massive flash loans with leveraged yield farming results in a massive profit
@Siryetti
@Siryetti 4 жыл бұрын
Going to start learning this ASAP
@nottahsinkhan
@nottahsinkhan 4 ай бұрын
Hi, been 4 years. Learned it?
@barcup6125
@barcup6125 4 жыл бұрын
This is trully overwhelming, but got me really excited, tried to sign up to your page to learn more about flashloan arbitrages, but couldn't find any links or mails from you.
@AdvanceGamerRyan
@AdvanceGamerRyan 3 жыл бұрын
It’s an exponential decay on the crypto that you can borrow with the max amount only being a percentage of your total investment.
@krzysu
@krzysu 4 жыл бұрын
Will that even work? You are lending and borrowing from smart contract address so COMP will be also awarded to that address. How will you transfer it out from the farming contract?
@jonathanviray6258
@jonathanviray6258 4 жыл бұрын
you would need to add a function on this contract that calls the transfer function on the main cDai (the COMP token for Dai) contract to transfer cDai to a specified address (e.g. your personal address)
@modernfinance785
@modernfinance785 4 жыл бұрын
haha, I was just playing with this. had a play with BAT because the interest was so good too. but its riskier because I just woke up to BAT down and I am almost whiped out 😂 its just fun money for now. would be scary playing with a lot of money like that
@EatTheBlocks
@EatTheBlocks 4 жыл бұрын
Yes BAT is def more risky :( gotta be careful
@3dvanlife972
@3dvanlife972 4 жыл бұрын
Haha Really interesting and at the same time its a bit overwhelming, I think I’ll just stay trying to learn the basics from your course first, but so tempted to try this.
@stephelton
@stephelton 4 жыл бұрын
Wouldn't it be best to end your chain of rehypothecation with a lending? E.g. instead of 'lend -> borrow -> ... -> borrow' you would 'lend -> borrow -> ... -> lend'. This would help offset your borrowing interest expenses.
@yvikhlya
@yvikhlya 4 жыл бұрын
Tip: you don't need to repeat open position 5 times. You can buy (or borrow) 400 DAI, then borrow 300 DAI from compound and sell them (pay back). Your investment at compound would be 100 DAI and you would have 400 DAI liquidity position (4x leverage).
@EatTheBlocks
@EatTheBlocks 4 жыл бұрын
Not sure to follow. If you buy 400 DAI and you have 400 DAI invested in Compound, there is no leverage (its 1x).
@stephelton
@stephelton 4 жыл бұрын
​@@EatTheBlocks I think I follow. I'm trying to understand how flash loans might fit in to this. If you want to start with a flash loan and use that to fund lending, you'll need to return the capital (plus fee) at the end of the TXN. So you would need to put up your own collateral to do this. I think it would work something like this: 1) Provide your own funds to cover what you can't borrow against your collateral 2) Take out a flash loan of up to 3X (minus fees) the capital you're putting up 3) Use this flash loan to fund lending supply 4) Borrow against this (assuming 75%) 5) Use the borrowed funds plus your own funds to pay back the flash loan I believe this would allow you to leverage 400 DAI against your own 100 DAI while having COMP farming exposure to 400 DAI supply side / 300 DAI borrow side. However, I think this is less exposure than what you could achieve through the recursive re-borrowing outlined in this video, comes with flash loan fees, and has worse net-interest characteristics (e.g. interest received - interest paid). You also require a loan (or other capital) to get back out of your position.
@carlosargueta4255
@carlosargueta4255 2 жыл бұрын
@@stephelton did this work for you?
@yannickbass5102
@yannickbass5102 3 жыл бұрын
Hey Jul, how to get in touch ? I need to know more about the compound? is it dead. I am doing something similar with JIGG? what do you think?
@lolo-nd6jv
@lolo-nd6jv 4 жыл бұрын
@EatTheBlocks Isn't there a mistake in the function closePosition ? Don't you need to close it in 5 loops by doing the opposite direction of you openposition ? (if you open it in 20 loops, you need to close it in 20 loops too right ? )
@EatTheBlocks
@EatTheBlocks 4 жыл бұрын
I might have made a mistake :)
@notactive9473
@notactive9473 4 жыл бұрын
coming from eclipse / visual studio and java / c++ background, what is the best route getting into solidity programming? I'm looking for something with a similar flow to those IDE's, does that exist?
@EatTheBlocks
@EatTheBlocks 4 жыл бұрын
For Solidity specifically, Remix is good playground. remix.ethereum.org/ For more advanced project, you will probably use a framework like Truffle + code smart contract in your own code editor like Visual Studio Code + maybe some Blockchain extension. kzbin.info/www/bejne/apPdgXhvrsl6otE I personally use Vim + Tmux kzbin.info/www/bejne/aGmqq6KVnbmSiqs Here is a popular tutorial of mine where I teach Solidity + Ethereum Dapps with Web3 by building 5 Dapps of increasing difficulty kzbin.info/www/bejne/bqiwfKRtfduVgdk
@pauleth
@pauleth 4 жыл бұрын
sir I want more
@ioanox9592
@ioanox9592 3 жыл бұрын
if we leave those 75 Dai as collateral and we borrow 50 dai ,we have to pay fee's for 125 dai actually and we have lend 175 Dai ,so better we dont do this and go on with our 100 Dai,or am i totally wrong ?
@Yash-qe3bv
@Yash-qe3bv 3 жыл бұрын
okay so i'm still learning, but i have a question, instead of writing this contract and deploying myself, we can use your contract which already exists on the blockchain? all we have to do it call the contract so it will enter us the market right? can you answer julian
4 жыл бұрын
I'm just learning how to interact with smart contracts with web3 yet. I need to learn truffle quickly!
@EatTheBlocks
@EatTheBlocks 4 жыл бұрын
I have an intro to Truffle here: kzbin.info/www/bejne/g17aZ5d6ec2obNk Its a bit old, but for the most part its still valid
@---Snaporaz---
@---Snaporaz--- 4 жыл бұрын
I submitted my email , now that I confirmed the registration I will receive the course on my email or I have to find it on the web page ?
@EatTheBlocks
@EatTheBlocks 4 жыл бұрын
Everything is by email
@---Snaporaz---
@---Snaporaz--- 4 жыл бұрын
@@EatTheBlocks So I have to wait for every mail, that's kind slow and boring , in how much I will receive all the data?
@lolo-nd6jv
@lolo-nd6jv 4 жыл бұрын
Is there an easy way to do it throught a flashloan for non programmers ?
@EatTheBlocks
@EatTheBlocks 4 жыл бұрын
Yes: kzbin.info/www/bejne/anO9cpJmrbKUnas
@lolo-nd6jv
@lolo-nd6jv 4 жыл бұрын
@@EatTheBlocks thanks, but it can be really expensive solution, and they are in Beta, a new risk, the idea is to avoid instadapp DSA layer of risk, so seems the only solution is the recursiv code of your vid( just i'm a noob at coding I don't think flashloan is the solution instadapp use, they use recursiv code like in your video, because there is no flashloan fees
@lolo-nd6jv
@lolo-nd6jv 4 жыл бұрын
by the way are you sure about your close position code ? seems strange to me you can repay all in only one line becasue your dai are recursively lent and are used to cover your loan
@lolo-nd6jv
@lolo-nd6jv 4 жыл бұрын
Do you have a tutorial step by step to do this maximizer for noobs ? is it possible to do it with a hardware wallet without typing the private keys ? to avoid increase security risks comparing using just metamask+ledger or trezor
@lolo-nd6jv
@lolo-nd6jv 4 жыл бұрын
I tried to follow your video, could you explain how to do using your code on infura to be able to use your smart contract for max comp mining ? Once I selected new project on infura, not sure what to do :s
@laurenswissels8480
@laurenswissels8480 4 жыл бұрын
How much comp tokens did you earn?
@Daniel-tc7vx
@Daniel-tc7vx 3 жыл бұрын
LEVERAGED Yield Farming does not work. The Borrow APY is higher than Supply APY. Every time you borrow, your debt will be increased and you have to pay interest.
@EatTheBlocks
@EatTheBlocks 3 жыл бұрын
No, you also have to take into consideration the liquidity mining reward
@Daniel-tc7vx
@Daniel-tc7vx 3 жыл бұрын
@@EatTheBlocks What about the transaction fees? The COMP tokens, which you get from Compound, are they higher in value than the transaction fees? What is the recommended minimum capital using for LEVERAGED Yield Farming (for DAI)?
@rattle_
@rattle_ 4 жыл бұрын
Something's bad is going to happen due to this yield farming that'll hinder this defi boom.
@EatTheBlocks
@EatTheBlocks 4 жыл бұрын
I hope yield farming is not gonna do that :( But if it does, DeFi will learn from it and come out stronger, as it always does :)
@laurenswissels8480
@laurenswissels8480 4 жыл бұрын
I agree, it is really cool and all but these positions ares leveraged and stacked on top of each other, combined with loans.... something is going to happen
@stephelton
@stephelton 4 жыл бұрын
This seems pretty similar to what banks have done for a long time under fractional reserve banking systems. One difference is that, in this case, users are lending against their own collateral (whereas banks lend against their clients' collateral). The risk I see here is that as reward tokens (e.g. COMP) end up devaluing, people will stop participating and withdraw their capital, causing supply-side to dry up faster than borrow-side, which will cause borrow rates to increase. This would cause a feedback loop; higher borrow rates will cause yield farming to become less lucrative and even more people to pull their capital out, and as this repeats and borrow rates continue to get worse, interest will cause those who are over-leveraged to get liquidated, which will speed the process up more.
@bogdanzaharin6954
@bogdanzaharin6954 Жыл бұрын
Ok, and how to get back your dai from that contract??? Please think before blindly follow this steps. This contract is unfinished bullshit, imho
Lending & Borrowing Tokens on Compound from Solidity
29:23
EatTheBlocks
Рет қаралды 13 М.
Yield Farming: the new CRAZY DeFi trend
13:08
EatTheBlocks
Рет қаралды 4,2 М.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 42 МЛН
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 60 МЛН
DeFi Bot Tutorial for DyDx liquidations
24:42
EatTheBlocks
Рет қаралды 43 М.
Aave vs DyDx vs Uniswap Flashloan
8:37
EatTheBlocks
Рет қаралды 19 М.
REAL LIFE Profitable Flashloan examples
8:54
EatTheBlocks
Рет қаралды 71 М.
How to calculate Yield Farming Returns (APY) in DeFi?
18:40
EatTheBlocks
Рет қаралды 37 М.
Create a token on Binance Smart Chain | Beginner Tutorial
29:53
EatTheBlocks
Рет қаралды 598 М.
These 5 mistakes will RUIN your Flashloan...
6:27
EatTheBlocks
Рет қаралды 36 М.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 42 МЛН