DAPPCON 2019: Smart Wallets for Smarter DeFi - Itamar Lesuisse & Julien Niset (Argent)
DappCon 2019 · August 2019 · 23:48
Itamar Lesuisse and Julien Niset of Argent discuss smart contract wallets for smarter DeFi at DappCon 2019. They cover how programmable wallets remove seed phrases in favor of guardian-based recovery, aiming to make interacting with DeFi protocols and smart contracts more approachable for everyday Ethereum users.
Speakers
Topics
From DappCon 2019, hosted by Dappcon Berlin.
Transcript
let's get started thanks everyone so I meet Tamar one of the founders of argent Gillian here is one of my co-founders the idea today is really to tell you how smart wallets can enable better defy so we'll do two things first we'll present you how Arjun helps you navigate better and smart contract wallet in general to the world of defy and so I will start I'll do a demo so you can really get a feel of it and then Jillian will explain you what's under the hood we'll let you know when we start that part in case you want to leave and go somewhere else but it's quite interesting too so let's start a bit about so some context on Arjun and
why we started Arjun you know quite obvious we looked at the we started interacting with the theorem as users we thought what would it takes to get a billion people use crypto and clarabel there were too much friction too many issues to name a few it's way too easy to lose assets we felt there was nowhere billion people would write their seed phrase on paper I mean we've told people for years to not write the password on the first date they finally get there and then we tell them not to write a seed Fred on a piece of paper in general it's quite scary to transact easy to lose a lot of money with a mistake and interacting with Deb's was was too painful so we thought can we can we build an experience that
would feel like in 26 revolute months or whatever the country are in so something super sleek but fully noncustodial some of the feature we needed to solve was about fund recovery ability to block fraudulent transaction like you would have with your bank freeze your account if you lost access to it trusted contact no transaction fees we fell people couldn't have I mean at scale a billion people wouldn't set a gas price in their app and also get rid of cryptic address because we don't think it's a very safe and an easy way to to interact and to send funds so really look at all this
problems and basically solve them one by one so I think the best is that they show you how it looks and we for us it's about the fact that the smart contract wallet allows you to have programmable money and so suddenly we can put logic in the smart contract that solve most most of this pain point so I'll start straight away with the demo I see more people coming notes come in come in let's this is the perfect time okay so let's start with the demo you can all see that so when we think about the file we really start with the basics which is actually you need to be able to hold funds very securely you need to be able to move these funds you need to be able to recover these funds
and then you start doing more fancy things around around defi so let me start I open Arjun it looks like you know looks like a wallet with all the usual wallet stuff but I will start by showing you why we don't ask you for a seat phrase so in Arjun when you start we do not ask you to write down a seat phrase we assume you can lose your private key julia will give more details on that but what you define is basically guardians and that's exactly the experience you have with your bank when you lose your wallet you call your bank you said i lost my card freeze it send me a new one with arjun you can do the same your fully trust let's weigh unchain with guardians it can be any a theorem address so it can be friends and
family we have the arjun app so it's very easy to take for them to take that role if you are more advanced user and you have millions of dollar you can use a hardware wallet you can use three hardware wallets at guardians and then you can use a service like Argent's offers a service and we can take the role of guardians and this guardian never has your private key it doesn't hold your funds doesn't hold your private key doesn't hold a shard of your key it's really is his own key and you give him the right to take some security-related action like recovery i won't show you that because then I would have to recover my wallet it takes next time there's a security period so let's start to get into the most more fun stuff so the usual thing I like to start
with is let's an ad I and I go a bit quick on purpose to show a small cities to my co-founder Jer I want to send him die and that's the confirmation screen while I do that I'd like someone to help me with something if someone can pull out a wallet on their phone or the computer and just prepare QR code for me so I would need a theorem QR code for the next next part if someone can do that so here I'm sending a dive important screen on that screen you do not see any ethereum address because every user in origin gets a free ns so Gerald are gendered X Y Z this is e NS and you don't see gas because we have abstracted that complexity we actually subsidize and pay for the gas so basically I'm sending
money like I'm sending money on venmo very smooth quite instant but not let's get into okay more people for the best part of the demo let's send more money so anyone got a QR code here okay let's say what's your name I did someone I don't know I know you but that's fine I don't know Ruben so someone had access to my private key and I will send money this is live you see yourself I scan your QR code okay so it appears here and I will send I have 65 ease so I'll send Ruben 65 is $12,000 okay so I continue if you remember the Miss ending one die
that's the final screen so send money to Ruben you don't have an NS you need to download argent and that is fee although I know you have your own yen s let's not get there so that's the final button I'm tapping on it you already so I'm sending Ruben 65 is what happened here is that the smart contract that's important so it's not the app it's not some fancy back-end the smart contract sees a large transfer to a person I don't trust to an address I didn't trust so that transfer I could go ahead but it will take to leave hours I would get alerted and then I have 24 hours to cancel that runs fair so even if you have my private key you cannot take my funds that's really the
foundation of waiting it's super super secure being and also I I'm much more confident and relaxed about it because I know that if I lose my phone or if it's compromised you can during my account and I will be able to recover my funds so sorry when you don't get you don't get the money I would cancel it I would trust you to send it back and this by the way is on chain on main net it's all a lot of users you you'll be welcome to try it so I do cool feature so I could say you know what I trust Ravana I will whitelist him and from now I can make transfer instantly of any amount turban so now let's get into the more fun stuff
first thing sometime you might want to do in defy is to to buy a die so you know we have integrated khyber network it's as easy as this and I just bought a die in literally three seconds that's all it takes but that was a simple use case other people have integrated decks now we'll go into the finance tab and do something more complex so we've already open a maker CDP here ok quite a few is it of slick experience too many transaction it so it used to be seven transaction with their proxies four or five a lot of issues in the process you approve ten to the 59th of your die there's a lot of interesting stuff let's open a maker CDP
live and let's do that so I want to borrow crypto with maker there's some information 20% APR 30 percent liquidation penalty nice I'll set my collateral to 5/8 yeah I want to borrow 109 okay that was my wife sorry I'll review my loan I'll review my loan I push on a button I have just opened a maker CDP and that took me five seconds 10 second only one transaction I think anyone can open maker open such CDP obviously some people might want to grow their holdings with compound put some
dye there I'll put 50 die and I've just opened a savings account on Arjun I don't know about you but that's much easier than then doing that with my bank back Londyn so so I would say that's that's the demo of Arjun I think you've seen most of it there's a lot of more cool stuff we are doing but basically it's really abstracting all the complexity if you think about it no more seed phrase no more gas no more complex approves into an action you just anyone can do it it's not different than joining and 26 or joining I did put it into not disturb but you cannot block if you look at the phone it detects it and so it still show you the transaction verification so
basically anyone can do it my mom can open a CDP there is no more there are the zoo they are the zoo awesome there in Berlin with my daughter and it's an awesome city so I get a consent date so my wife has open know she has a put her or money in Dana compound she was more interested within CDP's much more niche for this reason compound was really the big explosion where everyone everyone wanted to put money in compound I think I'll let Julia talk about the Morris much more interesting part thank you I assume the clapping is for me so thank
you so how does the origin what it works so basically as you've seen it's a mobile application that interact with the smart contract based wallet so basically what happened is that you have a key in your phone but that key actually has no fans it's basically act as a remote control for your real wallet which is a smart contract on Shane so basically when you make a transaction your mob your key will just sign an intent I know it is people could it meta transactions this is really - the blockchain and this is by the way how we abstract gas and then finally the transaction arrived at your smart contract which will decide if the transaction is legit is it really the owner of the wallet is the context correct any phase the transaction will be processed by the wallet so we are a
small contract based wallet and we've we've taken a an architecture which is a bit different than most people so basically when you have an urgent wallet what you have is very simple contract that we call base wallet and when I mean simple it's less than hundred lines and then we have a set of modules and each of these modules contains a different piece of the business logic so for example if you want a hard guardian you need to send a transaction to the Guardian manager module which will check that the contact is valid do you have you know is it a legit guardian or mini Guardians do you have do we have we already had it that guardian and so on all these modules except meta transaction and actually regular transactions and what's interesting too is that modules are shared between the different users so
basically there is one module for all the Argent users but each arjen user as an independent as its own base wallet contract which holds its phone in its identity and so actually if you see in green that's the flow of a transaction so when you want to interact with your wallet actually you don't interact with the base wallet you interact with the module the module will verify authorize the transaction verify the context and if yes will instruct the base wallet - for example transfer your funds why this architecture it is interesting is because actually it makes it easy to upgrade if we want to add a new functionality to argent all we need to do is basically create a new module and then users can authorize that new module if for some reason we want to improve a functionality we can remove the old
module and then add a new one so it's really like plugins you can think of features like plug into the wallet what's of course important is that only the owner of the wallet can add or remove a module so we are genève no control on that all we can say that we can propose modules and of course these modules they need to be authorized by Archon at some point and so they are part of what we call the Archon registry and then users wheelie on their app will say okay I want this feature I'll grade my wallet and suddenly the base wallet authorizes a new module to basically interact with it so it's quite cool to to upgrade and make the wallet evolve and another reason why we took that role is because actually it's really easy it's maybe not a good word when we speak
about editing solidity but it's easier to add it so my contract of course is something that is scary they tend to be long it's easy to make mistakes and so auditing is of course critical in terms of security and having a modular architecture provides good separation of concern because you can reason about the different contract individually you can reason about the baseball 800 line you can reason about a module which will be a few hundred lines and you can just think about that module so yeah I'm giving in some benchmarks oh yeah a few hundred lines for the big wallet and five hundred lines for modules so what does it means for dfi well what's pretty cool is that when we started integrating
defy protocol we basically created new modules so our integration with maker we created a custom module that we call maker manager and basically that that module will orchestrate all that needs to be done with maker so it's of course better for the users as you will see instead of having to make seven transaction with meta masks which can take up to 30 minutes the user just make one transaction to the module and then the module we orchestrate all the interaction with the wallet and with maker it's also good in terms of security because if you're castrate the different interaction for example that that necessary approved that you need to do on a traditional dabs when you approve 10 to the 59 tokens well here the module can actually just approve the
token that you need to approve and again so that we use that increase the security and as you will I will show in the end you can start combining protocols and for us of course that's why we say programmable money is that it you can really leverage I mean a protocol is like a financial protocol with open API we didn't ask maker of course we know maker but we didn't have to ask them if we could actually integrate maker we can build our own smart contract that integrate with maker and so you can start do plug in place with different protocols that I will show in the end so as it emerges ask those when you open a CDP with maker you actually need to make seven write transaction you need to convert your it
to wet approve on web create your CDP join your CDP to convert your wet into pet approve your pet lock your pet on your CDP and finally draw your die so that's like seven transaction just to write and then of course you need to make read calls to get some information for example what's the conversion ratio between wet and that I'm a bit lying because no today maker has introduced proxy so actually it is less transaction for the users but the principle is the same you do need to make seven transaction and interact with three different contracts so as a user this is not something that you do you want to do and if we think about programmable money you can imagine this different contract as as legal legal bricks but if you have to interact with
them individually it's like you have legal bricks but they don't feed with each other they're not connected now if you start if you want to do the same thing with Arjen and if this is what Itamar showed when you click on open my my maker CDP it's basically we made one transaction to the maker manager that started to do interaction interact with the base whether it interact with the different maker contract and for the user that's one transaction so if you put enough guys that's like 14 seconds or 30 seconds to be confirmed and that makes the user happy so if you come back to the an analogy of Lego bricks it's like suddenly we have assembled this Lego brick to build something new we have the Archon brick and then we have
three different maker bricks that we have combined to create a new block something new that and we think that it is of course pretty cool where it gets to my opinion even cooler is when you want to close the CDP with maker for those that have repaid some of their depth or closed the CDP actually you need to have died because you need to repair your die but you also need to have maker token to pay the fee to maker and most users don't don't have make a token so if we start orchestrating all these calls in the maker manager that means that we can actually swap some eater for maker token and in this case we do that within this one so in one transaction we interact with any swap to get maker token to get died and then to
close your CDP so actually you can close the CDP on argent having no die and no make a token only enough eath and again that makes it much simpler and safer for the user and that was the boring part no fun stuff from Itamar again so since we have a since the room is way more busy you know what I'll quickly have time to redo a demo of how I open a CD P sorry for so doesn't show it but I think it's really cool after what Julian explains so I will open a maker CDP in front of you in five seconds I've defined my collateral I define what I want to borrow I review
my loan and I take that loan and that really takes five seconds and while we are there I will put some money in my compound savings account don't and for those who weren't there I've also sent $12,000 to Rouen and my smart contract has stopped that transaction it is the safest simplest way to interact with them with etherium so what's next so this neat what we call this native integration like compound lie maker the way we see it we're not gonna integrate every tap in the world we see that more as core functionalities that belong to your wallet your and such as trading investing borrow its financial you you
it needs to be part of your wallet and we found amazing rather than building it ourselves we found amazing protocols out there and we could build these financial projects for our users we're obviously interested by these the world of depths out there and also outside of define and so we're working on wallet connect that's coming very soon and we're quite excited also of the way we are doing it so with our gen wallet connect you will not be doing an approve of 10 to the 59 of your ERC 20 we are tackling this kind of issues and it will also work with our daily limit security feature and then we are very excited about our ramp we are right now looking at solution for Europe working on
solution for Europe and us especially if you had to stable con is what we are very excited about because this kind of feature you saw in Arjun is something and anyone can use you don't need to be you know a crypto addict to do that anyone can open can put savings in compound with that so yeah that's what's what's next for Arjun what's next for you if you want to have a try you go in the App Store in the Play Store you don't know the origin there will be a waitlist you use that link so Arjun turtling / dub con 19 I think that's valid for a hundred people so hundred people will be able to access to skip the queue with
that if there's an issue you just find us on Twitter we'll help you or you'll find and we're on twitter at Arjun HQ and we have time for questions yeah there will be a talk at Def Con Dharana / so the status of hopper photos don't know it's a mixer we open source so we did the smartphone as much contract mixer fight theorem so Malik Dow as finance a team to build the front end so it's happening now I'm looking they are wrong now it's it's we met them
yesterday I think that doing good progress they told us it will be ready by DEFCON we are making a presentation there so it better be ready so by DEFCON there will be a web UI to use I would say mobile proof-of-concept I don't know if you have seen it it's literally it's just actually there is a button where you can push on the button it's not I would call that a mobile UI one software is there anyone anyone that can implement it Arjun could implement it anyone can can do that yeah but but the web UI will be key to get really method option you need a lot of volume for mixer too
so that's our next priority so we're working on the US there will be an on-ramp straight to stable coin that anyone basically can use so that's our top priority with that anyone will be able to open a savings account not yet but I think that's the kind of the use case at out there I use Kasich savings account I think they are very compelling the building blocks are starting to get there to do things like payment directly
from crypto to big Ivan or or Shana I don't think what too far from there what we are really dealing with you scared you scared after use case sorry so know right now we don't think there's a strong compelling enough use case for payment right now we script Oh people hold their sets for a long time because especially if ease or non dye assets but even with dye especially in Europe with the spread with the exchange fees you will end up paying in a shop and news two to three percent that's why realistically it's not yet there there's a lot is more to be done before we can
get there I think it's over but find us on Twitter and to get your access just use that link and ping me on Twitter if it doesn't work for any reason