DeFi and smart accounts: resolving UX challenges - Andrei Kirkkonen | Safe{Wallet}
ETH Belgrade Community·Mon, Oct 7, 2024, 12:00 AM
Transcript
thank you guys um I'm Andre I work for safe the company that was uh previously called gnosis safe probably well known to the whole blockchain Community uh under this name and today we're going to cover the uh Crossroads between um decentralized finance and smart accounts so um question to the audience um do any of you use decentralized Finance in your real life defi one person really like never okay two persons okay nice not too bad um swaps Unis swap something like that right yeah you get it right right we're going to cover that today um just to remind you like what is the problem with defi so this centralized Finance is really cool it's going to automate a lot of complicated Financial operations that's why the transactions um the operations that are happening behind the scenes are really complex so if you open just something that looks very simple like a swap of u e to usdt looks really simple but in in under the hood there's a bunch of things happening so that's one thing about decentralized Finance another one is that uh decentralized Finance is still extremely prone to all sorts of hacks sandwich attacks to be named um also Protocols are constantly exploited and stuff like that so there always a a danger of uh losing funds still even though it's 2024 like a lot of security measures have been taken still this is quite frequently the case so people tend to use uh to lose money and finally uh one one kind of um issue with decentralized Finance that's um quite often you will have to submit several transactions to perform some some actions so for instance like when you have to um swap ethers to usdt you will have to first rep ethers into rep either then you have to approve usage of your rep either to the contract and then at the third transaction you will execute all that so three transactions in a row these are the problems uh of defi now smart accounts have any of you us used smart accounts okay also not too bad um what smart accounts if I can ask I mean smart smart contract account I mean okay um so uh this is something that has become pretty hypy in 2023 due to the account obstruction EIP um going life but uh safe for instance like gnosis safe used to be smart account really like many years before that so what is a smart account just for those who are not really familiar so it's a smart contract essentially that has uh one or more signers and that uh you can kind of encode a bunch of uh different complex logic operations into the smart contract enable a a bunch of cool things so that's uh just to name a few of these so for instance like if you use if you lose a your pass phrase of your metamask account or whatever externally owned account your funds are lost so in case of smart accounts there there are ways to set up recovery procedures and there's a number of them that's are off topic for today so I won't cover this in detail but thing is like you can recover your funds in most cases uh enhanced security like I said a smart account can have uh one or more signers so potentially like if you hold like millions of uh dollars in your smart account you can assign like multiple signers you can store multiple Keys you can assign multiple people and can have multiple parties responsible for that and you can change them so that's uh that works in favor of uh security that's why many Dows and many companies use safe to store their funds there finally uh the fees potentially can be paid not just in the ethers uh or like any native coins depending on the network you're operating but also in the funds that are stored on the smart contract including your c20s that's a theory at least that's I mean not a theory but it's not yet widely used out there but it's it is possible technically and finally uh very important thing like like I mentioned previously up to three transactions can be uh uh executed to perform like a simple uh defi operation so for smart accounts these transactions can be bundled and we will cover this in detail uh later so now uh in Theory smart accounts are kind of really solving it all but in practically like what we have is um if you look at the tvl um okay now uh almost all of the funds stored in smart accounts are stored in saves uh while there's a bunch of other smart accounts we are holding the most of most of the money there and uh we like we safe uh we have a lot of Legacy we have a lot of uh existing user needs so all the Innovation that I showed you previously it takes time to implement it live test it and make sure it works for the general public um and uh another important thing to mention is that if you take the number of transactions being made from the smart wallets most of the transactions are going to be multi signature accounts meaning that uh the smart contract has multiple signers which adds another layer of complexity which I will going to show you in the the next slides so uh let's uh let's make a show show let's make a case uh with Unis swap Unis swap is the most popular uh decentralized uh finance application safe multis is the most popular smart account so what can possibly go wrong um I won't really go too deep into each step so but I'm going to show you how many many steps it takes to make a swap in safe using Unis swap so you have to connect a wallet uh using wallet connect in multiple steps jumping from one tab to another then you have to go back to Unis Swap and compose a swap then you have to confirm a swap in Unis Swap and I'm going to go back as the first signer to the safe application um you have to review permission to WRA uh the not not you have to review permission for the rep either uh and then you have to sign then you have to switch owner sign again when wait until the transaction is executed get back to Unis swap then you have to review the permit to message uh we won't cover what is permit to in this case but just it's uh all in all it's just an approval for the contract to use your tokens and so 15 Steps up until here so you sign the message and then you go back to the safe UI so a lot of steps a lot of steps this is the this is something I've done myself to prepare for this presentation I was super frustrated so 18 steps uh 21 steps okay perfect so finally I got my simple swap submitted to Unis Swap and then I realized that the swap failed um I tried to investigate the thing so I went to Unis swap UI uh I tried to get the hash of the transaction then I got back to the safe UI and all that I could see is that uh just the plain hash data uh which wasn't really helpful so I couldn't understand like what's going on uh as you can see on the Unis swap UI kept uh R rolling like that uh then I took the transaction hash went to polygon scan nothing was there so I was super frustrated but uh in the end it happened I actually when I went to the assets I realized that I actually got the assets but the transaction St St for some reason not sure why maybe the event listener was off whatever so this is just a illustration of how painful it can be to um connect two different smart basically two different protocols a bunch of smart contracts of Unis swop a bunch of smart contracts and safe so there's no way to automatically make it awesome looking and uh nicely used unfortunately so uh what we decided to do in the safe team to to make um the life of the multi signature accounts easier um we introduced embeded swaps um we have chosen cow swap as the Strategic partner for that not Unis swap for a number of reasons um and we have introduced the nicely embedded uh we nicely embedded the cow swap into our UI for easy access we will show you later um cowos swap is famous there basically invented the concept of intent based swaps that is something that is now used by Unis swap by 1 in probably by someone else but cow swap for the first ones so intent based uh really in a nutshell what does it mean so you don't actually execute your transaction yourself you submit an intent that I want to do to swap X to Y and then you submit this intent and then the protocol uh the solvers of the protocol do the complex maths do the complex execution for you and you are stracted of that so you just basically submit an intent you sign it and then you get whatever you're supposed to get and uh we actually done some transaction decoding to battle this case with just seeing stupid hashed data without any information like what it is about um and last but not least we bundled the transaction so you saw probably in the previous part that how many times I had to submit three transaction how many times I went back and forth from safe UI to Unis swap from safe UI to Unis Swap all eliminated with bundling intersections um so to act now so then and now to access uh swaps you just have to go to the assets or to the swap dedicated section you have to compose a swap right in the safe UI you have to confirm a swap right in the safe UI and then you review your approval and you see now what is the difference here that you can see clearly what you're doing you kind you're swapping this into that you're seeing what contract you're ex interacting with so all the details are here uh in a human readable format unfortunately it's not possible uh that's the big problem of all the blockchain industry since all the protocols are different it's not possible to write a logic to decode all the transactions in the world in the human readable format if we're talking about smart contract transactions with these complex contract interactions and stuff so if we're talking about send receive this simple stuff yes it's it is possible if we're talking about smart contract transactions not possible so you have to do custom logic you have to invest time into decoding this stuff in the UI that is the big problem and um and basically no solution for this thing so far so um a lot of manual effort of developers is involved now then when you have the overview done you sign you switch wallet to the to the second signer uh because we're talking about multi signature accounts two two signers and then you execute unfortunately didn't man didn't manage to uh make a screenshot uh and then you wait until the transaction is executed so there are eight steps instead of 21 um and then that's it you just review your transaction and again you see uh instead of hash data you see okay you see nicely decoded what's going on now um this is a little bit outdated because I submitted my presentation uh last Sunday actually basically we have even better statistics now so what we have done in safe um since we we prefer to be very gentle when we introduce some new stuff so what we have done uh we didn't switch off any of the Alternatives so basically as a safe user you can now use a bunch of ways to swap stuff you can still use the wallet connect the the bad option I showed you with Unis swap you can use embedded safe applications you can use whatever and you can use the something that we use we call native swaps even though uh so we consciously left uh this field for competition so we didn't want to switch off any options because that's basically the philosophy of safe even though uh we managed to get uh like almost a half of the volume uh for cow swap that switched to swaps to native swaps so which is not bad um what's next so how can we make it even better uh yeah but a very important disclaimer that's not a ro map of safe it is just my ideas of how things can be even better so um we can introduce more embedded Solutions uh like I said um unfortunately when you work with smart contracts with defi protocols it has to be manual like handcrafted integration each time you integrate a new protocol so basically the only way to make it nicely usable is to manually integrate and make more embedded Solutions which we're going to do um including not just swaps but also staking Landing bridging probably something else um gasless order submission uh currently you still have to pay a tiny amount of gas to publish your signature to the blockchain due to some technical restrictions uh won't cover them in this presentation to complex uh but there's a way to make it completely gasless and uh session Keys is something that um makes so basically with session Keys you give uh permission to the app to sign on your behalf which actually makes it even easier you don't even have to sign anything you just press Swap and stuff happens like on centralized exchanges so that's session Keys uh supporting more platforms for sure um browser extension is something that can help potentially with uh working with U third party applications we don't have a browser extension yet but that is something that we can probably uh introduce later uh trading automation is uh something that you set rules specific specific rules and you let the application do the trading for instance on some conditions if the price goes down to this or not higher than that perform uh a trade in this Direction between these assets and stuff like that so this is something that is actually coming shortly in safe we're going to have um Advanced um swaps with this automation stuff there and finally the last but not least cross chain operations something that is missing currently um sadly uh but something that we're going to work on is uh we're going to integrate with uh probably uh cross chain swap dexes or see how can we leverage the existing solution and uh there's a whole big topic about cross-chain swaps they are even more complicated than the just normal def operations like X10 I would say more complicated than the normal dii but still um there's no other way other to other than introduce that an experiment and make it awesome um yeah that's uh pretty much it I didn't prepare the final slide but uh but yeah any any questions guys about the smart accounts uh account obstruction defy okay perfect um so then um I suggest you have a good good time today and uh that's it [Applause]
Automatic transcript — names and jargon may be misspelled.