Composing New Financial Instruments in DeFi – Nodar Janashia
ETHDenver 2020 · 14 Feb 2020 · 14:29
At ETHDenver 2020, Nodar Janashia examines how DeFi protocols compose to create new financial instruments, layering lending, derivatives, and other primitives built on smart contracts into products that did not exist in traditional finance. He discusses the opportunities and risks of this composability as protocols increasingly depend on one another.
Speakers
Topics
From ETHDenver 2020, hosted by ETH Denver.
Transcript
hi everyone I'm Norah Jeannie Hsieh and this is Sahil we're from defy SAP we're gonna talk a little bit about some zaps so first you know let's start by taking a look at the current state of defy you know defy is difficult to use it takes several transactions to get to certain end points and defy which to me personally is a pet peeve so like when I know I need to get to a certain end point and I have like three transactions line up I have to wait for one to finish in order to initiate the next one so I think because of this some true composability
has been largely unexplored in our space so what is defy SAP defies app helps you deploy capital to interesting opportunities and defy and one-click abstracting a lot of the transactions that go on the back so for users it's fast to use it saves you time it's easy for you to grasp the concepts for builders it's really simple to integrate and they're not adding on an extra layer of a smart contract security risk so when you're using defy zap you're minting the same exact liquidity provision tokens or leverage tracking
position tokens it's the same thing as you using the underlying platform's manually by yourself so where did the defy SAP come from just a quick history about us so I started myself making d5 tutorials back in the summer like defy SAP was never an goal for me and they were like oh I'm gonna start defy SAP when I started making defy tutorials like defy SAP was born and raised from user feedback so based on that feedback I hacked up defy strategies which was like using no code
tools it was like educational trading simulator which helped users see what kind of returns that would get on certain positions and defy so it's kind of like test driving these products without actually putting real money behind it and from from there we had a survey which basically told us point that everything was pointing to building defy SAP so on October 8th I just reached out and Khyber's the discord channel looking for help they had a virtual hackathon going on so it was a perfect opportunity to get started within 20 days we had our first
SAP deployed on the main net and we ended up winning the virtual hackathon from khyber which obviously gave us a push to keep building so December 9th we had a beta launch where we introduced a lot more zaps specifically around pooling opportunities on you know swap it's one of the things we saw our users having a hard time doing so in order to provide liquidity on you know swap you need to come in with two tokens and we basically abstract a lot of a lot of the calculations that go in the background so so far we had 8500 eath deployed and to defy throws apps via 16
around 1600 zaps saving end-users around 165 hours so these are some cool starting points for defies app so how it works at first you start out by answering a few simple multiple-choice questions this helps you filter out some of the some of those apps we have available because we realize launching more and more zaps now if you go on to explore else that's page there's a lot of zaps there so it's getting hard to filter them so this survey helps you kind of filter the top three ones that you might find useful based on your investment profile so once you once you
go through the survey and you're pointed to as app for example this China pool one all you have to do is input how much eath you would like to add in liquidity and basically as you can see here what defines app does in the background specifically for this chapo is pretty cool eliminates for unchained transactions so going from eath the first thing we do is we convert half of your year to die and we're not doing it directly to chai because you would experience pretty big slippage if you were doing it directly within the you know swab pool so after getting die we wrap it into chai using their smart contracts and finally add the liquidity of the chai and the leftover eath into
the pool so as a end result you are getting chai pool liquidity tracking tokens back to your wallet so today we released a new thing it's general you know pools app so right now all the you Nepal's apps we've had available it was all based on like some basically it was limited to the options we had available on on our website with the general you know pool you are able to get into any pool that's available in unis WAP and one-click so it's kind of like providing this layer for builders to start initiating these one click off one-click entry points
into pools through this general you in the pool contract and now Sahil is gonna talk a little bit about how you actually integrate so my name is sue Hale I'm an engineer at D Phi zap and I'm just going to talk briefly about how we would how you would integrate our contracts into your adapt it's really easy basically all you need is the address and the ABI we have the addresses available there as well as the api's this is available on our github page and you can go to this website you can download the ABI and the address and the way you'd actually implement it for developers anyway is to
use web 3j s or a Thursday s and basically what you have to do is instantiate our contract this part here is the meat and potatoes though I'm using asset loops using the set address here this is for the Seth Unipol but we could actually use any Unipol sorry any unit swap address so for example if you had a so for example if you have a personal
token on unis whap and you'd like to add liquidity or you'd like your friend side liquidity you can just substitute this address with whatever you want as long as it's available on unis WAP but this code snippet basically summarizes how you would implement defies up into your own application you can use our general contract our general unit pool contract which is this contract here it's called Unipol general and that'll let you get into any unis pool at all we also have general contracts for removing liquidity from those pools and also for entering what we call leverage positions leverage liquidity positions which adds
liquidity to unis and then goes to X long on etherium so these are all general contracts you can use these with any token as long as it's available on unit swap and actually for this contract here you can leverage long for any token that's available on fulcrum so let's believe chain link KN see all those tokens the only thing you'll need to do is to substitute the addressing here so if you were to implement this today you could copy and paste this code as long as you have an address for the user right here and this can be any address so it could be some other users address
it could be the current users address it could be around a mattress if you really feel generous so substitute the South address put in their address send off the transaction and then your UI your front end or your back end or whatever can handle the events that occur after where it's like potential rejections or successful transactions but I'm more than happy to whip up an API for you guys if you need an HTTP API so we have some integrations right now through through said defy snap who asked us to whip up a quick AAPI forum for specific information you needed about some of
these pools and we were able to do that for him so if you have any project that you're interested in integrating and you need more help or you need some custom contract work done or you need a custom API just join us on discord my name is at Krypton omec and i'd be happy to help you whatever you need yeah and I'm just gonna talk a little bit about the people who were already integrated us so it includes some UI solutions like pools that FYI defy snap frontier Wallet who actually launched a native apps native mobile app support today I earned that finance if you guys haven't heard about this it's a really cool tool basically
what we built for iron Finance is like a floor for a pool aggregator so this product is using zaps and a background to rebalance your positions from pool to pool finding the best yield and there's a couple of other solutions that we are working with currently especially excited about things like adding additional pooling opportunities into zaps so right now you can only get into pools on Yuma swap but there's a couple of other couple of other products that are launching with a similar model for automated market making specifically
balancer curve and calorie so what you can build with defy SAP today first of all you can create them alike experiences so each SAP has a ENS registered under it so you could literally become say a liquidity provider in a South Pole by depositing it directly to seth yuna pool d phi is a booth and what you're gonna get back are those liquidity tracking tokens and you could do this you could set up a Guinness for any pool so with this general Unipol contract you can think you know maybe maybe you're gonna list token and you know swap maybe your
personal token that you want to encourage adding liquidity to so what you could do is you could create a ENS then for your own pool that you're gonna launch on you know swap and essentially provide this easy onboarding for new users pool bridging is something we're pretty excited about so right now you we have zapped in zap outs so if you want to switch pools what you'll need to do is you know zap in first then zap out and then zap into a different pool so if you're doing if you're always saying in eath that's easy but you know when you're removing liquidity from you know swap you're also getting back the same
way two different tokens so you need to reshuffle them for the next pool and will allow you to do that you could build something that allows you to that and one-click of course and then pool bridging doesn't have to stay within unit swap you could switch a pool into balance or pool or in soaker pool other ones I'm pretty excited about would be like insured zaps so what you could do is provide so you essentially think of it as buying prepaid insurance from Nexus and then selling it in pieces through his apps to the end-user so they just check off a mark that says hey I want I want all the underlying contracts that this app is
gonna touch covered by Nexus financial Nexus mutual I'm sorry yeah I guess I'll just take take some questions if you guys have any any questions and yeah like Sahil said if you you know if you guys have any problems or additional questions you could always reach us or not this Court we're always there so yeah thank you everyone [Music] you