How to Save 75% Gas Swapping to yUSD with Zapper Exchange
21 Sept 2020 · 22:27
DeFi Dad walks through a Bankless tutorial on saving roughly 75% in fees when swapping into yUSD, the yVault built around Curve's Y Pool liquidity token. The video covers using Zapper Exchange's new DEX aggregator, which sources trades from Uniswap and Balancer, background on how yUSD compounds yield versus depositing directly through Curve and yearn.finance, and the risks involved in using this DeFi strategy.
Speakers
Topics
Transcript
[Music] hi everyone this is d5 dad and this is another bankless tutorial so today i'm going to show you how to gain exposure to one of the more popular uh products from the urine finance protocol it's now referred to as yusd uh it relates to
placing stable coins in the curve y pool so normally one would go to curve dot phi slash iron slash deposit and you can deposit any one of these four stable coins and then by doing that you are earning market making fees or or trading fees and you're also earning lending interest so this has been a really popular d5 product that i've covered but aside from that urine then released what are called volts volts are for automating yield so many of the more sophisticated strategies for yield farming
require lots of transactions and time and expertise and so what they've done here is they've enabled on yearn.finance volts the ability to take tokens like eth or to take the the token that you receive from this curve y pool when i deposit into it i receive a liquidity provider token an lp token and so this is where i could come then and i can deposit that and currently the estimated apy for the year is about 20.44 and so it means that i'm earning multiple forms
of yield now i'm earning lending interest here i'm earning uh market making fees which you can see uh is below here the 0.04 percent is the fee that you want to pay attention to but then i'm also having my liquidity used to continually earn the curve governance token which has a selling price because it's it's bought and sold on dexes and so what this is automating is uh earning that and then selling that for profit and so the the outcome of that is about 20.44 at this moment
and if you go to this page uh there is a new feature you can click here to take a look at what is the estimated growth of the vaults performance for the past three days one week one month inception this is really important to check out because uh the estimated growth or apy is changing day-to-day according to how much liquidity there is and according to lots of other factors like prices of tokens of the the curve governance token so i like to just look at something like one week or three days because it gives me a sense of how is this all performing over the last
few days so you can see that if i look at the curve ylp so again i would have originally gone here to curve and deposited stable coins then i might have come here to yearn.finance and i would have seen that it would earn me about 14.62 now that is different than if i go back to this and i choose one week over the past week uh the performance had actually been higher previously and then if i go back to the like average performance over the last month it was even much higher
part of the reason that it was higher is that the market has drawn down and part of the higher yield was due to the higher price of the curve governance token so that was being sold at a higher price hence one would earn higher returns now that the price is lower and and generally the entire crypto market has had a drawdown over the last uh you know few weeks uh that's why i like to look at one week or three days and i can see now that okay it's lower i mean it's still compared to traditional legacy markets or a bank savings account it's it's much higher but
good to be aware of that uh because this is a big difference from 50 so one of the breakthroughs that happened over the last month after the y vaults were released by yearn is the team at zapper this is before i joined the team uh they were clever to create zaps for all uh eight of these different volts and so it means that i could go into the y curve vault the one that we've been talking through here and i could then add liquidity using something like ether or one of the uh one of the four stable coins so you know i could be adding die here and if i were to put in 100 die i can zap
that uh into that y vault and it will cost me uh two transactions first there's an approval transaction to give permission to spend my die that's the one that's always cheaper that's the first transaction and then the second one is to actually deposit now this has been a very popular zap for us i'm not going to cover this today because there's actually a way to save even more money now on gas if you go to the new dex aggregator that we offer so under the exchange this is a dex aggregator as in its
sources the best trades with the least amount of slippage so best trading rate with the least amount of slippage from balancer and uniswap and so i can go here and say i'm gonna uh start with die and i want to trade into y usd and then let's pretend i'm going to put in 100 here's what i would get out of that the reason that i end up with less yusd is that it is a more valuable token in fact if we go to uniswap and we check out the page for the yusd token it's currently about a dollar fifteen that's because it has lending
interest it has market making fees and it has automated yield through the y vault so this is again this is if i've provided my stable coins to the curve y pool i can then take that lp token and have that liquidity used for additional automated uh earnings strategies and that's all powered by urine.finance protocol that's why urine is so popular it's it makes uh yield farming uh one or two clicks and that's that's really powerful what we try to do at zapper is similarly automate and simplify the ability to
gain exposure and so i'm going to show you how much it costs for me to trade from die to y usd because if we were to go to curve if i were just going to deposit let's say uh let's go and go to the deposit tab here and we'll pretend that i'm going to put in 100 die uh if i were to click deposit this will give me an estimate here it's going to cost me about 71 that's just for me to become a liquidity provider in the curve y y pool
that's before i've even gone to yearn or in the case of using a zap that's before zapper takes me through a transaction to zap myself into this pool so 71 dollars is the benchmark we're measuring off of and we're going to see if we can save money by using our new dex aggregator and what this is doing is we're sourcing uh from uniswap so in this example i'm putting in dye it goes from dai to eef and then from eath to yusd the first thing i'm going to do is approve spending my die so we'll go ahead and
click approve and then let's go ahead and change the gas and so i've looked up on the ether scan gas tracker that uh it is about 258 way to get the transaction through in about two minutes so i'm going to increase this to 258. this is a classic example of why you check the ether scan gas tracker or ethgastation.info metamask does not always estimate the you know accurate gas price my transaction could have gotten stuck if i
didn't do this so i'm going to hit save and then i'm going to give permission in this case instead of unlimited i want to just put in a custom spend limit of a hundred uh this is something that you'll see especially when you use uh uniswap and i i believe balancer does the same thing but i prefer a custom spend limit uh just to ensure that no one can ever drain my wallet of all of the die that's there so we're ready to go let's hit confirm it's very important that i wait for this
transaction to push through so it just succeeded and now it will be safe then for me to continue exchanging or to do the swap uh if i were to click this or if i were to try to swap it beforehand i'm taking a risk because i'm putting in a second transaction that's queued up and these gas prices can change these fluctuate constantly so you know it's always essentially an auction that's happening uh in terms of the gas price and the higher i bid the more likely my transaction is to go through so if i'm waiting on transaction one
to go through here why would i put through transaction two uh when there's a chance that it could get stuck or maybe my gas price wasn't high enough i want to reflect the gas prices that are the most updated so i'm going to go ahead and refresh this because i'm about to do this this final transaction and i can see that to put it through in two minutes it's still about 258 way so i go back to zapper i can click exchange now so far we've paid about uh two to three dollars in gas for that approval transaction
and then this is going to be a maximum of let's go ahead and put in 258 but at 258 it's going to be a maximum of 36 dollars of ether now i recognize that is a larger percentage of 100 die this is definitely a smaller position than i would normally consider zapping in so just be aware gas prices are still high uh that is a reflection of challenges with the ethereum network being so in demand and so it makes sense for me to consider how large is my position what am i going to earn from this and is this worth it for the sake of a demonstration though
i'm going to go ahead and do this even though this would be 36 of my total here if i were to up this to a thousand i'd still be paying 36 36 which makes a hell of a lot more sense because now i've got a larger position to earn a higher return and easily overcome that cost so let's go ahead and click confirm okay so the transaction has succeeded so in the invest tab is where i normally track my current investments so these are uh investments like being a liquidity provider or being in one of the urine y
volts the y curve vault by urine is showing hundred a hundred point ninety eight dollars and that is the eighty seven point two five six y usd if i ever wanted to withdraw from this uh i can just click withdraw and i can go that route but for right now i want to remain here earning three forms of yield which is the lending interest market making fees and then the additional yield farming earnings from the yearn y volt let's recount how much i paid in gas so this is the original die approval so
this is giving permission for zapper uh dex aggregator to spend my die and that was 3.83 cents of ether as a fee then the second transaction the one we just did where i zapped 100 die into wrapped ether this is all happening through the uh the order uh being routed through uniswap and then it eventually gives me the y usd token so that is a total of 20 so i spent about 23 even though if i had gone the route of curve
and deposited the old-fashioned way the way we used to do it just a few months back it would have cost me 71 just to get into the y pool that's before i've even deposited into uh yearn uh the v y vault and that would have probably cost me i mean i think like conservatively another approval transaction plus depositing i mean it's got to be at least twenty dollars of ether uh and consider the fact too that gas prices are very high today again they're around 285 way so today i only spent uh i only spent about 23 24 dollars in gas
so you want to check this out because this is the most cost-effective way to go from dye or one of the other stable coins uh that are in the y pool which is uh dye usdc tether and true usd any one of those you can get into yusd for significantly less alright so let's recap the risks with any defy application just like with the smart contracts that enable me to use this dex aggregator by our team at zapper uh there's always smart contract risk so
you know just be aware that uh i wouldn't be zapping or in this case i guess exchanging swapping my life savings through this you know this is a newer product by our team and i would uh urge folks to be cautious in terms of what you swap second liquidity is limited this is a pool in uniswap it has 9.2 million in liquidity that's not a lot you know that is nothing compared to the liquidity in the uh the die ether pool that's i think close to 300 million so
this is something that i will uh put into the show notes please check this out before you ever make a trade into yusd it's worth going here to double check you know how liquid is this and so um i think hopefully someone who's looking to trade a hundred thousand would be knowledgeable of this but if i was gonna swap a hundred thousand die a larger amount you know i would take a look at this first to see what the liquidity is in case someone has withdrawn a lot of their liquidity from this pool another thing to be aware of related to that liquidity uh risk is thinking about the slippage so the way that i i protect
myself here is i go up to the little widget icon and i set my slippage at one percent so the platform here will actually prevent you from executing the transaction if there's uh a forecasted slippage of greater than one percent or i could put in you know two percent or i could you know if i wanted to up it i could put it up to five percent but my my hope when i use a tool like this and i'm trading from die to yusd i like to limit limit my slippage to one percent the next risk to consider is the usual exposure to uh stable coins uh by holding yusd i am exposed to uh
four different stable coins any of which could uh de-peg for a number of reasons but it's it's a risk that i always live with when i hold stable coins another risk i i didn't call out in terms of smart contract is just the fact that we're stacking multiple platforms here so by holding yusd i'm exposed to curve smart contracts i'm exposed to urine.finance smart contracts and i'm also exposed to uniswap when i go to do this swap through zapper i'm for a moment i'm exposed to smart contracts enabling me through zapper but then i'm also exposed to
risk in using uniswap so lots and lots of money legos at work here that is the nature of d5 but i think it's worth noting uh that there is this risk and it's good to be aware of that uh versus being blind to all the different tools that you're using so that's all i've got for you today if you want to try this out yourself go to zapper.phi exchange and this is where the new dex aggregator can be found also uh if you've never done this go to zapper.phi dashboard this is where you can connect your ethereum wallet or multiple ethereum wallets and you can track all of your assets you can track uh your
liquidity pools uh you can track yield farming opportunities any sort of liabilities like if i have like an ave loan or a maker loan and then you can track them by platform so this is a tool that i think everyone has used in defy and and this is part of the reason i joined the team at zapper and then uh what's really convenient is using zaps so zaps allow you to you'll notice here i have a little bit of money in the balancer usdc musd pool i can add liquidity i can withdraw it i can also rebalance
it to another uniswap pool so i can go between balancer and usdc in a few clicks i'm sorry balancer and uniswap in a few clicks and then below is a list of all the different zaps that are available so for example if we look at these four pools these are all the pools that are being used to earn uh uni in the in uniswap and so the little tractor here indicates that after i add liquidity i also can then stake it to start earning uni so it's it's all in one place conveniently so you don't have to navigate uniswap or know which applications to hop into always look for
that little tractor it means that you can uh you can stake and you can also claim rewards all within zapper if you have any questions uh you can comment in the bankless discord but i'd also encourage you to join the zapper discord i'll link that in the show notes there's lots of folks there where we're all talking about d5 constantly and obviously as the team we're trying to help folks uh navigate all of this and understand how to use these different tools [Music] you