Powering up intents in DeFi
EthPrague 2024 · 1 Jun 2024 · 17:43
Lukasz Stoczynski explains why connecting with DeFi is cumbersome when every protocol requires its own integration. At EthPrague 2024 he presents plans to build an intent-centric DeFi aggregation layer that allows seamless and automated interaction with any DeFi protocol, so users and applications no longer need to integrate with each one separately.
Speakers
Topics
From EthPrague 2024, hosted by ETHPrague.
Holešovice Market
Transcript
[Music] okay it's time um let's welcome Lucas St zinki uh with talk powering of intent in defi go for it hello hello does it work yes hi everyone uh my name is Lucas stinski and uh we're talk about paring powering up intents uh in defi so I'm head of Business Development um at mimic and we're going to talk about how we have powered up intents uh in our uh protocol our product to um improve the way we interact with defi today um so to start
up I'll I'll introduce mimic a little bit um so we are a startup operating since 2022 and we have started uh building our automation tool um initially uh as a for our friends from balancer and Paras swap um where they needed some help with conversion of the fees and we started um automating them for them um so over the time we have noticed that there is a huge demand for uh automating various defi operations um and since then we have had two different iterations of our product and now we're heading um to a third one um to a fourth one actually um and we're being a automation tool for the top industry
projects in managing their assets uh we we're working with some of the top leaders uh in the industry and we have help them process over $3. billion um in assets to date um so uh to start with I would like to um get this uh to ensure that we are all on the same page and we um with with what we mean by intents so the traditional way of uh operating in defi um is that we have to both Define what and we have to Define how so if we have in this example for example if on the main net and we want to receive usdc on optimism uh which is our watt we have
to define the how and go through two different protocols so we have to first Bridge it from um main to optimism and then we have to swap it from if um to usdc which are usually two onchain transactions that we have to perform obviously we can revert them there's some protocols that are improving this that you can do it in a one transaction already but still the the mental model here is you have to sign a non-chain transaction and execute it at the same time uh when you're uh performing that um when you want to perform this this transaction um so the differ with uh intents um is that we only have to Define what so intents are um in a way um they're signed messages that only um
uh accept the defined uh end State uh and the potential constraint then don't defy how the transaction is uh executed finding how is uh usually in the in in the hands of the third party which is called solvers or fillers so coming back to this example we Define our W so we have the uh we Define the source and destination chain the source and destination token we um Define what sort of amount in and amount out we want to receive then we sign an offchain transaction which is usually gasless um and then uh the the solver is executing the transaction on our uh behalf um so uh we have seen so intents are in
general an improvement already from the traditional way how we operate with Defi and since uh this concept was introduced we've seen some impressive um implementation mainly from Unis swap X onein Fusion car protocol uh but from our learnings we can see there's still uh a certain Improvement margin here for for um improving how the intents are because there are some common challenges that we have identify so today um most uh intent based um protocols they're isolated Proto inent systems meaning that if you create an intent with certain protocol it can only be executed in that same protocol
um there're so far incompatible standards uh each protocol is creating their intent infrastructure in their own way there are some attempts to standardize it uh with things like an's intent machine or the recent ERC um 7683 from across in Unis swap but we're still far away um from having like you know a compatible standard that everyone's going to be using um there are some also cross chain limitations and uh those intents are not really suitable for automation um so we have um introduced uh the oops sorry uh four different features that we uh that will power up those intents um and uh these are so our
intents uh in mimic they're authoriz they're programmatic uh they can be automated and you can add hooks to them um so let me put this to to this example so imagine uh you are a treasury manager and you have a smart account on arbitrum you're receiving various token rewards that wallet uh that you want to convert to usdc because you just need a cache for operational processes so you you don't have time to do it yourself so you want to authorize your employee to do it so you can create you can authorize your employee to create intent on behalf um of uh that wallet that you're receiving uh the funds but they can only be
limited to certain ways so they're not going to receive the full access to that wallet they're only going to be able to um uh perform that given um uh operations so the employee um is has got the authorization over the account but now we want to be more specific and we want to make sure that they don't do any other transactions than what we intend to so what we can do is we can specify the predicates under which they can create intents so we can say that the only destination token is going to be usdc that the minimum threshold the minimum amount that they can swap uh has to be $1,000 because we don't want them to swap like small amounts to be gas efficient uh and we can also um Define
the maximum gas which is going to be 20 qu so um by program programming those intents our employee will only be able to perform transactions that are specified um by this uh preset um and those intents obviously will be um filled by solvers um so um next our organization scales and our employee is you know not able to perform so many transactions or create so many intents on their own so what we want to do is we want to automate the whole process so we can authorize a bot that will be creating those intents on behalf of that U smart account which will get solved with um uh with solvers
uh so bot what what we need to remember because obviously you know some people can think okay we're authorizing a bot what if it get hack what if it gets hacked or um if there's any security risks so by authorizing bot to this uh very limited uh like the specific predicates we're making sure that the bot can only perform that certain transaction and no other transaction uh can be uh performed in that account um so the last Improvement that we have introduced is adding hooks to the intents so um what we can do is for example whenever our bot um is swapping
or is creating an intent to swap um the token to usdc we want to add a hook so it withdraws wallet to uh so it withdraws funds to the hardware wallet of the company so we can create that hook so every time um the the intent is solved then another intent is going to be created that will withdraw those funds to a destination wallet that we're going to uh specify and what's important to note uh hook could be any defi transaction in this case uh or any onchain activity it could be Bridge it could be stake it could be lending um so you can build very complex uh sequences of indents um that will be performed
automatically um and another thing to to remember remember is those hooks can be created both before the intent is created or after the intent is created uh um so it gives you a lot of flexibility um in the way how you program your uh intents um so this all of this is uh composing into a a mimic engine uh that is currently plugged into D5 protocols so we have got various Integrations on different networks um and this setup allows users to interact with non-intent protocols across several networks and um basically you can create intents and get
them uh solved with a non- inent protocols we're already utilizing this setup in few use cases um which I'll mention uh two of them so the first use case is fee collection so um we have an application that wants to convert assets to SDC on all networks and transfer them to a treasury wallet on the main net at the end of the month usually uh when the fees are collected from different applications uh they're usually from swaps or other defi activities and they are always um collected in the cell asset so those applications end up having um multiple tokens on multiple networks that they
have to do something with them so what we actually uh what can we um create so we can create this um this infrastructure where where we uh set those three presets we can also call them Master intents um so the first one is that we authorize a bot to swap all tokens to usdc on all supported networks with a minimum threshold with a gas limit with a maximum slippage we can create those predicates the preset number two is we um authorize the B to bridge all usdc from all the layer twos to main net once a week and the preset number three is you withdraw all the usdc on the main net to a destination wallet so what's going to happen is
throughout the month uh the B you know under the preset number one it's going to be creating various intents for swapping assets so whenever there is a u let's say 10 a they're going to sell it for a th000 usdc or you know whatever the equivalent of a of th000 usdc is going to be um the bot is create and is going to create automatically an intent and the solver is going to solve it same for um any other assets and once a week it will create an intent to bridge um all the usdc on various layer twos to the main it so we um start accumulating everything on on one network um under the preset number three at the end of a
month let's say it's like an end of a of a period uh the B will create an intent to withdraw all the usdc from mayet to a treasury wallet so in the end this application instead of having fees uh very in the very diverse tokens on different networks they're receiving everything um on Main net in usdc without doing anything you set it once and then um it operates um automatically the use case number two uh is swap as a service so an application wants their users to swap tokens while protecting them from too high slippage and charge them a percentage fee so what we can do so the application um Can preset this mod intent uh which is allow
any user to swap all tokens with a slippage that's below 20% um and then we want to add a hook to charge a 1% fee on each Swap and transfer it to any account where we're going to be collecting those fees so what we're allowing here is any user of this application under this master intent they'll be able to create their own intents for swaps um in this case like you know swap 100 AV for a minimum to Eve um they're going to be able to go like more specific in terms of the gas in terms of the slippage um uh and creating those intents um and obviously those intents will be um uh filled by solvers and after that the fee so 1% of whatever uh
the amount was sold is going to be then transferred to um a separate wallet as a fee collection um so what is the bigger picture here um so basically the way applications integrate with um uh defi today is very cumbersome um what we want to do is we want to improve this this way of integrating with defi because to give you this example if an application wants to offer their users a swap they're going to integrate like a x aggregator for Bridges they're going to integrate Bridge aggregators um if they want to offer them lending or staking they most likely have to integrate the
the decentralized protocols themselves like Lio maker a etc so what we want to build is we want to have a single integration to access all defi operation so mimic Procol will consist of three uh main components so we're going to have the intent based engine that we have discussed already we're going to have a network of solvers and our in-house Integrations directly with with d and then we're going to have a platform which is going to be the the front face of of that which will have like reporting monitoring notifications it's all going to be accessible through API and sdks um it's going to be obviously fully audited uh trust list and
non-custodial um so the single integration um so like who do we build it for uh oops I'm sorry uh so uh we're already as I've mentioned before uh we're already uh working with various customers mainly these are Dow wallets and defi applications um and we see that this use case uh is going to be applicable um also to um other customers uh fund managers any treasury managers uh various financial institutions and basically any consumer application that will want to integrate with defi um because instead of integrating all those different protocols as I've mentioned
previously they'll be able to have a single integration with mimic and they're going to be able to uh allow um their users um inter interacting with defi um so some potential services or like use cases um that we can see here is uh building complex trading strategies um doing treasury management rebalancing exiting and entering different positions fee collection as we've explained before um block trading so if a protocol wants to sell their native token but they don't want you know to have too much impact on the pro um yeah so block trading so if they
don't want to have too much impact on the price or on the slippage but they need to sell tokens they can do that that uh and they can also offer their users uh things like swap Bridge land or stake or all of them together through a single um integration um so as I mentioned in the beginning uh mimik started operating uh over two years ago and we already um have a working infrastructure and a product Market fit um we're a team of 13 and uh we have processed um over $3.5 billion in total volume um we have executed 6.2 million um transactions which um 117,000 of them were automated and then we also did 110 million
simulations of um uh of those um transactions um yeah so that's uh that's everything from me um if you got any questions feel free to to um chat with me uh after the presentation and thank you very much for listening thank you very much Lucas for the awesome presentation um do we have any questions for Locas no questions all right thank you very much thanks again [Applause]