DAPPCON 2019: Can Metatransactions Solve Your Problems? - Alex Van de Sande (Ethereum Foundation)

DappCon 2019 · August 2019 · 30:14

Alex Van de Sande of the Ethereum Foundation discusses whether metatransactions can solve usability problems at DappCon 2019. He covers how relayed transactions let users interact with smart contracts without holding ETH for gas, weighing the tradeoffs this introduces for decentralized applications aiming for mainstream adoption.

Speakers

Topics

From DappCon 2019, hosted by Dappcon Berlin.

Transcript

this is what my talk is about hey it's what our meta transactions and can they solve all your problems and the answer is No thank you for the talk see you tomorrow so anyway I hope you're listening about if you're hearing the term Mara transactions a lot and you're not I hope you start listening to it like hearing a beer a lot because Mara transactions are awesome like I want to make them awesome right they sound like something boring and they are sort of boring it is a little bit of technical term but they can be very awesome because they solve like most of your problems and what do I mean like but a Mara transaction which

is cool and a boring transaction which is not right a boring transaction is one like it's a normal with you introduction a one in which the user needs to understand gas and pay gas like what is this like I've been I've been on the space for four years like and and I've been helping people launch things and and everyone has the same problems right everyone starts and say why do my like I want to launch a game why do my users have to know what the gas is and what do I need to like why do they be Twitter to transfer my tokens around like they already have my tokens why do they like and my users are confused about private keys because they lose their private keys or sometimes they don't lose the

private keys they just make a bunch of backups and say oh I've been hacked how can I be in hack like what happened oh no you know where I took my private key and kept it on on iCloud and on and I uploaded jimmao and upload it to yahoo mail and it's super safe and I have no idea what could have happened right and it's terrible users are not supposed to like know these things and then and then there's even the thing that you have to pay fees to move things around if you want to create a new private key and sharing keys is a nightmare so what can happen with mera transactions with meta transaction what happens is instead of your funds being kept on on on a private key their

private keys are just used the sign message is ephemeral private keys there you use one and then you throw them away like and then you have a contract that verifies those those private those messages and does something accordingly and often that contract can be your target contract maybe can be an exchange maybe can be a token or maybe can be an identity contract that is able to execute anything on the blockchain and then anyone can deploy and pay gas that's the magic of it because suddenly you're you're the private key that is signing the message is not the same that is paying for the gas who's paying for the gas anyone really can be the DAP can be like a sponsor for the DAP can be the

user themselves if another token and and because of that the user can create as many private keys as they want and revoke as many private key that they want and then it's just one keeper device like so it's safer so let's talk about more detail on how that work right so first I'm a designer I'm not a developer and people often think that the difference between like a design between that clock and left clock and it's not like good design is the difference between like having all the other gears exposed and hiding all those gears in front of something which obviously means that a good design needs to talk with good engineering right they

are the same thing it is a conversation on trying to hide complexity so how does it work right it doesn't matter what do you do to your crypto app and like you can put illustrations you can put a bunch of things that's that's what I call decoration right you can make your quip track really look nice but you have to do two things every time one of them you have to create a key and then you have to put money on it right there's no way around it every time your users will be like be there for the first time do you have to do that you can like put it put it in pink and make it a nice and make an animation your users will need to do that and those steps are already

inherently confusing and what happens if they want to install in a second device or maybe a second that is not you or maybe like a laptop so they can do the same process again right so they create a key and then they put money on it of course it's a little bit easier because now we already have money on the other app but now they have two keys that they have to deal with and now they have two keys with money on it because like every time you move the money around not only your spending gas feeds you are always leaving a little bit of money behind so I think that's terrible either interface right you you don't expect that winning stole Twitter on your laptop and then Twitter on your iPhone that's gonna cost you money and then you have like little bits of

