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

Loading player…

Smart Vaults: Automating DeFi operations - Facundo Spagnuolo

Ethereum DenverMon, Oct 9, 2023, 12:00 AM

Smart Vaults are a new concept introduced by Mimic to power DeFi automated operations. We do care about decentralization, and we think there are ways to open DeFi for complex scenarios like DAOs or decentralized protocols, where making things in a trustless and non-custodial way is a key thing. Here is where Smart Vaults come into play, they allow us to provide a simple way to onboard these users to DeFi while not giving up control of their assets. https://twitter.com/facuspagnuolo/ Facundo Spagnuolo CTO Mimic Finance www.facuspagnuolo.com

Transcript

foreign [Music] thank you [Music] thank you foreign [Music] thank you can you hear me fine okay so my name is Fargo espanolo to and today we're going to talk about how to automate some D5 operations with mimic um to tell you a little bit about my background I started working the ethereum space around 2017. I work at open sapling Aragon balancer and contributed to many other projects and after learning some experience in the D5 space we started thinking about mimic and that's what what we're going to talk about today um so when we were working at balancer we started experiencing different um problems or issues for certain users to to use d54 use cases so dealing with Defy is not it's not easy not I'm not just saying about balancer but it's something that I experienced while I was working at balancer um so but it's not something that we um I mean we really depend on if I uh different group crypto projects need if I to run their own operations um but at the same time they have too many options it's really hard for them to keep up to date with all of them it's very hard to make sure they're building the right Integrations to feel secure and [Music] some sometimes they had to do a lot of manual processes which is zero prone but at the same time they want to keep things decentralized and this is really hard if you want to operate in D5 right so what if we could start modeling these operations which because I mean different different projects in the space sometimes they have to build similar operations like if you want to integrate with a decentralized exchange or if you want to breach assets if you want to add liquidity or invest money like all different projects in this space are running through the same problems right so what if we can start modeling all these operations um they could start scaling recurring um actions to perform these operations while at the same time keeping the funds safe and and remaining decentralized right so this is something that we've been thinking a lot and we came up with a set of customized customers available infrastructure to help building their own operations and running this in a decentralized way what this infrastructure means are different set of pieces um that we that we basically built for mimic the core one is our Smartwatch which is one that I'm going to talk about in a minute but at the same time we have other pieces like automated Bots monitoring and notifications uh crocheting deployments and growing your permission layer all the things put them together will help different uh different projects in this space to automate their operations so let's see a few examples before we go into the technical details which may help understanding the idea a little bit more one of the first um use cases that we that we worked with was decentraland the central had a common use problem I would say which was they had to sell Mana at the end of the month every month to pay different uh operations or cover different salaries pay grants and all that which was kind of difficult I mean for a dollar or it wasn't that easy um because they had to craft all different sizes manually publish them into that or go to remote team and they have to do it kind of quickly because if you're dealing with prices and slippages it's not not something easy so with uh with a mimicus marble this is extremely easy to do because um they simply need to deploy this model specifying a set of configuration parameters for example in this case they had to only swap stuff so if you can agree which is the max leapage that you're okay with and which is the I don't know the gas price limit that you they're okay with with the network um then we can automate all that stuff trying to find you what's the best price between different indexes so they don't have to do that manually and it was extremely easy they just needed to fund this marble and then the Bots will start running and do those swaps for them and withdraw the money back to the dial another um quick example those um super interesting to do with mimic with abridging smart board for the Excel so again it was a kind of similar situation the Excel was operating in many layers but mainly we developed this for mainnet ethereum made it and no switching so they had this issue where they sometimes they had to bridge funds from one layer to the other again to very operational costs or or carbon different expenses or to invest money in different chains and again it was kind of hard to do that with uh I mean through a boat enough or through the Dow itself right like having to craft all that transaction manually publish that to it I'll go through the Boating process and then crossing your fingers that it went through to reach assets and then waiting for a few hours to happen to see if it appears on the other side it was I mean it was nonsense for them so again doing that with Fireball is extremely easy which simply since we have like cross-chain deployments which simply mirror the same smart volume both genes they simply need to send assets to to one smart one it will be reached to the other one and and that's it again they always have to configure which is the parameters that are okay with like reaching fees or gas price or slippage Etc um but all those things can be automated and at the same time they will remain um secure because and at the end they always control the funds he's not uh control or custody by by mimic so let's go into the details a little bit uh what is actually uh it's a marble so as marbled is a set of uh what we call actions these actions uh were modeled after learning a lot of uh again the device space we've seen many projects trying to perform kind of similar operations in the in the space and what we did was try to model all these like Lego pieces into us into what we call a smart wall these operations are things like wrapping assets um depositing or investment investing swapping bridging well all the things that you see here all these things are kind of Lego pieces that are modeled into a smart ball and you can you simply need to specify how you would like to put those pieces together to perform whatever operation you would like to do um there are certain actions that kind of depend on more specific Concepts like swap Bridge or any investing or borrowing action that has to do um I mean it's it depends on how that if I protocol you like to interact with it depends on that so all these kind of actions are modeled using what we call connectors these connectors are simply like a standard interface that we model with all different different protocols in order to perform like more complex operations with this um mimic is by default covering many for example Lexis to operate swaps like uni swap balancer also aggregators like one inch um Power Swap and others the same happens with the bridge in actions we're using hub uh lee finance multi-chain and all that and there are different protocols that we're really integrated with to perform different um like investing operations like curve balancer unit swap compound like many others um and again all these pieces are already built in into a small world you simply need to specify how you would like to put them together to perform any customer operation and of course I mentioned a few times that these operations can be automated and we have a uh what we call Bots or relayers which are going to be the ones in charge in case you would like to automate these operations it's not mandatory if you would like to operate your smart ball manually you can do that but if you want to automate to avoid performing recurring operations manually you can again specify some different parameters to make sure that your actions remains risk-less like again gas limit which is slippages like things that may depend on on on on the network and you can specify all that to make sure someone else can execute that action on your behalf um the good thing is that um you don't need to like prefund your smart World in order to do this uh our automated Bots are going to use the tokens that are flowing through reaction to pay for the gas transaction and and it's it's it's um extremely easy to to use let's see if we a few more complex examples um something that we've been seeing a lot in this space it's uh about what we call feedy solution so that there are some some exchanges um or most of them they usually charge a fee uh on the on the on the token out right of a swap so they have this issue that at the end of the at the end of the day they they started earning different fees in different tokens in different layers and for them it's extremely hard to at the at some point uh move all those tokens into a single token into a single layer like if you had to do um all those swaps and breaches manually again it's insane um and with a smart board this is extremely easy I mean you can we can simply configure um a smart wall that will look into the best prices between multiple exchanges swap those tokens into a single one let's say a stable coin and then for example migrate all the or Bridge all the L2 stable goings into magnet so automatically they will have at the end of the in a single wallet they will start saving saving those fees uh like say in usdc automatically again they can configure which is the the slippage they're okay with which are the taxes that you would like to operate with if they want to Define certain thresholds of amounts like I don't want to swap fees that I don't know don't reach at least two hundred dollars or something like that um so again it's this was a really good solution uh we already implemented with for Power Swap which is already running and we're currently working in a similar one for for balancer and this was uh this this is another example that was um really uh interesting for us uh trying to do a little bit of dog fooding here um we've been uh we we decided to model as marble for our own use case which was uh how do we keep our Bots with enough money to pay for all these transactions so I mean they simply don't run a lot of money and basically break everything um so it was uh it was interesting because what what we did was um try to build a summer world that will basically detect the the fancy in the Bots and they will basically swap uh all the the fees that we are collecting for the native tokens on each layer to fund the bot in case it was running out the funds so this mobile is out there running with the simply don't need to care about our Bots they're always with once and if they reach a certain threshold below um of of a um a balance below that threshold it will it will be funded by by this marble so what's what's next um we're currently as I was saying um we develop of all this infrastructure which is uh open source um and we will love more people to come and start building their own custom operations with this smart bolts um but currently what we're trying to do is work closely with different projects to understand their needs uh grab more feedback we're trying to um to improve our solutions to see if we want this want this to be extremely easy to use um so we're working closely with them but at some point what we love to do is to again for developers to come one day to model their own operations without our help so we're going towards that place um if you have any questions um I I think we have some time to ask questions otherwise you can you can find me um Twitter Discord um you can text me if you want oh okay we have some time for for questions so I don't know if someone would love to ask any questions or Worse okay there's a mic coming how do you get info uh such as like slippage limits and how much output you need for certain swaps like is that collected off chain or you can you put the mic sorry um how do you get info such as like the slippage limits for swaps and what sort of output you should expect is that done off chain or do you fetch that info on chain no all these all these uh kind of rules that you define your yours marbled are verified on chain of course um that's we can keep you safe um yep hello uh um so you would Define yourself as more as a yearn as a service or kind of anyone can plug in and build your own Vault um and can you have different of those uh functionalities into one Volt or is it one functionality per volt like modeling diff like multiple operations in a single ball yeah yeah you can do that yeah for example um yeah I mean you can do that um you you need to Define I didn't talk about this today but you you can Define like different triggers like if I do this I would love to trigger this action like I don't know if I send money to this wallet I would love to drop it and then invest it in curve let's say but if I send money to this address just pick it up and invest money in in another different protocol like you can you can build triggers to inform this model what you would like to do um yeah but it's yeah you can model that well okay okay guys thank you very much [Music]

Automatic transcript — names and jargon may be misspelled.