Lightning Talk: Metamask.io
Devcon 1 · November 2015 · 8:58
Aaron Davis presents early MetaMask experiments aimed at making Ethereum decentralized apps (dapps) usable in an ordinary web browser, so newcomers do not first have to download a separate browser such as Mist. He demonstrates a prototype browser within the browser that runs a dapp in normal Chrome with no installation, keeping keys on the user's machine while relying on some external servers. He warns that handing private keys to dapps is a dangerous practice, describes a research-stage cross-domain key storage library that keeps keys in a sandboxed iframe, and previews a Chrome plugin with a light client, noting that dapps written for the standard web3 interface need no changes to work with it.
Speakers
Topics
From Devcon 1, hosted by Ethereum Foundation.
Transcript
[Music] hello hello hello hello uh today I'm going to be talking about metamask metam mask is Project few ideas uh some experiments on how we can do ethereum using the same tools the same web browser uh you use every day uh so I'm sure we've all seen this before uh this is metamask challenge uh adoption how do we uh improve adoption of ethereum you know we're we're at the
very tip of the innovators uh you're lucky to have found yourself here um but how do we push uh further down to into the curve uh so welcome to the Future Devcon one you've made it uh you're you're launching your uh rocket ship uh Building Company uh you've decided to do crowdfunding and you're going to release your crypto tokens on the blockchain uh and you're going to run your company on on futury uh you know taking the wisdom of the uh the markets the prediction markets uh that's fantastic so uh you all want in right you want to buy some of this uh stock this crypto token yeah okay cool um so what's the URL you say
yeah yeah let me just send you a link uh well first you have to uh you have to download this browser uh uh a few of you say yes I'll check that out later unfortunately this is we lose a lot of our our audience here um so what can we do about that uh well we can't provide the exact same tools of of uh say Miss can't provide the exact same experience but we can sort of tweak uh our position on this spectum of control versus convenience so if we give up a few guarantees we trust in uh a couple things um let's see what we can get uh so this is a very early prototype of
metamask um what you see here is a normal Chrome browser uh this is no additional installation I'm not running a local node I'm not using a Plugin or anything like this uh at the very top you'll see next to the name metamask you see a second URL bar and this is a sort of browser within the browser and and so through some black magic and browser hacks uh I've uh gotten it for for most cases you can run a a Dap right there in your normal web browser uh at the top the normal URL bar you can see the same URL that's in the inner URL bar is repeated uh and as such you can just
send a link to someone of this this dap running on the internet again no installation uh this has uh let me show you a few other parts of it Um this can have a few other uh mislike features like uh some recommended deps um and and of course uh critical is the identity management um so what is it it's it's a sort of browser in the browser status it's uh pretty close to completion though it's it's uh rather tricky as I mentioned some some black magic has some bad side effects so it's uh just requires some iteration on that um benefits are zero install for the user uh it separates keys from the D I'll explain that a
little bit more uh but basically you get to keep your secrets to yourself um the keys can just be stored on your local machine you don't need to send them to me or anything like this though there is some Reliance on uh on some external servers part of this is like a core server that's just to get around some security concerns that the browser has built in um and uh it has a mislik feature set where you can have recommended daps and things like this um and a few notes on on Miss versus metamask I don't really think of them as competitors uh mist is built is very purpose-built it has all these has
the context of the of interacting with ethereum depth built into it uh metamask is a bit constrained in what we can do uh with the existing browser and just sort of adding a bit of plugin but we uh try to get as much mileage out of it as possible um so that's that's one piece another um and I'm not the only one with this idea what if we could just use it without uh the user having to do all this setup so a lot of people that are building daps have made their daps just sort of work on the open internet like like a normal web app and so you can navigate to them directly uh and they have some mechanism for reading from the blockchain perhaps through a centralized server perhaps they a light client
um uh one significant caveat is that in order to do the transaction signing in order to do the key management you have to give that private key to the de and maybe it keeps it in local storage maybe it doesn't send it home um and maybe a couple of deps have have done this correctly then Along Comes one that decides to send your key home and run off with your funds uh this would have a significant negative impact on the ethereum community's reputation as a whole uh so it's sort of a dangerous practice to suggest um to tackle this one I have a project in early research stage um right right so the problem here is that you have to give the P phrase to
generate the keys uh to to the de uh so so one possible uh tool we have here is a cross domain key storage Library this would be a tool that a Dap developer could decide to use to do Key Management when not in an environment like mist or the browser browser uh this what it does is while the keys are still on the same machine they would run in a sandboxed iframe and the external dap would not have access to the Keys but could make a request for a transaction sighting uh again this doesn't require sending it to the server it can stay on
the same machine and the browser uh ensures the security another nice advant uh another advantage to this is multiple adaps that use the same uh domain be it uh key storage. metam mask. or something like this uh all the daps that used that same Library would uh be able to use those same keys so you wouldn't have to import them every time uh so this is a library for dap devs it's still in the research phase uh but you still get the zero install for the user uh the blockchain data source is still up to the DAP developer um but you get to separate the keys from the
dep and uh uh you get the the keys across dep I'm mostly out of time but I'd like to talk about one more thing uh let's say brows on the browser that's quite a strange experience I'd rather just navigate to the daps directly but I want to also have the control of the keys without the DAP developer opting into this this cross domain storage um well one thing I'm working on is a a plug-in for Chrome it's essentially a like client in your browser and you can see in the ight upper right there's a little metamask logo and it has a one there suggesting that there's one pending transaction or unsigned transaction that's uh awaiting your attention
uh so as I just said this one is actually quite a long and I could probably launch it within the next couple months after a little polish uh so as adap developer what do you need to do uh this was all designed in mind of the the normal dat spec as it would run in web 3 you don't need to do anything special uh for it to work in metamask many people though are not currently writing their D so that they will work in Mist uh perhaps by accident all you need to do is check if web 3 is in the current JavaScript uh context and if it is use that if it's not use whatever you're using already uh thanks