Twitter tokens around that that's the same thing the second thing people often do is that they they just duplicate the key and often they do it because of laziness right look I'm sorry I'm not gonna write down twelve words each phrase for the third time I'm gonna just be lazy I'm gonna take my metamath fee my meta message phrase and put it here which is super practical but it's terrible because when you do that to a new app you were just giving it access to all your keys for eternity and there are even ways in which people do that which it's not obvious that you're doing that but they are so for instance if you often you see people who are creating a new way to log in which is you take your

username and then you use your password to encrypt it and hash it multiple times that's also sharing your private key right see if you even if you can create a private key out from a password and an a username in a safe way if you do that to chew like different apps you are still sharing our private key it's it's bad it's a bad idea no don't do it there's a third way some people are starting to do it which is just keep their private key on a server which can be non-custodial right so sometimes you can do it in a very non Kasturi way in a safe way in a decentralized way that like this server themselves don't know your private key but still have the same problem it's just one private key that has funds if that server disappears you

better have a backup of your average phrase and when you have when you start that suddenly you have the same problem that you have a private key and then you have to share it with other apps then we are back to square one so how we can make it better with Mara transactions right because there are some and weave on the metal transaction world like on this magical matter transaction word what happens is that every device has its own key and it's sort of okay it's it's similar to what they had before but you notice that no none of them have any any funds on it so where are the funds toward the funder store we were super giant robot there right what is this right what we're

doing is that we are creating a smart contract account and that's the one who creates your friends right that Queen who holds your funds and all your private keys are just access tokens to them and you can revoke them at any time and because of its Amaro a smart contract you can give them limits and say hey maybe that's server key like you can even keep a key on the server but maybe because it's a remark on so you can say look I'm only keeping a key on the server but I can only use my server key if I don't have proved if I don't have access today any others right which is like a cool way of doing it so I can like give you the key and you have access to it but you can only use your key like the bank can only use your key

dokie recovery if you have lost all your devices right so you do banking not steal your money or like the custodial cancer your money and there's another finger bubbles can have a nest names because there are some too right what is the Nina sign it means that you your user doesn't need to see an hex address ever right they can just have like my dot name that if or something similar that and ie nest name is just a collectible it's just a nifty and so your robots can have nifty can have collectible then can have a bunch of other tokens and I think that that's awesome right so I think every user should have should have there only an SM

and I think you should give it a nice name to everyone if you want to send a heavy NS name its way mu 0 mu 0 mu G 4 times that if you can send stuff tariffs ones so like what's the short history of era transactions right a lot of people claim to be like the father of metal transactions I think the earlier examples I've seen is UD Matias did something like back in 2016 there's even an earlier examples like the German alarm clock from 2015 was already like doing things where someone makes a transaction on behalf of you but really what really is it's started getting a lot of steam in like last year especially at Def Con like sort of like

the name appeared and everyone was talking about the name and and we had like round tables and I think a lot of people have created stuff since then like I can talk about our examples I would like to talk about my thing which is universal login right Universal login is this idea that you can use although like all those steps I'm describing to make a much better login experience in which your users don't have to do anything right so imagine you have like two apps here like kickback and evidence I'm gonna start talking about kickback so suppose you have a browser and let's imagine you don't have a Firefox or anything like you don't have meta mess or anything so what do you happen there is that you

just type your username right I'm gonna type a username there and then because I don't have it I'm gonna create a username for me so it's creating it's gonna create a smart contract and it's gonna wait for me to send money to the Mart contract for it to send it and then we have a bunch of onboarding providers and I think there are there are many people who are doing the onboarding part from crypto to to from money to creep to and it's interesting because like each one works better in a country so you're we are in to eating a bunch of them and then like for like ramp works perfect in Europe if you have bank so if you are Europe will pick bank will pay will pick this one and then you can just go to your bank page do a bunch of magic and

then you come back and then boom I created a like as soon as you send money to it I will create a smart contract for you I created a smart contract for you which is that address on the top and then you can just follow on the flow of kickback and I think if kickback had support for 3 or 3 bucks we can even we could even skip that flow part there because we could save all your profit information directly on somewhere private right and kickback is a place where you can stake money in order to say you're going to an event and the idea is like you oh I won't ever sleepy to dis event I'm gonna put some money on it if I if I don't go I'm gonna lose my money if I actually go I get my money back and plus all the money of the

