New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

To Automate and Protect: Creating Automated DeFi Strategies - Nikola Klipa

Ethereum DenverSun, Oct 9, 2022, 12:00 AM

Transcript

if you're familiar with dfi server you could have probably guessed my name already but yeah i'm nicola i'm a back-end leader defy saver and today i'm going to walk you through the automation with defy saver and our plans in the future basically so to start with that we need to go way back to thailand in 2018 we went there as a team for justification basically and at the time maker was becoming more popular and so nana my colleague at the time now ceo of d5 saver had the position in maker and so we were riding motorcycles around and we saw eat price drops it was crazy nana was so afraid that he will get liquidated and so we sit on motorcycles went back back to the apartment and so he did what basically would anyone do at the moment he took a little bit of his collateral he sold it for die and pay back his debt his his ratio went up in that point so how that exactly worked i'll try to explain on an example so if you have a position and you have for example 1400 in collateral and 800 in debt your ratio is 175 but if you take 200 from your collateral and pay back your adapt for 200 your ratio actually goes to 200 so your ratio goes up and you're more protected from liquidation okay so that's just so you understand the basic points and now we can go back to nana's story so we went back to the apartment he saved himself from liquidation which is amazing but even better he thought on of an idea about cdp saver at the time so basic features for cdp saver would be repay that's the process i explained in just a moment earlier and boost which is the other way around so basically you would take more dye buy it with it and put it as a collateral so that's our two core features for the new product name cdp saver and we can do them in one transaction beside that we wanted a slick uh ux and ui and we came up with after values and stuff like that which were really important at the time because people didn't understand concept of replay and boots really well so we wanted to show them in advance what's going to happen so they know and yeah so for a user now it was a lot easier he would come to cdp saver he would type in amount see exactly what's going to happen and just click repay button we would repay his position and he would be safe from liquidation well not all the time because like if you're sleeping or if you want to go for a vacation it's a little bit hard to follow all the prices and be able to react all the time so in that moment we came up with automation so we wanted to automate first repay process because that was super important for us to save people from liquidations and the core concept idea is quite simple honestly like you follow the ratio of the user in case he is below a certain point with your call transaction and you repay his debt but what we wanted to make sure is that every user has custody over his own position that he doesn't give the position to us and also that we are unable to do anything maliciously or something by mistake so we came up with a smart contract layer that protects the user from us doing anything maliciously so the smart contracts make sure that for example we are not allowed to call to do anything with your position if you are not out of the bounds that you set and also for example if you are below let's say 180 percent and we are able to react smart contracts make sure that we can only move your ratio in the right direction so we can't do different action or do something bad with your position and yeah so around that time approximately uh me compound in dave also showed up and we saw a huge potential in boot and wanted to integrate them in our dashboard as well and at that time like we wanted to provide the same set of features as for maker and also to provide automation for both protocols as you can imagine now cdp saber having maker protocol compound and dave cdp in the name didn't work for us anymore so we wanted to change that and that's how the fi saver became defy saver from cdp saver uh okay so few weeks after we released automation it was the first ethereum price drop it wasn't a huge drop maybe like 15 or something like that and we didn't have too many positions it was maybe 15 users or something like that at the time but for us like i remember i was glued to monitor like just checking that everything is working correctly and making sure that that people are getting repaid and so i remember we were super happy when we saw that we saved all those positions and that people didn't get liquidated because of us and i believe that's the first time we actually saw a huge potential in the project and after that crash we did a lot of work to make the system better but then black thursday came up in 2020 i assume many of you remember that day it was 12 march 2020 i remember it for sure honestly it was like a huge test for all d5 protocols i would say the price dropped it price dropped for 50 or 60 percent at the time and like everyone else like nobody expected what can happen in those situations gas prices went up madly uh protocols didn't wasn't weren't prepared basically for everything what's going to happen at the time and everything like we saved a lot of users and we saw a huge gratitude i'll just show some of these and uh after that we made a more robust system like i assume all d5 protocols did as well and since then like in the last year and a half or two year and a half uh i feel that all the crashes since then with we did show that users can count on us and that we will save them from liquidation at any point and a tiny crash basically well so at this point like we are we're definitely a platform where you come to be protected from liquidations like we we are place to go for that but even in the first year we saw a potential to automate different stuff and not just boost and replace but everything else as well and in the first year of our existence maker made a new system called multicollateral dye and before that it was just a single collateral die so to be able to move your position from single collateral diet to multi-collateral dye uh you would have to there there would need to be enough liquid liquidity in multicollateral dye protocol sorry so most of the solutions in the beginning including us uh we thought about how to allow users par to partially move their positions and that would work but on the other hand it would be more gas costly because a user would need to pay for each part they would need to pay like the same amount as moving the whole position and also user would still need to watch out for liquidity new protocol and to be able to react at the right time as you can imagine we decide we figured out that we can use our automation system to do that automatically so we built a one-time subscription model for users where they could have come to our website subscribe for moving position from single collateral diet to multi-collateral diet and we would watch for liquidity and as soon as there is liquid enough liquidity we would move their position to the new system and exactly at that point the subscription would become invalid so it would be just a one-time subscription for them and we couldn't do anything else after uh in the past two years we also received a lot of requests from other people to end protocols as well like protocols would usually ask us to automate boost and rebase for their protocols and a lot of users asked for some more specific automations for themselves prior priority and so at that point we kind of every time someone would request something we would either talk or have a meeting or whatever and we will try to figure out does it make sense for us to automate that and how much resources it would use and stuff like that and to be fair most cases we would just say no it's not worth it for us like it would take too much work to do that and it is just for one customer or maybe two or three and at that time we were like thinking okay but let's try to at least allow users to do all the stuff manually so we built something that we named recipe creator and kind of allowing our users to become chefs and use basic ingredients which are basic actions in each protocol and build their own recipes so users would be able to take a flash loan to withdraw something from one protocol maybe move it to another one basically they could do anything they wanted with our ui and we saw that our users are becoming better and better chefs honestly so what we thought about later okay let's try to automate that as well and now we came up with a system called automated strategies and strategy is a combination of both triggers and recipes that i mentioned earlier so what you will be able to do is decide what your triggers are and as soon as they're triggered we will call transaction and do a recipe you created basically that will allow us to do a lot more boost and rebase for different protocols but also allow us to do some more specific things for users that they are asking for like moving from one protocol to another one or maybe doing whatever basically whatever they can imagine off uh the deployment of that is probably going to be in two phases so phase one will be a predefined strategies by our chefs fd5 at the phi saver so they collected a lot of requests during the past two years and we figured out what are the things that people ask for most and we're going to provide those in the beginning basically you will just come decide your parameters and just subscribe to the automation and that's that's phase one but in phase two as you probably can think of we will try to allow you to build it by yourself so same like recipe creator you will be able to choose your own triggers and then to select what actions to be done at the time i'll just try to show you some example that i thought of so let's say you for example have a position where you have obvious collateral and die as adapt and you can say like if my ratio is over 200 percent and let's say it price is lower than 3 000 borrow more die from my position and buy me more eat with for example so you can combine different protocols different actions you can i mean it's up to you what to do honestly uh yeah uh there is one small thing at the end so we have announcement to make on march 3rd we are going to start without with our proof of concept for these strategies it will be three different strategies you can select from basically you will be able to say if my maker position uh ratio is below a certain point take some dive from my savings and your savings will be able to be in uh rari protocol m stable or wire take my dive from there and save my position repeat the depth with it and put my ratio above so i think that's it

Automatic transcript — names and jargon may be misspelled.