<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Erik Marks on Medium]]></title>
        <description><![CDATA[Stories by Erik Marks on Medium]]></description>
        <link>https://medium.com/@rekmarks_62779?source=rss-8cd5b61e4994------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*GVpKwyin8pX0QI5OEbe9KQ.jpeg</url>
            <title>Stories by Erik Marks on Medium</title>
            <link>https://medium.com/@rekmarks_62779?source=rss-8cd5b61e4994------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 06:05:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rekmarks_62779/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The bankruptcy of “play-to-x” gaming]]></title>
            <link>https://medium.com/@rekmarks_62779/the-bankruptcy-of-play-to-x-gaming-bf5f2dd7c513?source=rss-8cd5b61e4994------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf5f2dd7c513</guid>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[web3-game]]></category>
            <category><![CDATA[game-design]]></category>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[play-to-earn-games]]></category>
            <dc:creator><![CDATA[Erik Marks]]></dc:creator>
            <pubDate>Fri, 07 Jun 2024 05:04:23 GMT</pubDate>
            <atom:updated>2024-06-07T05:04:23.560Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>This article was <a href="https://www.rekmarks.site/posts/play-to-oxymoron.html">originally published</a> on <a href="https://rekmarks.site/">rekmarks.site</a>, and represents my personal views only.</blockquote><blockquote>I originally wrote this post in mid-2023, after <a href="https://x.com/alexisohanian/status/1663923368557420550">an especially loathsome tweet by Alexis Ohanian</a> predicting that within “the next 5 years, the majority of gamers won’t play games unless they are being properly valued for that time.” Almost a year later, even the VCs that haven’t pivoted to AI seem to have cooled on the idea, at least for now. Nevertheless, “play-to-x” gaming is an ugly idea that deserves an ugly death, and here we will examine why it’s doomed to receive one.</blockquote><p>Gaming is one of many industries for which crypto hopes it’s the solution. The ambitions of web3 game developers have grown considerably since the space’s prototypal beginnings with <a href="https://en.wikipedia.org/wiki/CryptoKitties">CryptoKitties</a>. While NFT collectibles appear to remain dominant, every conceivable genre has seen multiple web3 entrants over the past 5 years.</p><figure><img alt="A screenshot of a top-5 of web3 games." src="https://cdn-images-1.medium.com/max/1024/1*aOC8D8VxtI53nG_KHwAbSA.png" /><figcaption><a href="https://playtoearn.net/blockchaingames">https://playtoearn.net/blockchaingames</a> retrieved 2024–05–18</figcaption></figure><p>Despite these persistent attempts, web3 gaming remains a fringe activity in both gaming and web3. Many factors contributed to this status quo, perhaps none more so than the insistence on “play-to-earn” and “play-to-own” models among web3 game developers. To be sure, most web3 games are boring, buggy, or hideous. Any one of these flaws can be sufficient for a game to fail. But even if they were made fun; even if the usability issues were fixed; and even if their aesthetics exuded sincerity and warmth, a game with a “play-to-x” model is doomed to fail. Specifically, it is impossible for a play-to-x game to succeed, because it is not a game, but a contradiction in terms.</p><p>To understand why this is the case, we need to establish what a game is. In game design, <a href="https://en.wikipedia.org/wiki/MDA_framework">the Mechanics-Dynamics-Aesthetics (MDA) framework</a> is a well-known tool for analyzing games. In brief:</p><ul><li>A game contains a set of mechanics.</li><li>The mechanics create certain dynamics when interacted with by the player.</li><li>The dynamics create a certain aesthetic experience for the player, evoking an emotional response.</li></ul><p>For example, in the first-person shooter <a href="https://en.wikipedia.org/wiki/Counter-Strike">Counter-Strike</a>:</p><ul><li>The game takes place over timed rounds, with players split into two teams. In the most common format, one team defends some objective that the other team is attacking. Players win by accomplishing their team’s objective before the time runs out, or by killing everyone on the opposing team.</li><li>This creates fast-paced rounds where players need to cooperate and act quickly in order to succeed.</li><li>This demands a high degree of concentration from players, and creates a tight feedback loop as players attempt to improve on their performance each round.</li></ul><p>Now, why do people play Counter-Strike? Fundamentally, for one reason only: because they enjoy it. In MDA terms, the aesthetics, i.e. emotional response in the player is what matters. The mechanics and dynamics only exist to facilitate an enjoyable experience. People find different kinds of experiences enjoyable, which explains the existence of game genres. Counter-Strike is a remarkably successful entry in its genre, multiplayer first-person shooters, which is why on average over 900,000 people were playing the latest version at any moment in April, 2024.¹ For the the overwhelming majority of those people, they receive no reward for playing other than the experience of doing so; gaming, like any form of play, is an end unto itself.</p><blockquote>…gaming, like any form of play, is an end unto itself.</blockquote><p>Proponents of play-to-x do not ask how web3 features will improve the experience of playing games. Rather, play-to-earn focuses on “properly compensating” the player for their time, and play-to-own on letting the player possess ingame assets in the real world. Both models completely disregard the key value proposition of games — they are fun to play — and try to sell players on something they neither need nor want. The absurdity of this becomes clear if you imagine making similar propositions to other media consumers, such as book readers, TV watchers, or concertgoers. Them and players both are willingly paying to engage in their chosen activity. Play-to-x proposes to pay people for something they are themselves paying for the privilege of doing — a kind of economical derangement — or to let them own some fraction of the content that cannot be enjoyed on its own. It would be no less delusional to try to “properly compensate” couples for having sex.</p><p>Even if play-to-x was not on its face absurd, its case also unravels if we examine it as a tool of game design. Let’s forget about the “play-to” framing, and consider monetary compensation and real-world asset ownership as game mechanics. Although ownership provides no direct remuneration for playing, it still creates financial incentives through the possibility of exchanging your ingame assets for money. Returning to the MDA framework, direct remuneration (usually through fungible tokens) and ownership (usually through NFTs) are both mechanics that introduce real-world financial incentives as an ingame dynamic. It’s in these incentives that we find the ultimate irreconcilability of play-to-x and gaming.</p><p>For as long as there have been MMOs, there have been people who have sold ingame items for real-world currency. In almost every case, this behavior is met with outrage by players, and swift corrective action by the developers. Why? Because financial incentives fundamentally alter the behavior of players. To reiterate, people play games not necessarily to “win”, but to have an enjoyable experience. Open-ended MMOs like <a href="https://eveonline.com/">EVE Online</a> illustrate this well, as its players engage with the game in a great variety of ways. Critically, they do so on the terms of the game, and for the sake of their enjoyment. The moment financial incentives are introduced, players stop engaging with the game on its own terms, and the pursuit of profit becomes paramount. In EVE, for example, “real money traders” frenetically procure ingame assets to the exclusion of all else, and transfer those assets to buyers at zero ingame cost, thereby disrupting the ingame economy.²</p><p>When financial incentives are introduced to a game, there are two possible long-term outcomes: either the expected returns are too low to alter anyone’s behavior, or they turn the game into the preferred economic activity of some its players; the game becomes a job. Since players currently receive no remuneration, we must conclude that they are intentionally avoiding profit-seeking behavior while they are playing. And indeed, what is gaming if not — like any recreational activity — a relief from the stresses of daily life, and in particular those associated with economic competition?</p><figure><img alt="A screenshot of a tweet by Alexis Ohanian, quoted in the subsequent paragraph." src="https://cdn-images-1.medium.com/max/1024/1*0Pp4K0lidTM2fKoI-oWi7w.png" /><figcaption><a href="https://x.com/alexisohanian/status/1663923368557420550">https://x.com/alexisohanian/status/1663923368557420550</a> retrieved 2024–05–18</figcaption></figure><p>Degens and crypto VCs with play-to-x games in their portfolio apparently have a hard time appreciating this fact. In the latter category, Alexis Ohanian recently <a href="https://x.com/alexisohanian/status/1663923368557420550">tweeted</a> that we should expect that within “the next 5 years, the majority of gamers won’t play games unless they are being properly valued for that time.” I’m sure the partners and investors of <a href="https://www.sevensevensix.com/">SevenSevenSix</a> would love to think that, particularly if none of the interstellar mining companies in <a href="https://www.sevensevensix.com/portfolio">their portfolio</a> pan out during that timeframe.³</p><p>I don’t mean to be too harsh on Ohanian here; at least interstellar mining will turn a profit in somebody’s lifetime. And the impulse to “decentralize” gaming is understandable from the perspective of everyone except the (extremely centralized) incumbents. Business practices like gratuitous <a href="https://en.wikipedia.org/wiki/Games_as_a_service">live service</a> requirements erode the ownership rights of games allegedly purchased for cash. Perhaps there is a way to use web3 to create a game that is ultimately owned or controlled by its players. But, like any game, it will fail or succeed on its merits as a game, not as an economic activity.</p><p>[1] <a href="https://steamcharts.com/app/730">https://steamcharts.com/app/730</a> retrieved 2024–05–18</p><p>[2] <a href="https://www.eveonline.com/news/view/real-money-trading-is-bad-mkay">https://www.eveonline.com/news/view/real-money-trading-is-bad-mkay</a> retrieved 2023–08–09</p><p>[3] As of 2024–05–18, the SevenSevenSix portfolio companies hoping to exploit the riches of space would appear to be <a href="https://www.interlune.space/">interlune</a> and <a href="https://www.astroforge.io/">AstroForge</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf5f2dd7c513" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Breaking Change: Correcting Custom Network Chain and Network ID Values]]></title>
            <link>https://medium.com/metamask/breaking-change-correcting-custom-network-chain-and-network-id-values-e44df8667c93?source=rss-8cd5b61e4994------2</link>
            <guid isPermaLink="false">https://medium.com/p/e44df8667c93</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[dapps]]></category>
            <dc:creator><![CDATA[Erik Marks]]></dc:creator>
            <pubDate>Tue, 13 Oct 2020 21:02:39 GMT</pubDate>
            <atom:updated>2020-10-13T21:02:39.696Z</atom:updated>
            <content:encoded><![CDATA[<h3>Fixed Custom Network Chain and Network ID Values</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gHM_xSpbQ_iimqCY8LsKdQ.png" /></figure><p>Beginning in MetaMask 8.1, we are correcting the value that the MetaMask extension emits with the chainChanged event for some custom networks. This could cause issues for sites that are relying on the incorrect behavior.</p><p>As a dapp developer, you should do the following to handle this change:</p><ol><li>Always use the <a href="https://docs.metamask.io/guide/ethereum-provider.html#chainchanged">chainChanged event</a> to detect network changes. The <a href="https://docs.metamask.io/guide/ethereum-provider.html#networkchanged-deprecated">networkChanged<strong> </strong>event</a><strong> </strong>is deprecated.</li><li>If you need to continue using the networkChanged<strong> </strong>event, ensure that your dapp expects it to emit with decimal string values. Previously, this event could have emitted with a hexadecimal string for some custom networks.</li></ol><h3>Explanation</h3><p>The MetaMask provider emits the chainChanged<strong> </strong>and<strong> </strong>networkChanged<strong> </strong>events when the user switches the network in MetaMask. Due to a bug, in cases where the user added a custom network and specified its chain ID, MetaMask emitted the specified chain ID with networkChanged, and a nonsense value with chainChanged.</p><p>Prior to MetaMask 8.1, the specified chain ID for a custom network could be a decimal or hexadecimal string. This meant that the networkChanged event could emit with decimal or hexadecimal string values for the affected custom networks.</p><p>For example, if the user entered a “chain ID” of 0x64 for a custom network and switched to it, the MetaMask provider would emit networkChanged with 0x64. Likewise, if the user entered a “chain ID” of 100, networkChanged would emit with 100.</p><p>In MetaMask 8.1 and later, these two events will emit the values according to <a href="https://eips.ethereum.org/EIPS/eip-1193">the specification</a> for all networks:</p><ul><li>networkChanged will emit the network ID as a decimal string</li><li>chainChanged will emit the chain ID as a hexadecimal string</li></ul><p>For a list of networks and their various IDs, see <a href="https://chainid.network/">chainId.network</a>. Note that all listed values are decimal numbers.</p><h3>Background</h3><p>This particular bug goes back to the DAO hack and <a href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md">EIP-155</a>, which added chain IDs to EVM-compatible blockchains so that wallets could ensure that a transaction was only valid on one chain, and not on both sides of a fork.</p><p>Initially, chain_id was often identical to network_id, and this conflation was baked into our codebase, resulting in many developers relying on our network ID values when they should have been relying on the chain ID. As a result, the networkChanged event would sometimes emit with the chain ID. You can read more about this history in <a href="https://medium.com/@pedrouid/chainid-vs-networkid-how-do-they-differ-on-ethereum-eec2ed41635b">this post by Pedro Gomes</a>.</p><p>Fixing this issue brings our provider into tighter compatibility with the spec and the broader ecosystem. We hope that the impact is minimal, but please contact us if there is anything else we can do to help your app to continue operating smoothly.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e44df8667c93" width="1" height="1" alt=""><hr><p><a href="https://medium.com/metamask/breaking-change-correcting-custom-network-chain-and-network-id-values-e44df8667c93">Breaking Change: Correcting Custom Network Chain and Network ID Values</a> was originally published in <a href="https://medium.com/metamask">MetaMask</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Breaking Changes to the MetaMask Provider: It’s Happening]]></title>
            <link>https://medium.com/metamask/breaking-changes-to-the-metamask-provider-its-happening-eebc91fff1a7?source=rss-8cd5b61e4994------2</link>
            <guid isPermaLink="false">https://medium.com/p/eebc91fff1a7</guid>
            <category><![CDATA[metamask]]></category>
            <category><![CDATA[dapps]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[web3]]></category>
            <dc:creator><![CDATA[Erik Marks]]></dc:creator>
            <pubDate>Fri, 14 Aug 2020 17:12:57 GMT</pubDate>
            <atom:updated>2021-01-14T18:13:06.985Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E13C-BiyonOymxnEp1xwAg.png" /></figure><p><strong><em>Note: </em></strong><em>These changes have shipped. Please see the </em><a href="https://medium.com/metamask/breaking-changes-to-the-metamask-provider-are-here-7b11c9388be9"><em>latest blog post</em></a><em> for more information.</em></p><p>In <strong>early 2021</strong>, MetaMask will stop injecting window.web3, and make a limited number of breaking changes to our Ethereum Provider API. Please use <a href="https://github.com/MetaMask/metamask-extension/issues/8077">this GitHub issue</a> if you have any questions.</p><p>You can find everything you need to know about the deprecations and why they’re happening in our <a href="https://docs.metamask.io/guide/ethereum-provider.html#upcoming-breaking-changes">Ethereum Provider documentation</a>. When you’ve determined whether the changes affect you or not, please consult the <a href="https://docs.metamask.io/guide/provider-migration.html">migration guide</a> to learn how to manage the changes.</p><p>Regardless of when you are reading this, you can already migrate to the new API. We recommend that you migrate as soon as possible, to avoid disruptions to your application when the breaking changes go live.</p><h4>Summary of Changes</h4><p>Although we highly recommend going straight to <a href="https://docs.metamask.io/guide/ethereum-provider.html#upcoming-breaking-changes">our documentation</a>, here’s a summary of the breaking changes:</p><p>First, we are going to <strong>remove</strong> our injected window.web3. To understand why we are doing this, please see <a href="https://github.com/MetaMask/metamask-extension/issues/7163">here</a> and <a href="https://medium.com/metamask/no-longer-injecting-web3-js-4a899ad6e59e">here</a>.</p><p>Second, we are making a number of breaking changes to our window.ethereum API. Specifically, we will:</p><ul><li>Stop 0-padding eth_chainId return values</li><li>Stop emitting chainIdChanged, and instead emit chainChanged</li><li>Remove ethereum.publicConfigStore</li><li>Remove the ethereum._metamask.isEnabled experimental method</li><li>Remove the ethereum._metamask.isApproved experimental method</li></ul><p>If you don’t used any of the features scheduled for removal, you’re good to go! If you do use any of them, please refer to our <a href="https://docs.metamask.io/guide/provider-migration.html">migration guide</a>.</p><p>Thank you for your patience, and for making the Ethereum ecosystem the amazing place that it is!</p><p><em>You can find the original announcement of these changes </em><a href="https://medium.com/metamask/breaking-changes-to-the-metamask-inpage-provider-b4dde069dd0a"><em>here</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eebc91fff1a7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/metamask/breaking-changes-to-the-metamask-provider-its-happening-eebc91fff1a7">Breaking Changes to the MetaMask Provider: It’s Happening</a> was originally published in <a href="https://medium.com/metamask">MetaMask</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Judging the Generalized MetaTransaction Contest]]></title>
            <link>https://medium.com/metamask/judging-the-generalized-metatransaction-contest-2186f55441bd?source=rss-8cd5b61e4994------2</link>
            <guid isPermaLink="false">https://medium.com/p/2186f55441bd</guid>
            <category><![CDATA[gitcoin]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[meta-transactions]]></category>
            <category><![CDATA[hackathons]]></category>
            <dc:creator><![CDATA[Erik Marks]]></dc:creator>
            <pubDate>Fri, 24 Jan 2020 23:41:36 GMT</pubDate>
            <atom:updated>2020-01-25T06:26:45.744Z</atom:updated>
            <content:encoded><![CDATA[<p>Many thanks to the talented teams and individuals that participated in our <a href="https://medium.com/metamask/announcing-a-generalized-metatransaction-contest-abd4f321470b">Generalized MetaTransaction Contest</a>. We are humbled by the enthusiasm of you and the Ethereum community! You are the reason why we wouldn’t want to be working with anything else.</p><p>The contest is now over, and we were surprised by the number of excellent submissions we received. To fully evaluate all entries, the judges have chosen to actually try out the submitted tools with their own smart contracts! We want to give special thanks to our thoughtful and thorough judges:</p><ul><li><a href="https://twitter.com/austingriffith">Austin Griffith</a>, inventor the Burner Wallet</li><li><a href="https://twitter.com/MarkBeylin">Mark Beylin</a>, Bounties Network</li><li><a href="https://twitter.com/nanexcool">Mariano Conti</a>, Maker</li></ul><p>To make sure that our judges have enough time, we are postponing the prize announcement until <em>next week</em> (January 27 to February 2, 2020). So, stay tuned for an announcement on Medium and Twitter in the days to come!</p><p>While you wait, you can check out all the awesome submissions on <a href="https://gitcoin.co/issue/MetaMask/Hackathons/2/3865">the GitCoin issue page</a>. Speaking of GitCoin, we couldn’t have done this without them, so don’t forget to give them a follow <a href="https://twitter.com/gitcoin">on Twitter</a>. Thanks again!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*2La4-xjWIZDtfjefE1NrNA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2186f55441bd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/metamask/judging-the-generalized-metatransaction-contest-2186f55441bd">Judging the Generalized MetaTransaction Contest</a> was originally published in <a href="https://medium.com/metamask">MetaMask</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Breaking Changes to the MetaMask Inpage Provider]]></title>
            <link>https://medium.com/metamask/breaking-changes-to-the-metamask-inpage-provider-b4dde069dd0a?source=rss-8cd5b61e4994------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4dde069dd0a</guid>
            <category><![CDATA[metamask]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[dapps]]></category>
            <dc:creator><![CDATA[Erik Marks]]></dc:creator>
            <pubDate>Tue, 05 Nov 2019 20:54:09 GMT</pubDate>
            <atom:updated>2020-10-28T03:54:44.017Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>This article is outdated. Please see the </strong><a href="https://medium.com/metamask/breaking-changes-to-the-metamask-provider-its-happening-eebc91fff1a7"><strong>new article</strong></a><strong> and </strong><a href="https://github.com/MetaMask/metamask-extension/issues/8077"><strong>this GitHub issue</strong></a><strong> for details.</strong></p><p>In <strong>early 2020</strong>, the MetaMask inpage provider—a.k.a. window.ethereum — will:</p><ul><li><a href="https://medium.com/metamask/deprecating-synchronous-provider-methods-82f0edbc874b">Always return Promises from </a><a href="https://medium.com/metamask/deprecating-synchronous-provider-methods-82f0edbc874b">ethereum.send(...)</a></li><li><a href="https://medium.com/metamask/no-longer-reloading-pages-on-network-change-fbf041942b44">Stop reloading the page on network change</a></li><li><a href="https://medium.com/metamask/no-longer-injecting-web3-js-4a899ad6e59e">Stop injecting the </a><a href="https://medium.com/metamask/no-longer-injecting-web3-js-4a899ad6e59e">web3.js API</a></li><li>Stop emitting chainIdChanged, and emit chainChanged instead</li><li>Stop supporting some methods under ethereum._metamask (detailed below)</li></ul><p>This post will be updated once the new API is available. The new API is detailed further down in this post.</p><p>If you are a MetaMask user, all you should notice because of this is better dapp UX over time. If you are a dapp developer, some of these changes may be breaking, and we encourage you to continue reading.</p><p>To learn why we’re removing these features and what you may have to do in response, you can follow the links in the bulleted list above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qhifmbjbWr3WAAd2UrBkzQ.png" /></figure><h4>Why are we doing this?</h4><p>At MetaMask, we only break APIs as a last resort. Since we first launched our inpage provider API, we have generally only added features. Some of those features were added before standards and conventions were fully established. Unfortunately, some of them are incompatible with standards we are adopting, and maintaining them has become too costly for us. They have to go.</p><p>If you are a dapp developer, you may have gotten into the habit of treating e.g. the user’s selected account or network as immutable after initializing your dapp. MetaMask helped sustain this illusion — by, for instance, reloading the page on network change — for a variety of reasons related to the conventions of Ethereum and JavaScript. Today, writing asynchronous, event-driven JS has never been easier, which new provider standards like <a href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1102.md">EIP 1102</a> and <a href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md">EIP 1193</a> take full advantage of. By implementing these standards, we hope to provide better experiences for both developers and users in the dapp ecosystem.</p><h4>What does this mean?</h4><p>We are removing the following experimental methods:</p><ul><li>ethereum._metamask.isEnabled</li><li>ethereum._metamask.isApproved</li></ul><p>If you want to use a library like web3.js in your dapp, you have to bring your own. To connect to MetaMask and get the user’s account and selected address, you should follow this pattern:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/39d2e698a56edb8db2e668cc4985bc05/href">https://medium.com/media/39d2e698a56edb8db2e668cc4985bc05/href</a></iframe><p>That’s it. We strongly encourage using events and ethereum.send. We strongly discourage the use of legacy features like ethereum.sendAsync and ethereum.selectedAddress. You should <strong>only</strong> request to connect to MetaMask in response to user interaction — you should <strong>never </strong>request to connect spontaneously, such as on page load.</p><h4>Conclusion</h4><p>In <strong>early 2020</strong>, we are making our inpage provider fully compatible with EIPs 1102 and 1193. To do so, we have to deprecate a number of legacy features. In the end, we believe that dapp developers and users will benefit from this change. Otherwise, we would not do it.</p><p>Beyond standardizing our provider API, these changes set us up for some of the most exciting changes we’ve ever made to the MetaMask platform. Check out our <a href="https://medium.com/metamask/introducing-the-next-evolution-of-the-web3-wallet-4abdf801a4ee">plugin system</a> and its prerequisite, our <a href="https://medium.com/metamask/introducing-web3-permissions-c55b3d73563f">capabilities-inspired permissions system</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4dde069dd0a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/metamask/breaking-changes-to-the-metamask-inpage-provider-b4dde069dd0a">Breaking Changes to the MetaMask Inpage Provider</a> was originally published in <a href="https://medium.com/metamask">MetaMask</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[No Longer Reloading Pages on Network Change]]></title>
            <link>https://medium.com/metamask/no-longer-reloading-pages-on-network-change-fbf041942b44?source=rss-8cd5b61e4994------2</link>
            <guid isPermaLink="false">https://medium.com/p/fbf041942b44</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[dapps]]></category>
            <category><![CDATA[metamask]]></category>
            <dc:creator><![CDATA[Erik Marks]]></dc:creator>
            <pubDate>Mon, 04 Nov 2019 21:01:29 GMT</pubDate>
            <atom:updated>2020-08-14T17:38:12.806Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>This article is outdated. The page reload only affects users of </strong><strong>window.web3, which we are</strong><a href="https://medium.com/metamask/no-longer-injecting-web3-js-4a899ad6e59e"><strong> removing</strong></a><strong>. </strong><a href="https://medium.com/metamask/breaking-changes-to-the-metamask-provider-its-happening-eebc91fff1a7"><strong>Click here for more details</strong></a><strong>.</strong></p><p>At long last, in <strong>early 2020</strong>, MetaMask will no longer reload web pages when the selected network changes. This will be a breaking change for dapps that have yet to support <a href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md">EIP 1193</a>-compatible providers. We expect this to enable UX improvements for all dapps that use MetaMask.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kYZUtxT90xLDG8KlWboLsg.png" /></figure><p>If you are a MetaMask user, you should not have to do anything. If, however, you interact with unmaintained legacy dapps, you will have to reload the dapp in the browser whenever you change networks in MetaMask. If you are a dapp developer, we encourage you to continue reading.</p><p>If you want to learn more about our reasoning for doing this, you can check out <a href="https://medium.com/metamask/breaking-change-no-longer-reloading-pages-on-network-change-4a3e1fd2f5e7">previous post on this topic</a>, from 2018. <em>Note that the example code in that article is outdated.</em></p><h4>Summary</h4><p>Inside MetaMask, the user can change the selected Ethereum network or change at any time. Currently, whenever the user changes the network, MetaMask asks the browser to reload the open pages of any connected dapps. In <strong>Q1 2020</strong>, MetaMask will no longer ask the browser to do this. Instead, the dapp will have to listen for events emitted from the MetaMask inpage provider at window.ethereum.</p><h4>Who is affected? What should you do instead?</h4><p>If your dapp does not handle the network changing at any time after initialization, this will be a breaking change. To handle this, you need to listen for one of the <a href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md#chainchanged">events specified by EIP 1193</a>, and handle the network change:</p><pre>// you should use chainId for network identity, and listen for<br>// &#39;chainChanged&#39;</pre><pre>ethereum.on(&#39;chainChanged&#39;, chainId =&gt; {<br>  // handle the new network<br>})</pre><pre>// if you want to expose yourself to the problems associated<br>// with networkId, listen for &#39;networkChanged&#39; instead</pre><pre>ethereum.on(&#39;networkChanged&#39;, networkId =&gt; {<br>  // handle the new network<br>})</pre><pre>// if you want to do as little as possible, these three lines<br>// will emulate existing behavior</pre><pre>ethereum.on(&#39;chainChanged&#39;, () =&gt; {<br>  document.location.reload()<br>})</pre><p>To understand why you should only use chainId, check out <a href="https://medium.com/@pedrouid/chainid-vs-networkid-how-do-they-differ-on-ethereum-eec2ed41635b">this article</a> by the inimitable <a href="https://medium.com/u/a9b602b091af">Pedro Gomes</a>. For the authoritative chainId and networkId list, check out <a href="https://chainid.network/">chainId.network</a>.</p><h4>Why are we doing this?</h4><p>Dapp developers have asked us to stop forcing reload for a very long time. By asking the browser to reload the page, we’re taking away the dapp’s power to manage its own UX. Worse, reloading the webpage is usually terrible UX. To get a complete account of our reasoning, check out <a href="https://medium.com/u/9cdd320de5c9">Dan Finlay</a>’s <a href="https://medium.com/metamask/breaking-change-no-longer-reloading-pages-on-network-change-4a3e1fd2f5e7">post on this from 2018</a> (but <strong>don’t</strong> follow any of the example code).</p><h4><strong>Conclusion</strong></h4><p>In <strong>early 2020</strong>, MetaMask will finally stop reloading pages on network change. As a dapp developer, you should listen for the chainChanged event per <a href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md#chainchanged">EIP 1193</a>. As a user, you should not have to do anything. We are excited to see the UX improvements that this will enable for the Ethereum ecosystem!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbf041942b44" width="1" height="1" alt=""><hr><p><a href="https://medium.com/metamask/no-longer-reloading-pages-on-network-change-fbf041942b44">No Longer Reloading Pages on Network Change</a> was originally published in <a href="https://medium.com/metamask">MetaMask</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deprecating “Synchronous” Provider Methods]]></title>
            <link>https://medium.com/metamask/deprecating-synchronous-provider-methods-82f0edbc874b?source=rss-8cd5b61e4994------2</link>
            <guid isPermaLink="false">https://medium.com/p/82f0edbc874b</guid>
            <category><![CDATA[dapps]]></category>
            <category><![CDATA[rpc]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[json]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Erik Marks]]></dc:creator>
            <pubDate>Thu, 31 Oct 2019 14:33:30 GMT</pubDate>
            <atom:updated>2020-08-14T17:35:03.153Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>This article is outdated. Please see </strong><a href="https://medium.com/metamask/breaking-changes-to-the-metamask-provider-its-happening-eebc91fff1a7"><strong>this article</strong></a><strong> and </strong><a href="https://github.com/MetaMask/metamask-extension/issues/8077"><strong>this GitHub issue</strong></a><strong> for details on upcoming changes.</strong></p><p>As part of <a href="https://medium.com/metamask/introducing-the-next-evolution-of-the-web3-wallet-4abdf801a4ee">the exciting changes we are making to the MetaMask platform</a>, an upcoming update to our inpage provider RPC API may be breaking for a small number of dapp developers. If you are a dapp developer, we encourage you to keep reading.</p><h4><strong>Summary</strong></h4><p>We are deprecating the synchronous behavior of RPC methods called using ethereum.send(requestObject) of the MetaMask inpage provider in <strong>early 2020</strong>. The affected methods will still be callable in the same way, but their results will be resolved from a Promise rather than returned directly. Furthermore, the RPC method results will be resolved directly, rather than wrapped in a JSON RPC response object. The affected methods are:</p><ul><li>eth_accounts</li><li>eth_coinbase</li><li>eth_uninstallFilter</li><li>net_version</li></ul><p>As part of this change, all RPC methods supported by MetaMask will be callable using ethereum.send(methodName, params) or ethereum.send(requestObject). <a href="https://medium.com/metamask/breaking-changes-to-the-metamask-inpage-provider-b4dde069dd0a">Please see here for our release schedule</a>.</p><h4><strong>Who is affected?</strong></h4><p>If there are any calls of the form ethereum.send(requestObject)<strong> </strong>in your dapp that expect anything other than a Promise, you are likely to see exceptions or undefined behavior in subsequent logic. Moreover, per <a href="https://eips.ethereum.org/EIPS/eip-1193">EIP 1193</a>, <strong>these Promises resolve directly to the method call’s result</strong>, which will <strong>not</strong> be wrapped in a JSON RPC response object.</p><p>So, for example:</p><pre>// instead of this:</pre><pre>accounts = ethereum.send({ method: &#39;eth_accounts&#39; }).result</pre><pre>// you will have to do this:</pre><pre>accounts = await ethereum.send(&#39;eth_accounts&#39;)</pre><pre>// or this:</pre><pre>accounts = await ethereum.send({ method: &#39;eth_accounts })</pre><pre>// or if you&#39;re not using async/await:</pre><pre>ethereum.send(&#39;eth_accounts&#39;).then((accounts) =&gt; {<br> /* Deal with them */<br>})</pre><h4><strong>Why are we doing this?</strong></h4><p>While the aforementioned methods currently behave synchronously, the data they return is anything but. Behind the scenes, the data is kept up-to-date through asynchronous messaging between the inpage provider and the MetaMask background script. Indeed, with the changes we’re introducing, the value returned by a “synchronous” ethereum.send({ method: ‘eth_accounts’}) would be the latest value returned by either an accountsChanged event handler or an asynchronous RPC request for the same method!</p><p>In addition, per <a href="https://eips.ethereum.org/EIPS/eip-1193">EIP 1193</a>, Ethereum providers should return Promises that resolve to the RPC method’s result, rather than an RPC response object. All our added functionality will work in this way, and these methods must be brought up to par.</p><h4><strong>What should you do instead?</strong></h4><p>The next version of <a href="https://github.com/MetaMask/metamask-inpage-provider">the MetaMask inpage provider</a> will be fully compliant with both <a href="https://eips.ethereum.org/EIPS/eip-1102">EIP 1102</a> and <a href="https://eips.ethereum.org/EIPS/eip-1193">EIP 1193</a>. The latter specifies a number of events — particularly accountsChanged, networkChanged, and chainChanged — that you should listen for using ethereum.on(eventName, callback). This is the best way to ensure that your view of the user’s selected address and network is correct.</p><p>There will be a handful of asynchronous methods you can call to get the user’s account. We recommend:</p><p><strong>ethereum.send(‘eth_requestAccounts’)</strong></p><ul><li>This works exactly like ethereum.enable(), <a href="https://metamask.github.io/metamask-docs/API_Reference/Ethereum_Provider">as detailed in our documentation</a>.</li><li>If the user rejects exposing an account to your dapp, the inpage provider will throw an <a href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md#error-object-and-codes">EIP 1193 “user rejected request” error</a>, with error.code === 4001.</li></ul><p><strong>ethereum.send(‘eth_accounts’)</strong></p><ul><li>This will resolve to an empty accounts array if the user has yet to connect, otherwise it resolves to a non-empty address array.</li></ul><p><strong>ethereum.send(&#39;wallet_requestPermissions&#39;, [{ eth_accounts: {} }])</strong></p><ul><li>Per our very own <a href="http://&/#39;eth_accounts&#39;">EIP 2255</a>, you will also be able request the eth_accounts permission directly. This is what the other methods are doing under the hood. wallet_requestPermissions returns all permissions your dapp currently has. Initially, eth_accounts will be the only possible permission, but we have <a href="https://medium.com/metamask/introducing-web3-permissions-c55b3d73563f">grand plans</a> for this method and our new permissions system.</li></ul><p>If your dapp calls a method with an account the user is not exposing, the inpage provider will throw an <a href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md#error-object-and-codes">EIP 1193 authorization error</a>, with error.code === 4100. This makes it easy for you to handle such failures.</p><h4><strong>Conclusion</strong></h4><p>In <strong>early 2020</strong>, all MetaMask provider send() calls will behave asynchronously, just as they do under the hood. They will return Promises, which will resolve directly to RPC method results. We encourage you to take a look at <a href="https://eips.ethereum.org/EIPS/eip-1102">EIP 1102</a> and <a href="https://eips.ethereum.org/EIPS/eip-1193">EIP 1193</a> to learn about the new APIs available to you. The new ethereum.send will be live for all other methods in the next couple of weeks, so keep an eye out for that!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82f0edbc874b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/metamask/deprecating-synchronous-provider-methods-82f0edbc874b">Deprecating “Synchronous” Provider Methods</a> was originally published in <a href="https://medium.com/metamask">MetaMask</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Web3 Permissions]]></title>
            <link>https://medium.com/metamask/introducing-web3-permissions-c55b3d73563f?source=rss-8cd5b61e4994------2</link>
            <guid isPermaLink="false">https://medium.com/p/c55b3d73563f</guid>
            <category><![CDATA[capabilities]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[decentralized]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[ethereum]]></category>
            <dc:creator><![CDATA[Erik Marks]]></dc:creator>
            <pubDate>Mon, 26 Aug 2019 17:31:43 GMT</pubDate>
            <atom:updated>2019-08-26T17:37:49.421Z</atom:updated>
            <content:encoded><![CDATA[<p>We believe the blockchain ecosystem needs to fix its consent experience once and for all. The days of repeated confirmations to complete simple tasks in an application are officially numbered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bw99NK4fncOlenMq1g-POA.png" /><figcaption>X = imagine it and we can build it.</figcaption></figure><p>MetaMask was initially built to be <em>good enough to make interfaces</em> with, but we knew that some hard questions remained: How much consent is enough? How much education makes consent informed? How much trust should be extended to a new site or person? How important is it to nag users about each transaction, even when <a href="https://medium.com/metamask/metamask-metrics-fbec0e2ceaa7">most transactions are completely indecipherable</a> to the average user?</p><p>It turns out that our initial approach was <em>good enough</em>, but not ideal. It was safe, but annoying. It was functional, but clunky, and we are awed by what app developers have accomplished even with this rough platform.</p><p>In attempting to resolve these tensions, we realized we were not the first to consider them. We have taken inspiration from great thinkers in the UX of security like <a href="https://ai.google/research/people/author35958">Mark Miller</a>, as well as principles demonstrated by <a href="https://www.nber.org/papers/w13126">economics</a> and <a href="https://ideas.repec.org/p/sol/wpaper/2013-152950.html">sociology</a>. Ultimately, we arrived at some basic and prescriptive insights about how to help people — and computers — take maximally secure risks:</p><ol><li><a href="https://openbazaar.org/blog/trust-is-risk-a-decentralized-trust-system/">Trust is Risk</a>, and trust cannot be avoided when interacting with the world.</li><li>The most secure system is one that extends the fewest permissions, per the <a href="https://en.wikipedia.org/wiki/Principle_of_least_privilege">Principle of Least Authority</a> (POLA).</li><li>People know when they can trust each other, and we should enable deliberate trust at a user’s discretion, per <a href="https://www.nber.org/papers/w13126">social collateral</a>.</li></ol><p>Between the principle of least authority and social collateral, we find a sweet spot; we believe that the best way to build a secure yet extensible decentralized system is to permit the fewest possible external permissions by default, while allowing users to take informed risks at their discretion.</p><h3>The MetaMask Permissions System</h3><p>In the past, we considered features either secure or insecure. Insecure features were locked up behind a confirmation screen or not implemented. This led us to pass on some feature requests by developers, such as allowing unlimited signatures or transactions from a given domain, or letting dapps set a user’s gas price or nonce.</p><p>To support such features, we must stop treating security as a binary property. Instead, of “Is this feature secure or not?” we ask: “What risk is associated with this feature, and how can we request the user’s informed consent?”</p><p>Our answer is that the Ethereum provider API should incorporate a permissions request system. We’ve implemented <a href="https://github.com/MetaMask/json-rpc-capabilities-middleware">a new permissions framework</a> for use with <a href="https://github.com/MetaMask/metamask-extension/tree/LoginPerSite">a branch of MetaMask</a> that works with <a href="https://metamask.github.io/permissions-adventure">a sample dapp</a> using our new permissions API. The prototype we share here is roughly equivalent to a pre-authenticated version of <a href="https://w3c-ccg.github.io/ocap-ld/">OCAP-LD</a>. It looks something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JE9gDZR7fqo2Ewfw.gif" /><figcaption>Alpha version. Everything subject to change.</figcaption></figure><p>The simplicity of this example belies what is happening under the surface. In this branch of MetaMask, some methods (“<a href="https://github.com/MetaMask/metamask-extension/blob/bfccf40a0556195141571d733509980b2ebbddde/app/scripts/controllers/permissions.js#L187-L222">restricted methods</a>”) will return authorization errors until permissions have been requested. Multiple permissions can be requested at the same time on the connect screen, creating a kind of “terms of use” enforced on the user’s device at their discretion.</p><p>We have built this permissions system so that new restricted methods can be added easily. In other words, securely extending the useful API surface of MetaMask becomes about as simple as writing the method and a clear description of it. We are actively researching which methods developers want the most.</p><p>Some possibilities we’re excited about:</p><ul><li>Letting sites include a signature challenge at sign-in time.</li><li>Letting sites specify the network(s) they need to connect to.</li><li>Letting sites decrypt messages on a user’s behalf.</li><li>Letting sites send transactions on a user’s behalf.</li></ul><p>If access to a permission is power, then security is the degree to which that power is limited. Consequently, the permissions system includes extensible <a href="https://github.com/MetaMask/json-rpc-capabilities-middleware/blob/master/src/caveats.ts">caveat system</a>, which enables users to adjust the permissions they grant at the time of login.</p><p>Consider:</p><ul><li>An <em>adjustable</em> log-out timer.</li><li><em>Selecting</em> the account(s) that a site can view.</li><li>Signing messages, <em>but only within a </em><a href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#rationale-for-domainseparator"><em>domain</em></a>.</li><li>Sending transactions but <em>only to a specific recipient</em>, and <em>only within a specific limit</em>.</li></ul><p>Of course, the purpose of this is to empower users and developers, and we will continue to support existing transaction behavior for those who prefer that.</p><h3>In the Future: True Object Capabilities</h3><p>Today these permissions are stored within a table in MetaMask. However, if we cryptographically sign them with e.g. <a href="https://github.com/uport-project/did-jwt">uPort’s verifiable claims framework</a>, or <a href="https://w3c-dvcg.github.io/ld-signatures/">Linked Data Signature</a>, we could compose them into cryptographic <a href="https://ethereum-magicians.org/t/ethereum-object-capabilities/3035">object capabilities</a> like <a href="https://w3c-ccg.github.io/ocap-ld/">OCAP-LD</a>. This would enable sites to store their own permissions, delegate them to another domain, or even redeem them on another computer system, including the blockchain itself.</p><p>Since these permissions objects could include signed proofs, they can be extended to not only represent local permissions, but also on-chain permissions, and the metadata necessary to redeem that permission.</p><p>For example, an application might require permission to withdraw some number of tokens to start a game. Those tokens could be locked in any number of different ways on the blockchain, by e.g. the allowance() method, a signed MetaTransaction, or another type of MultiSig. The application developer should not need to be concerned how exactly the user is storing an asset. Rather, they should only have to know that the required permissions have been granted.</p><h3>Join The Conversation</h3><p>We’re excited to make our platform the most secure and extensible it can be, all because of the things we want to make possible for people like you.</p><p>So please, if this system sparks something in your imagination, check it out, think about what you would do, and let us know how we can help create the decentralized web that you want to see. Specifically, we want to know the permissions you want to exist, and what the API should look like. Again, try it all out using <a href="https://github.com/MetaMask/metamask-extension/tree/LoginPerSite">this branch of MetaMask</a> and <a href="https://metamask.github.io/permissions-adventure">this sample dapp</a>. If you want to dive into the technical details, you can check out <a href="https://github.com/MetaMask/json-rpc-capabilities-middleware">the permissions module itself</a> and <a href="https://ethereum-magicians.org/t/web3-login-permissions/3583">our Ethereum Magicians post</a>.</p><p>Finally, we’re hiring. If you like meta-programming, and securing the future of the web, throw us a line, and see if we’d be a good fit!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c55b3d73563f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/metamask/introducing-web3-permissions-c55b3d73563f">Introducing Web3 Permissions</a> was originally published in <a href="https://medium.com/metamask">MetaMask</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Case for Graphical Smart Contract Editors]]></title>
            <link>https://medium.com/pennblockchain/the-case-for-graphical-smart-contract-editors-8e721cdcde93?source=rss-8cd5b61e4994------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e721cdcde93</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <dc:creator><![CDATA[Erik Marks]]></dc:creator>
            <pubDate>Mon, 30 Apr 2018 02:15:15 GMT</pubDate>
            <atom:updated>2018-04-30T02:15:15.218Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ntV3ZPC0ox2QIBGwuRnldQ.jpeg" /><figcaption>An Unreal 4 Blueprint visual script in the Unreal Editor, exemplifying flow-based programming. (Epic Games, Inc)</figcaption></figure><p>Blockchain smart contracts enable the programmatic, trustful execution of some logic or transaction. Because of their unique <a href="https://en.wikipedia.org/wiki/Affordance">affordances</a>, I believe smart contracts will become a critical part of the global digital infrastructure, similar to APIs. In order to realize this future, smart contracts must become more reliable, secure, and easier to create. Graphical smart contract editors are part of the solution. As the foremost smart contract platform, Ethereum should have competing implementations.</p><p>According to their inventor, Nick Szabo, smart contracts are “a set of promises, specified in digital form, including protocols within which the parties perform on these promises.” In Ethereum, smart contracts do not have to fulfill contractual purposes, but here I will focus on the use cases emphasized by Szabo’s original definition.</p><p>Ethereum smart contracts are computer programs that execute in the environment of the Ethereum blockchain. As with traditional legal contracts, many Ethereum smart contracts are semantically similar, e.g. “Send money from <em>a</em> to <em>b</em> if <em>x</em>,” or “Issue <em>i</em> tokens and place them in the wallet of the minter, <em>c</em>.” This partly accounts for the existence of template libraries like <a href="https://openzeppelin.org/">OpenZeppelin</a>; why write a new ERC20 token contract if one already exists? Incorporating common functionality into libraries is ubiquitous in software, and an important vector for best practices in the industry. However, to maximize the usage of smart contracts, engineering skills cannot remain a prerequisite for their creation.</p><p>Understanding the transactional logic encoded by a smart contract should suffice to create it. For example, if a user wants to create an escrow contract, they should only have to identify the parties and a custodian or oracle. At present, for all the democratizing aspirations of Ethereum, only technical users can write smart contracts. The solution is to add a graphical user interface (GUI). By enabling non-programmers to create and deploy smart contracts, the Ethereum ecosystem can flourish.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OY9-94mHUcne57Ta4SA_fQ.png" /><figcaption>Sample EtherScripter contract. (etherscripter.com)</figcaption></figure><p>Graphical smart contract editors can be implemented at different levels of abstraction. At one extreme, syntactic primitives are represented as graphical shapes that fit together in a drag-and-drop interface. <a href="http://etherscripter.com/0-5-1/">EtherScripter</a>, a <a href="https://developers.google.com/blockly/">Google Blockly</a> implementation of Serpent, serves as an example. At the other extreme, the user enters the necessary data, e.g. the name and total amount of an ERC20 token, into a form.</p><p>Exactly where an editor belongs on this spectrum depends largely on the level of customization required for its intended use. If an ERC20 token is all that’s necessary, a form would suffice. If the contract encodes more complex logic, a flow- or model-based editor, similar to <a href="https://docs.unrealengine.com/en-us/Engine/Blueprints">Blueprints</a> in <a href="https://www.unrealengine.com/">Unreal Engine 4</a>, is probably more suitable. EtherScripter, meanwhile, isn’t useless merely because it implements Serpent, but because syntactic graphical editors are useless in production contexts. For technical users, they’re less convenient than text, and for non-technical users, they’re hardly more intelligible than text. Consequently, complex bespoke or novel functionality will remain the domain of engineers. With the appropriate tools, end-users can handle everything else.</p><p>Graphical smart contract editors will not only democratize smart contract creation, but also promote smart contract reliability and security. Since they are computer programs, buggy smart contracts are inevitable. Nevertheless, the present state of smart contract security is unacceptable. High-profile failures such as the <a href="https://blog.springrole.com/parity-multi-sig-wallets-funds-frozen-explained-768ac072763c">Parity multi-sig wallets</a> discourage private and institutional users alike. Graphical editors will necessarily generate template code, and only the best analyzed and tested code need be used. OpenZeppelin is an obvious candidate for graphical implementation.</p><p>Creating an ideal editor will require intimate knowledge of its users. Before those users exist, the only course is to build and ask questions later. Taking stock of the rote tasks of Solidity developers may hint at the appropriate level of abstraction. Beyond that, beginning is a matter of choosing a reasonable framework to build with. There are as yet no market-ready offerings in this space, but some projects, such as <a href="https://www.hyperledger.org/projects/composer">Hyperledger Composer</a>, are well on their way. With its unparalleled developer community, Ethereum can still take the lead.</p><p>Graphical Solidity editors will allow non-technical users to create and deploy smart contracts, while also promoting smart contract security and reliability in the Ethereum ecosystem. At worst, new niche use cases become possible. At best, millions of users are empowered to bring Ethereum to bear on their business problems. The time to democratize smart contract creation is now.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e721cdcde93" width="1" height="1" alt=""><hr><p><a href="https://medium.com/pennblockchain/the-case-for-graphical-smart-contract-editors-8e721cdcde93">The Case for Graphical Smart Contract Editors</a> was originally published in <a href="https://medium.com/pennblockchain">PennBlockchain</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>