people who forfeited it leaving it's a super interesting app because it can attract people outside the crypto sphere but it's only gonna attract attractive people outside the crypto sphere if you never see a metamath if you never see a citrate or any of those and which is exactly what you were you seemed like there was no seed free there was no even no not a mention of crypto were blockchain you could be using kickback without even knowing what's happening behind and here's the even coolest thing right because while it was quick you still had to go Troodon ramping and showing like showing things to your bank and identifying which is which is bad and I don't if you have to do it I want

you to only have to do it once so let's suppose you want to use another children app this is evidence it's completely unrelated to kickback they don't have to do to deal with them so all you do is you go into evidence which is an app for time stamping pictures time stamping things and you just type your username right your user name is just and you know that you have like that ENS name we created for you so you don't even need to remember your hex address all we need to do now is you go back to kick back and you approve that transaction you approve that that one and we added this extra thing where you have little emojis right those emojis are there to prevent a middle man in the middle attack right do

because like every layer cannot take and change your your address you know that this guy knows that he's adding that address and you're even doing a little game where you have to take things in place right this is a little just game we know already what is the what is the what's the address that is being added we are just making sure that the user realizes that this address is the same and we are doing like a fun little gang with with little emojis and what happens then like as soon as you approve here boom you are approved terror right towards what's gonna happen is that you go and kick back you approve your your new connection and then you're ready on your radians on on evidence and evidence just like an app you take you take a picture

and you upload it to the blockchain and you can allow it can allow you the timestamp so let's say maybe you're a photographer you want to prove that you were the first to take that picture or whatever right so the idea it's it's an interesting app that doesn't require you to understand the blockchain doesn't require you even to have eater in your bank account right maybe that maybe they are paying your gas for someone from other reasons maybe you're seeing ads and they pay your gas right and that's the interesting part about this and so we've seen like chew apps let's add the third one just just because it's fun so this is Jarvis it's like a more normal wallet and same thing again right you

just type your user name you choose you're gonna go password less I show you a bunch of emojis you go on the other app you confirm the same emojis and just to make sure there's no other a cool thing about emojis it not only they prevent men and middle attack they prevent a DDoS attack because suddenly if you have like a thousand requests you can sort of the text which is the correct request by just picking the right emojis and I think that's that's an even awesomer thing right so boom you're in right you all you needed to do was confirm here and you are in here and now you can see that the balance is actually shared between both of them right y11 is showing it in each other other ones showing it on dollars but the cool thing is that if you send money in

one you it will reflect on both because the idea is that each app has its own private key and its own its own permissions but they all share the same identity they all have access to the same funds they all have access to the same Nifty's or an etc and and it's there right and here's another thing like in like let's say five minutes now you have a modus aghhhhhh which has three apps on it so suppose you lose your laptop right if you lose your laptop maybe you can still have regain access to kick back by confirming on the two other apps that you had right so I've tricked the user into using a

Buddhistic without them ever understanding that I'm already sick it's a thing right and and I think that's super cool and but but I think like we can do even more right so this is how kick back does today right kick back today just like when you click it it has this interesting thing about black native and I really like them block native guys they are doing a very good work on trying to explain to everyone what are the steps necessary for you to log in oh you need to install mera mask need to install like you have to do a meta mass flow again and then I go check box by checkbox so it's cool but like we've seen that before right it's like oh I see you're trying to set up an account can I help you

write those like step by step wizard by the way I think we should like reclaim the word Wizards I used to use that all the time like a wizard to create something that's cool so those step-by-step Wizards they're nice to teach users but what is even better it's just to remove that complexity so the user doesn't know to understand right because really all of that what is doing is it's really days right it's just like hey it's a sign-in with madam asked Fang where I'm teaching you what is assigning with Mara mask of course that's clearly better than this but I mean we maybe you can do better right and and like maybe if you do even Aversa logins I could say hey what if everyone switch to universal

logins and then yeah but then people would want to use madam at some times and then we have to support both and then if you support those like maybe there are other people who are doing like those things like and then you can install like I think Pedro is doing I like what we have something called web trick or a treat super cool which allows you to select which one of those five things you can you can use it or maybe you can use like a traditional like social media thing and then you can use Wallet connect and right and that's that's sort of like what do you have to add but it's terrible because we don't want users to be open like you open and see all those options the user has no idea where to start you know like he once told like he will

probably click some button outside of that and that's terrible and of course you can say hey like people tell me don't worry about this thing like the market would just decide and the market to just decide just means that it's a winner-take-all game and like people will lose and there will be a single winner in the end right and I think that's even more problematic right because this is this whole idea of there is a winner and like it drops it's just like Universal games and parties and Facebook's they're just spokes on the wheel right this one's on top and then that one's on top and it spins spins spins crushing those on the ground and like we don't want to stop the wheel

right stopping the wheel means putting someone on top and they keep their on top forever like that's not what we're here for and I think you know where I'm going right like what we want it's to break the wheel right and what does it mean to break the wheel in that sounds right what we want actually is have a way in which everyone consigning and everyone can create a new like application method and everyone can create our own user names and it doesn't need to have like a single winner takes all and it shouldn't be a signing it should be our signing if madam asked a universal login maybe should be a signing with children or maybe signing with ENS names and what I'm saying is that what it should happen is that it

should be a single burden that it clicks and it checks that if we have a web tree browser because if you already have on a web browser boom that's it like we've won we don't need to do anything else you already have a wallet if you don't have a wallet after you if you click the night I don't want to use it then what we need to get from you is just a username right maybe you can even you use use a QR code at the moment or maybe not what I want is for you to type a username and then I'm gonna give you an ENS address if you don't have any an s address which like most of the word doesn't have any nests address and we can change that we want to give them ENS addresses and every NS address could be a different service and

I don't know maybe people who pick whatever they heard before or maybe they'll pick just what sounds better or maybe they will be informed but what if they do have a NS address if they do have any NS address that's even cooler because you can store information on ENS address and you can query to understand what sort of authentication matters you have right you can just go there and SK our universal login okay cool so I know what to do right and it's even better because the NS address is also a website and I can just say look if I have no idea what should you I can just access the nsurl just go to Jane Doe Toni login dot io and that's where I will be asking

request information right maybe I have a standard query parameter let's say hey just please add this guy to me right and we've dead and that's how we sort of like break the winner sounds like that's how you stop the war in the sense that I think we shouldn't be here fighting to have who has the best way to log in with achiever and should it be madam asked Universal again no it should be like one single thing and that thing is a big giant robot that keeps your funds and that is better than actually Facebook and login etc because that giant robot belongs to you right those are your funds those that's your name that's your your ENS and I think that is or mango there right it's it's just make sure

that everyone has control over their own profile and that's my talk learn more about it Oni reversal again follow me or or check the poo poo poo poo emoji so I think we do have time for questions right so so thank you for your presentation it was really cool idea but have you thought about the privacy so now all these apps no that's I'm using all the other apps yes we thought about privacy and I think like there are two to two layers right ideally like this is

this is the blockchain privacy thing in my opinion right because in the end right if you want to use like I I want you to use the Internet I think everyone shouldn't those apps should be able to know who your username is what they shouldn't be able to know is who you're who like what how much money you have what collectibles you have and that is essentially a blockchain level thing but we can really make that easier if we don't have a single private key for every user right we don't want to have a single private key for every user what we want to have is the user has one identity but it can have multiple millions of private key that attach to

it so what I could do for instance is that this guy could like what you could do is on your identity contract you could have let's say you could save a route for Merkle tree of a billion attack of a be known public key that you own and then you use those all those like probably all those keys to do things like mixing coins or or owning private tokens and things like that with keys that are not attached to another thing is that one of the biggest problems with privacy layer on a children is it's always who pays the gas so if we saw so that's another thing you need to solve with many transactions is you need to solve it that did the person

receiving the money is not the same that is paint against otherwise you can just trace on who's paying the gas hi really nice presentation where all those private keys kept I mean in the so I think my philosophy is that every private key should be hidden as as deep as you can depending on your on your API depending on your OS right so if you're using a phone keep it on the deepest memory possible if possible put it on a securing clave if that has to port for a

freaky the idea is that those keys should never leave the device right they like those private or maybe even if it's a browser or keep it on local storage but the point is never ever allow the user to see that private key like the user will never back up the private key or take it out anyway right if the user wants to do a backup you should create a recovery special recovery key for the backup that the user maybe prints and that key never is never never easy online until it needs right so take the private key and buried as deep as you can on the computer so that the user never needs to touch it yeah so is it possible to perform economical abstraction with ease so you

can use some service that buy gas for you yes the point is I want you to use it here Ian and not have to pay gas meter maybe you can pay with this system you can already pay guess and I or maybe even you can pay gas by by by a heavy a nifty right imagine that you can have a nifty that me that represents membership and whoever has that nifty like there is a service to pay all the gas for that guy and then that guy can just take that membership them membership and move to someone else and then that person we have like gas gas three you can create all sorts of new economic models and business models on that maybe one

question for me you showed this flowchart for sign in if you wear like which first check whether I have a web free provider and then is it is it we go to you exhibit and just assume that if there's my pre provide that I actually want to connect with that maybe in that case I want to connect with my mobile wallet or some other way a big part of what you provider is that they either never shows you your ID anyway for the browser right that's a big partner on privacy so you need to approve the web chip provider anyway right so if you're using a web browser and you want to connect with it that F should already ask you do you want to

connect with with this app and then you you should be able to deny that and you should deny that then you can keep on the flow and connect to your so logins or whatever okay well thank you I'll be out there okay [Music] maybe I missed it but since you are using meter transactions is there a real layer who is responsible for sending those major transactions of all the users yes man's actions required every layer you can like you can create you can use your network there are some like you probably heard of Japan or you can just have like the app itself can be

relator like they may universal login themself who you are they really provide that service so that the absent self don't need to worry about that that we like it and it the interesting part about every layer is that the user can always decide you use another layer right the user can if like they are using or relator by default because it's it's faster but if for some reason they don't like us anymore they can always just treat switch that and that's something that is decided on the app level right more maybe each app can have its own layer and I think that's that's that's normal so do you think that the whole thing is only creative all the apps will use decentralized relay and networks or do you think that's not so important so I don't think it's super necessary that

all that use the centralized related network right just if you have just for instance let's say that each app uses two layers right or treat like maybe maybe each type is connected to one or two or three layers that is probably already in surprise enough because what like the only thing the relator can do is prevent you from sin you but like your transaction is it's probably has a message saying look I want to pay 0.01 died for this transaction and whoever is related that is able to do that so the transaction itself comes with a bounty for whichever the relator is so if you can send it to at least one or two or three layers or or if you have the option to send or if

you have to have two options and a second relay or if the first relator does not respond then that's okay right there's no if one relator goes down all you need to do is which have you thought about bringing this data availability back on the chain at all or do you completely stick with having your signed messages purely being publicized off chain or you're not sure I see like what would be the advantage because if you bring that back on chain then we we start dealing with all the all the problems again right because like no one then you have to put like I didn't need to pay guess then you need to have like worry about story information on chain and I and that's that's just like an information that is it's temporary until

someone will pick up the transaction and it's a little bit like the main pool right it's it's when I sign a transaction it's not on chain until it's just on on the p2p network of relays on you it's posted it works exactly the same just is design this is a transaction that you go inside another transaction right it's go goes on top of another transaction therefore that's why it's a merit transaction right the transaction that is talking about a transaction and you and then it works in that sense works very similar to how either whatever it is