<?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 Ben Davenport on Medium]]></title>
        <description><![CDATA[Stories by Ben Davenport on Medium]]></description>
        <link>https://medium.com/@bendavenport?source=rss-2cab699ec97------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*JXV0kiyptB2hLOzM.jpeg</url>
            <title>Stories by Ben Davenport on Medium</title>
            <link>https://medium.com/@bendavenport?source=rss-2cab699ec97------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 04:27:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bendavenport/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[A Stake to the Heart]]></title>
            <link>https://medium.com/@bendavenport/a-stake-to-the-heart-57fcd8ec323b?source=rss-2cab699ec97------2</link>
            <guid isPermaLink="false">https://medium.com/p/57fcd8ec323b</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[proof-of-stake]]></category>
            <category><![CDATA[taxes]]></category>
            <dc:creator><![CDATA[Ben Davenport]]></dc:creator>
            <pubDate>Fri, 26 Apr 2019 20:16:50 GMT</pubDate>
            <atom:updated>2019-04-26T20:16:50.819Z</atom:updated>
            <content:encoded><![CDATA[<h4>Why Uncle Sam Loves Proof of Stake</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*65GhlSSXhcodDJphQT0Jtg.jpeg" /></figure><p>Starting in 2018, we have seen the rise of a great number of coins using proof of stake (PoS) in their consensus mechanism. Among these are EOS, Tron, Cosmos, Tezos, and <a href="https://stakingrewards.com/">many others</a>, with total represented market cap being measured in the billions of dollars.</p><p>At first glance, the attraction of holding these coins is clear. By staking your coins, you are earning anywhere from 4 to 15% annually on your holdings. But, where is the money coming from? Of course, the money is coming from the only place it can come from: from other people who are not staking their coins.</p><p>Staking rewards are created through inflation. If everyone holding a given crypto-asset is staking all their coins, then everyone gets (out of thin air) a new amount of coins each period exactly proportional to their existing ownership. So, at the end of every period, everyone’s ownership stake in the asset is exactly the same as it was previously.</p><p>On the other hand, if only a fraction of coins are staked, then the stakers will indeed be made richer, at the expense of the holders who do not stake. The non-stakers’ ownership of the total pie gets diluted by the new coins issued to the stakers.</p><p>For a concrete example, take a fictional coin called PIE. The staking rewards on PIE are 10% per year. At the beginning of the year, there are 100 coins in total, and 10 holders, each holding 10 coins. Let’s say half the holders stake their coins for one year, while the other half do not. At the end of a year, each of the stakers will have earned an additional coin, giving 5 stakers with 11 coins each and 5 non-stakers still with 10 each. The total supply has been inflated by 5% to 105 total coins. Each staker, who previously owned 10% of the PIE, now owns 11/105 = 10.47% of the PIE. Each non-staker has at the same time had his stake reduced to 10/105 = 9.52% of the PIE. Note that while the stakers were earning a 10% nominal yield, their real return was a more modest 4.7%, balanced precisely by the losses in ownership of the non-stakers.</p><p>So, clearly, if you’re going to hold one of these coins, you <em>need</em> to be a staker, otherwise you are going to be diluted continually by others who do stake. So, if we follow this to its inevitable conclusion, the long term stable equilibrium is that almost everyone will stake. (And even assuming no changes in ownership or behavior, the percentage of non-stakers <em>naturally</em> gets smaller every year, simply due to the dilution.)</p><p>But, if everyone stakes, then there is no return to be provided by the non-stakers, there is just inflation, which <a href="https://twitter.com/_alekslarsen/status/1115807270900604933">does not provide a real return</a>. Of course there may always be a few irrational actors who choose not to stake. But in general, the staking yield should be thought of more as the <em>penalty</em> <em>rate</em> for non-stakers than as the <em>reward rate </em>for stakers. So, this means as a holder of PoS coins, you are in a position of needing to do work and/or put coins at risk, but you don’t really get paid for it. But, let’s say we accept that burden just as the cost of holding PIE since it’s such an awesome coin. Well, actually, it’s much worse than that.</p><p>You see, the IRS (and likely many other tax agencies worldwide), sees that 10% nominal yield you’re getting, and says, “Hey, that looks like income to me. I’ll take my slice of PIE, please. By the way, I need that in dollars.” Despite you not getting any richer, the IRS is still happy to make you poorer.</p><p>Assume, for sake of simplicity, that all PIE-holders are US taxpayers paying a 35% marginal tax rate, and <em>of course</em>, pay all their taxes. Since everyone is staking, and they’re getting paid 10% nominal yield, they will owe 3.5% of the initial market cap in taxes (or~3% of the end-of-year post-inflation market cap). Where will they get the money to pay that? Well, they’ll likely have to sell some PIE, putting downward pressure on the price. This is what happens when you effectively have an annual wealth tax on an unproductive asset. Well, how bad is this? It’s only 3.5%, right?</p><p>As a thought experiment, let’s assume the IRS decided they’d actually take PIE in payment of taxes, rather than requiring dollars, and they’re willing to just sit on it (and of course stake their own coins too). The below table shows what happens to the ownership base of PIE over time. The tax authorities own over half the coins by year 22. (At least, hopefully, the roads will be nice.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AUfpt7gKzcuM75URrWjjCg.png" /></figure><p>This thought experiment is actually the best case scenario, because you have a committed holder in the IRS, who never sells. And over time, they actually take less and less from the other holders because they already own most of the coins. It takes them until year 70 to get to 90%. But the reality is worse, because the IRS doesn’t actually want your PIE, so you’ve got to find new buyers to sell to every year, otherwise there is an ongoing price drag on the coin. (Likely there’s a price impact regardless, otherwise the new marginal buyers would have already bought at the existing price.)</p><p>The higher the staking yield, the worse the problem. At a 20% staking yield, it takes the IRS only 12 years to get half the coins. At a 5% yield, it takes them a leisurely 41 years to get half… but they still get there.</p><p>Now, there is some question as to whether these staking payments are actually taxable. In the securities world, companies may sometimes issue dividends which consist of new shares of the same stock, (a “<a href="https://www.investopedia.com/terms/s/stockdividend.asp">stock dividend</a>.”) This happens, for instance, when a company does a stock split, issuing 1 additional share of stock for every existing share that is held. These are not taxable, for exactly the reason that there is no economic gain from the transaction.</p><p>The problem is, staking payments are <em>not</em> stock dividends, either in law or in practice. In fact, they are fundamentally different from dividends, because you actually have to do something to receive them. Namely, you have to engage in the business of staking your coins, in the hopes of making a profit at the expense of non-stakers, or at minimum, for the purpose of avoiding a loss. While the Congress (with sufficient lobbying) might well get around to making PoS rewards free of tax… I wouldn’t hold my breath.</p><p>In conclusion, with PoS coins:</p><ul><li>You need to do work and/or risk your coins.</li><li>You’re not compensated for this with a real return, except to the extent other holders are irrational/lazy and fail to stake.</li><li>After-tax, you actually experience a negative real return because of taxation on nominal phantom income.</li></ul><p><em>Disclaimer: I am not an attorney or tax accountant. This article should NOT be taken as tax advice. As always, consult your own tax professional.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57fcd8ec323b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The 10 Shitcoin Commandments]]></title>
            <link>https://medium.com/@bendavenport/the-10-shitcoin-commandments-98a22297dc76?source=rss-2cab699ec97------2</link>
            <guid isPermaLink="false">https://medium.com/p/98a22297dc76</guid>
            <dc:creator><![CDATA[Ben Davenport]]></dc:creator>
            <pubDate>Fri, 31 Aug 2018 20:49:44 GMT</pubDate>
            <atom:updated>2018-08-31T20:49:44.407Z</atom:updated>
            <content:encoded><![CDATA[<ol><li>Shitcoins can’t buy happiness. Or, in the long run, anything else.</li><li>There’s a shitcoin born every minute.</li><li>If you have to ask if your coin is a shitcoin, it’s a shitcoin.</li><li>A shitcoin saved is worthless.</li><li>A fool and his shitcoins are soon married.</li><li>If you can’t identify the shitcoin-holder in your first 30 minutes at the table, check your portfolio.</li><li>Better to remain unlaunched and be thought a shitcoin, than to launch and remove all doubt.</li><li>Only <em>other</em> people own shitcoins.</li><li>You can rail against shitcoins all day long and offend no one, as long as you don’t name a specific coin.</li><li>BCH is a shitcoin.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98a22297dc76" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Only Thing Constant is Change]]></title>
            <link>https://medium.com/@bendavenport/the-only-thing-constant-is-change-1d0efa47eb16?source=rss-2cab699ec97------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d0efa47eb16</guid>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Ben Davenport]]></dc:creator>
            <pubDate>Fri, 13 Apr 2018 19:31:54 GMT</pubDate>
            <atom:updated>2018-04-13T19:31:54.390Z</atom:updated>
            <content:encoded><![CDATA[<p>Next week, I’ll be stepping back from my full-time role at BitGo after almost four years. I will continue to be closely involved with the company as an advisor to Mike and the senior technical leadership. I’m planning to take some time to focus on my family, reconnect with a broader set of people in the Bitcoin community, and to start figuring out what I might do next.</p><p>When Mike and I met, we had a shared vision to build an infrastructure company that would play a crucial role in speeding the adoption of Bitcoin. It was a big vision for a few guys in a tiny room, and the path was by no means straight or easy. We couldn’t have possibly foreseen all the twists and turns in the market or our own business. But today, BitGo is the most trusted name in enterprise digital asset security, provides services for 20 different coins or tokens, and handles over $10 billion of transactions monthly. And BitGo is just getting started.</p><p>I’m grateful for everyone who’s helped make BitGo into what it is today.</p><ul><li>To <a href="https://twitter.com/mikebelshe">Mike</a>: I have incredible respect for your growth from an engineer to a true CEO today. You’ve sailed the ship through some rough seas. It’s been an honor working beside you, and I’m excited to see what you continue to build.</li><li>To the team: You are the heart of BitGo: humble, dedicated, and some of the best minds in the industry. I interviewed most of you, and it’s been a real pleasure getting to know and work with you.</li><li>To our customers, investors and board members: Thank you for your continued trust and support for our mission.</li></ul><p>There’s never an easy time to leave, but there are a few reasons why it’s a good time to make this transition. First, the team and business are both extremely strong. And the acquisition of Kingdom Trust will open major new strategic opportunities for BitGo, making it the clear industry choice for institutional custody. Second, we have someone more than ready to fill my shoes. <a href="https://twitter.com/bencxr">Ben Chan</a>, who’s been here almost from the beginning, and has been responsible for the development of our V2 platform, is stepping up as CTO. To Ben: Congratulations — you have my full confidence and support. Customers should know that the technical team continues to have very strong leadership.</p><p>It’s incredible to think that Bitcoin didn’t even exist 10 years ago. And yet we’re still just in the first couple miles of a marathon. I’m incredibly grateful to have been able to do my small part, though I hope it will not be my last contribution by any means. HODL on!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d0efa47eb16" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BitGo’s Approach to Handling a Hard Fork]]></title>
            <link>https://medium.com/@bendavenport/bitgos-approach-to-handling-a-hard-fork-71e572506d7d?source=rss-2cab699ec97------2</link>
            <guid isPermaLink="false">https://medium.com/p/71e572506d7d</guid>
            <category><![CDATA[announcements]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Ben Davenport]]></dc:creator>
            <pubDate>Wed, 22 Mar 2017 19:03:44 GMT</pubDate>
            <atom:updated>2017-03-22T19:40:58.357Z</atom:updated>
            <content:encoded><![CDATA[<p>As the rumblings of a potential upcoming hard fork of Bitcoin have gotten louder, customers have started to ask us what our plans are in the case of a miner-led fork of the network. Until recently, we didn’t ascribe a high probability to any such fork happening, however, we now must consider it as a distinct possibility.</p><p>Before addressing technical specifics, I would like to state the following: At BitGo, we think that any contentious hard fork (as we predict any near term fork would be) would be a huge net negative for Bitcoin and for every business in the ecosystem. We feel the user confusion and brand dilution alone would result in a loss of billions of dollars of market cap in aggregate across both sides of the fork. We are 100% supportive of the safe, tested SegWit functionality available for activation in core code today and believe it is by far the safest way to gain additional block space in the near term.</p><p>That said, BitGo will always have our customers’ best interests at heart; we will work diligently to ensure our customers get the best experience from Bitcoin that we can offer, given the circumstances. While we can’t predict how the future will unfold, we will act as quickly as possible to develop solutions that meet customers’ needs and protect their interests.</p><h3>Contentious Hard Forks</h3><p>BitGo considers any hard fork which is rolled out without industry-wide consensus, and therefore splits the network, to be an altcoin, not Bitcoin itself. This is irrespective of how much hash power the forked coin may have. Ours is only one voice of many, but this is entirely consistent with the view currently taken by the economic majority of Bitcoin exchanges. If such fork were executed in a <strong><em>supportable </em></strong>way<strong><em> </em></strong>(see below), and there were sufficient customer and market demand for the new coin, <strong>we would add support via our API as soon as technically possible</strong>.</p><h3>Supportable Hard Forks</h3><p>In order for us to actually technically support a hard fork, we consider that the following criteria must be met:</p><ol><li>The hard fork must be coordinated via a clear <strong>on-chain activation mechanism</strong>, and should have a generous <strong>grace period</strong> between activation and the fork taking effect.</li><li>The hard fork must provide strong <strong>2-way replay protection</strong>. This means that transactions valid on one chain should be invalid on the other, and vice-versa. Without this protection, users would only be able to safely transact on the chains separately by using explicit splitting techniques, which puts excessive burden on the end user.</li><li>The hard fork must provide <strong>wipe-out protection</strong>. This means, once forked, the fork should remain permanent. The software running the new fork should not be able to produce a reorganization back to the original chain, which would effectively wipe out existence of the new chain.</li></ol><h3>Bitcoin Unlimited / Emergent Consensus</h3><p>Bitcoin Unlimited <strong>does not meet</strong> the above tests for being a supportable fork today. In fact, it fails all three criteria. Additionally, there are serious problems with “emergent consensus,” which can result in ongoing network splits and chain reorganizations of arbitrary length, depending on how different groups of miners set their consensus parameters. Finally, there are serious concerns about the general code quality and peer review process of the Bitcoin Unlimited code base itself. <strong><em>As such, we will not be able to provide support for a hard fork caused by Bitcoin Unlimited in its current form</em></strong>. If the Bitcoin Unlimited team undertakes the efforts needed to make the fork in a supportable manner, our position on this would change accordingly.</p><h3>Customer Actions to Take</h3><p>In the case of an <strong>unsupportable fork</strong> (Bitcoin Unlimited as written today), we recommend taking the following steps:</p><ul><li>Upon the fork, pause any outgoing transaction activity from BitGo. Unless you do so, you will likely unwittingly be transacting on both chains.</li><li>Stay in close contact with BitGo for assistance in splitting or moving coins safely. We would undertake efforts to assist customers in splitting their coins, but we cannot predict how long that might take to accomplish.</li><li>Once either a splitting plan has been implemented, or, alternately, the hard fork has resolved itself back into a single chain due to miners abandoning it, it would again be safe to transact on the original chain.</li></ul><p>In the case of a <strong>supportable fork, </strong>we recommend taking the following steps:</p><ul><li>You would be able to continue to safely transact on the original Bitcoin network using the BitGo API. You would not immediately be able to transact on the new fork. However, you could be assured that transacting at BitGo would not affect the coins on that side of the fork.</li><li>Expect that block times on the original Bitcoin network will be significantly increased, leading to increased load on the network. Limit transactions to those which are absolutely necessary, and expect that fees may rise substantially for multiple weeks due to decreased supply of blocks.</li><li>You may transact your value on the new coin either by using your own 2 keys with software that you or others build, or by waiting for BitGo to add support for the new coin. However, note that BitGo cannot yet promise any particular time frame for support of the new coin.</li></ul><p>There is also the final possibility of a malicious forking action which aggressively acts to stifle the existing (minority) chain using excess hash power. This might result simply in a chain of empty blocks, or might manifest as an apparently working chain which suddenly experienced a chain reorganization many blocks deep. We consider this to be no different than a general 51% attack on the Bitcoin network. In this case, we recommend:</p><ul><li>Halt all bitcoin-related activity of your business, including outgoing transactions, as well as crediting incoming deposits. Any normal assumptions about block confirms required to “finalize” a transaction would be invalid.</li><li>Stay in contact with BitGo and Bitcoin development Slack/IRC channels to stay abreast of discussion of plans for dealing with the attack.</li></ul><p>As always, feel free to contact us at support@bitgo.com for clarification or questions.</p><p>Ben Davenport<br>CTO, BitGo</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71e572506d7d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Bitcoin Block Size: Listen to the Market]]></title>
            <link>https://medium.com/@bendavenport/the-bitcoin-block-size-listen-to-the-market-de9ef6607da5?source=rss-2cab699ec97------2</link>
            <guid isPermaLink="false">https://medium.com/p/de9ef6607da5</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Ben Davenport]]></dc:creator>
            <pubDate>Mon, 18 Jan 2016 21:58:16 GMT</pubDate>
            <atom:updated>2016-01-18T21:58:16.295Z</atom:updated>
            <content:encoded><![CDATA[<p>The Bitcoin block size debate is out of control. Censorship, name-calling, back-room dealings — we’ve seen all of it, and none of it has done any good for Bitcoin. All the controversy does is generate a huge amount of uncertainty, scaring away new entrants, as well as causing existing investors to reconsider the wisdom of their investment.</p><p>The Bitcoin XT ship has sailed, but the issue has not been put to bed. In case you’re not aware, the latest development is called “Bitcoin Classic.” Classic proposes a 2MB hard fork in the short term, and a changed governance model for determining what goes into the code (structure yet TBD). Classic comes with some strong voices behind it, including Gavin and Jeff, a number of large miners, and a number of important companies in the Bitcoin industry. The Bitcoin Core team, meanwhile, believes doing a hard fork at the present time is needlessly risky, and is instead pursuing SegWit via a soft fork for a similar sized potential gain in throughput. I’m not going to take sides here, or even really discuss how we got here. But I hope to shed light on how we can find a way forward.</p><p>There are a number of different sets of actors in Bitcoin: miners, developers, businesses, users, holders (aka investors), and of course, loud voices on social media. I make the assertion that none of these groups matter without the support of holders. It’s the holders’ willingness to hold $5 billion worth of Bitcoin in their portfolios which allows all the other groups to have something worth caring about. However, I think the great irony of the block size debate is that the holders have no real voice yet (besides by selling their coins and walking away from the whole business). I’d like to propose a way to change that.</p><p>To make a hard fork effective, a certain percentage of the miners must commit to support the fork. But how are they meant to make such a decision? Should they listen to the developers? to people on Reddit? to the big companies? What I think they’d really like to do is make decisions the way they normally do: with their pocketbooks. They (corrrectly) want to mine the coin which will provide them the greatest return on their investment. The problem is, miners don’t have a price with which to make a decision. However, they will have a price signal after the fork.</p><p>After a fork which has any contention, there will effectively exist two coins, call them A (old-fork) and B (new-fork). Any holders of BTC before the fork will hold coins of both A and B. And if there’s still an active coin A, then there will be a market price for it. Once the fork happens, the holders will finally have a voice: they will have a market in which they can choose to sell coin A and buy coin B or vice versa. So, we will have two prices: P(A) and P(B), which will likely be quite volatile initially, because it will be the first time anyone has been able to express a view financially between the two coins. Due to this volatility (which expresses the uncertainty of the situation), I think it highly likely that the sum of P(A) + P(B) will be less than the initial price P for pre-fork Bitcoin. In other words, we all lose, at least in the short run.</p><p>Wouldn’t it be much better if we could ensure that the fork would only happen if we knew for certain that B were truly the vastly preferred coin in terms of price? For example, if we knew that P(B) / P(A) was going to trade at 50:1, we could be relatively certain that the fork was desirable by the economic majority. And similarly, if we knew that P(B) / P(A) was more like 2:1, then we could predict that a fork could be pretty disastrous, and therefore decide against it. The exciting thing is, it is possible to get this price signal in advance of actually making the fork, and I’ll explain one way to do so.</p><p>What we need is a market on assets that do not exist yet (and actually may not exist, if the fork does not happen). Clearly, these assets cannot be delivered today, so what we’re talking about is a futures market or prediction market. Any Bitcoin exchange could theoretically make such a market.</p><p>The first thing an exchange needs to do is to allow a trader with BTC on deposit to split that BTC into virtual coins that we’ll call Alpha and Beta. Beta will be redeemable for B, <em>if and at such time as a fork happens</em> by a certain date. Alpha will be redeemable for A, <em>if a fork happens</em>, OR for BTC, <em>if no fork happens</em> by the deadline. At any time before the deadline, a trader can also re-combine N units of Alpha and N units of Beta into N units of pre-fork BTC, so traders are not locked into these future assets until the deadline.</p><p>The exchange may then set up order books for Alpha:BTC and Beta:BTC. Or they may be traded vs. USD or directly against each other. All of these are equivalent due to arbitrage. What’s important is to generate <em>some</em> liquid market for giving us a price signal for Alpha vs. Beta. Also, note that due to the ability to convert pairs of Alpha and Beta back to BTC, it should ensure that we should maintain a price relationship: P(Alpha) + P(Beta) = P(BTC).</p><p>This market should also be expected to be quite volatile. However, convergence should be reached relatively quickly. The reason is: once the price starts to tilt obviously in one direction, it is likely to continue in that direction. Almost all the value should eventually accrue to either Alpha or Beta, since there is a feedback loop which says that if Beta’s price is too low, then it is worthless (the fork will not happen due to miners looking at the low price for Beta). And similarly on the other side, if the Beta price is high, fork will almost certainly happen with high support, and so Alpha will be worthless. The important point is, meanwhile, this process should have caused minimal volatility in the actual BTCUSD market. If anything, there could be a price rise as uncertainty gets removed.</p><p>Decentralized consensus is a very tricky beast. In the early days, we had Satoshi as an effective central decision-maker who could settle arguments, but we no longer have that luxury (nor would we want it.) But without a North Star to point to, our arguments are likely to run around in circles forever (or until we blow the whole thing up accidentally). I am in agreement with Core that we ought to approach hard forks very carefully. But no amount of debating will give us as much information as getting a true market price for the fork. So let’s do that!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de9ef6607da5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multi-Sig Models That Work]]></title>
            <link>https://medium.com/@bendavenport/multi-sig-models-that-work-adb7707eb009?source=rss-2cab699ec97------2</link>
            <guid isPermaLink="false">https://medium.com/p/adb7707eb009</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[visualization]]></category>
            <dc:creator><![CDATA[Ben Davenport]]></dc:creator>
            <pubDate>Wed, 18 Mar 2015 04:19:51 GMT</pubDate>
            <atom:updated>2015-03-18T04:19:51.645Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ExPpZVAhvhVJUDVtTMN6wQ.jpeg" /></figure><p><strong>A visual language for reasoning about multi-sig Bitcoin security.</strong></p><p>It used to be so simple, didn’t it? One coin, one key, one user. Not too many ways to get that wrong. Except, you know, when somebody else suddenly got hold of the key. That sucked.</p><p>Now it’s gotten so complicated. Seems like everybody decided that maybe one key just isn’t enough after all. “We want multi-sig! It will save us!” cried the masses. “Good thing we built that 3 years ago,” replied Gavin. “How about you try actually using it?”</p><p>All kidding aside, multi-sig (via P2SH) does open a dramatically new set of possibilities for security and custody models for Bitcoin. But with multiple keys, apps, users, and signing oracles, there is quite the combinatorial explosion of ways to organize the keys and participants. And to complicate matters further, multi-sig models may incorporate arbitrary off-blockchain policies regarding who is allowed to do what, when, on behalf of whom.</p><p>How do we reason about the security characteristics of the various ways to implement multi-sig security? Given a certain end goal, how do we determine the best approach out of all the possibilities? The first step is being able to clearly understand the components and relationships that make up the system.</p><p>At <a href="https://www.bitgo.com/">BitGo</a>, we operate a <a href="https://www.bitgo.com/platform">multi-sig platform API</a>, allowing companies and individuals to build Bitcoin security solutions that meet the needs of their applications. In working with various partners implementing applications on our platform, we’ve had to address the above questions. In order to talk about different approaches, we’ve come up with a visual language for expressing multi-sig models, that we think is broadly useful.</p><p>We like to represent multi-sig setups as directed graphs:</p><ul><li>Nodes represent various entities: the bitcoin, the keys, users, oracles, exchanges, etc.</li><li>An arrow from A to B means that A has some measure of control over B.</li><li>An arrow without annotation represents complete control.</li><li>An arrow with annotation represents partial control, subject to policy.</li></ul><p>Okay, enough jibber-jabber, let’s get to some pictures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*Hx7pGlwM-BJdqie-5x0_yg.png" /><figcaption>Figure A</figcaption></figure><p>The above diagram is about the simplest model possible. An amount of bitcoin is controlled by a single key, which is controlled by a single user, in other words, classic single-key security. <em>This model can only get simpler if the user loses his key or gets hit by a bus.</em> Let’s see something a bit more interesting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*YAiC_e6xCwCdLmNW6e5hcw.png" /><figcaption>Figure B</figcaption></figure><p>Figure B represents bitcoin controlled by 2 keys, both required to transact. For example, a single user maintains one key on a laptop, and a second key on a phone or hardware wallet. The immediate benefit of this model is that there is no longer a single point of failure except for the user himself. <em>Note: The 2-of-2 configuration is not directly specified in the diagram, but could be annotated.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*v6-wMU4K-kcTEnzMncA1XA.png" /><figcaption>Figure C</figcaption></figure><p>Figure C again represents a 2-of-2 setup, but this time, the keys are controlled by separate users. In order to transact, both users must apply signatures with their respective keys. A 2-of-2 wallet established using software such as <a href="https://copay.io/">Copay</a> would follow this model. <em>Excercise for the reader: What happens if User 2 has a tragic kayaking accident in Guatemala?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Bw4BGWtlbu_Tghuq3uSWA.png" /><figcaption>Figure D</figcaption></figure><p>Figure D shows the classic 2-of-3 trustless escrow model enabled by multi-sig, using a third-party as arbitrator. The two users (seller &amp; buyer, typically) can release funds on their own if all goes smoothly with a transaction. If there is a dispute, then the arbitrator can step in to make a judgment, and can transact along with either the buyer or the seller. Importantly, the arbitrator does <em>not have to be trusted with the funds themselves!</em> This model is used by apps such as <a href="https://hashtrust.com/">HashTrust</a>, <a href="https://www.bitrated.com/">BitRated</a> and <a href="https://openbazaar.org/">OpenBazaar</a>. It is a model that is not used often today, but is lying in wait for a truly successful peer-to-peer marketplace to emerge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*YdwE65dUzn2QIl1zZWou8w.png" /><figcaption>Figure E</figcaption></figure><p>Figure E is a single-user 2-of-3 model which uses a co-signing service often called an “oracle” or alternatively, a co-signing service. The user controls 2 keys, one of which is kept completely offline. By controlling 2 keys, only the user always has full ability to transact, and thus complete custody of the bitcoin. The job of the oracle is to determine under what circumstances it should or should not apply its co-signature to a transaction. The oracle can apply arbitrary authorization requirements on the user, and enforce spending policies which the user has pre-configured. <em>Note: This model was </em><a href="https://www.bitgo.com/p2sh_safe_address"><em>pioneered by BitGo</em></a><em> and is still used today in its multi-sig web wallet. We think it’s pretty good.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DJuDAf2ku64Nbgt0on8g3A.png" /><figcaption>Figure F</figcaption></figure><p>Figure F is again a 2-of-3 model using a signing oracle, but adds multiple users, as well as a custodian who holds a cold backup key. The custodian might be a third individual within the same company as the other two users, or might be an outside custodian which contractually agrees to release the key to the user or organization under a certain set of circumstances (such as loss of key 2).</p><p>The two users actually share only a single key, meaning neither can transact independently, and they cannot even transact together, without involving the signing oracle. By arranging keys this way, the oracle can enforce rules that require only a request from a single user, or can require that both users approve of a given transaction before agreeing to co-sign. Another advantage is that users may be added to the wallet at any time, since no new keys need to be provisioned. <em>Note: This diagram represents the basic architecture of BitGo’s multi-user wallets.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TFHbNyyXbG4gjrwZtNFutw.png" /><figcaption>Figure G</figcaption></figure><p>Figure G represents one way to implement a segregated on-blockchain account at a Bitcoin exchange. The exchange (E) has an end-user (U). The user does not directly control a key — the exchange controls it on the user’s behalf. The oracle’s policies can be set such that the exchange’s automated systems can move funds out of the segregated wallet without the end-user’s approval, but only to a designated white-listed settlement wallet. Additional rules involving multiple humans can protect the funds in the settlement wallet.</p><p>In order to make a withdrawal, the user requests it through the exchange’s web site. The user does not have a key, but the exchange crafts a half-signed transaction on behalf of the user, and submits it <em>as</em> the user using OAuth credentials for the user, who has a direct identity relationship with the signing oracle. Importantly, the user must also provide a 2-step verification code in order for the oracle to accept the request. Because the withdrawal list is not on the target address white-list, the exchange must also submit an approval as itself to the oracle.</p><p>This model provides a great number of benefits for both the exchange and its users:</p><ul><li>The user is not in possession of a key, and therefore cannot lose it.</li><li>The exchange can perform automated settlement in a secure way.</li><li>Withdrawals require user involvement via 2FA direct to the oracle.</li><li>The user can see all his/her funds segregated on the blockchain, and conversely, the exchange can provide assurance of 100% reserve.</li><li>The user can recover funds with help from the oracle and the custodian in the event the exchange disappears or loses its keys.</li><li>The exchange getting hacked cannot result in an immediate total loss of all customer funds.</li><li>The oracle can put a temporary freeze on signing any transaction from the exchange.</li><li>No single party holds enough keys to transact independently. No entity has complete custody except for the blockchain itself.</li><li>Security through obscurity. No attacker will figure out all those arrows. Ha ha, kidding — just seeing if you’re still paying attention.</li></ul><p>As I mentioned earlier, the ways to combine the various relevant pieces into coherent security models only expand from here. That doesn’t mean that most of them are good ideas, just that there are a lot of them. It takes a good deal of thought to fully understand the security implications of any one of these models, particularly as they get more complex. <em>Did you notice that none of these models even involved more than 3 keys?</em></p><p>At BitGo, we’ll continue to explore the space to find useful new models. And we hope that the Bitcoin community finds this way of visualizing multi-sig security enlightening and useful while trying to separate the wheat from the chaff. And by the way, if you really made it this far, and it all made sense (or you found a mistake!), maybe you ought to think about coming to <a href="http://bitgoinc.com/jobs/">work with us</a>.</p><p><em>Ben Davenport is co-founder and Chief Product Officer at BitGo.</em></p><p><em>Diagrams were produced with </em><a href="http://draw.io/"><em>draw.io</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=adb7707eb009" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[No Sleep till Multi-Sig]]></title>
            <link>https://medium.com/@bendavenport/no-sleep-till-multi-sig-7db367998bc7?source=rss-2cab699ec97------2</link>
            <guid isPermaLink="false">https://medium.com/p/7db367998bc7</guid>
            <dc:creator><![CDATA[Ben Davenport]]></dc:creator>
            <pubDate>Mon, 12 Jan 2015 18:30:53 GMT</pubDate>
            <atom:updated>2015-02-20T17:19:14.503Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How Bitstamp and BitGo launched a multi-sig hot wallet in less than 48 hours.</em></p><p>On Monday, Jan 5, 2015, <a href="https://www.bitstamp.net/">Bitstamp</a> alerted customers that they were suspending operations due to a theft of funds from their hot wallet. I’ve known the Bitstamp founders since October 2013, and we at <a href="https://www.bitgo.com/">BitGo</a> have been talking with them for some time about ways to work together. My heart sank on hearing the news, both because another hack is the last thing Bitcoin needs, and because I knew what Nejc, Damijan and the whole team must be going through right now.</p><p>Not knowing any further details at this point, we reached out to see how we could help. The BitGo engineering team had our first phone call with Bitstamp on Wednesday morning. Since the hack, the Bitstamp team, as well as their major investors at Pantera Capital, had already been working furiously around the clock in San Francisco and Slovenia to put in place their pre-existing business continuity plan. They were in the process of setting up a clean replica of their entire infrastructure on AWS, while the existing machines were being preserved for forensic investigation.</p><p>Our goal was to help them secure their operational (hot) wallet using BitGo’s multi-sig platform, but under the circumstances, we knew it was a long shot that the Bitstamp team, already slammed with work, would want to pursue a new API integration on such a tight timetable. And yet, by Friday morning, Bitstamp reopened for business, and began processing deposits and withdrawals out of a brand-new multi-sig wallet secured with BitGo. The integration required a great deal of work from both teams, but resulted in changing only a single line of code<em> </em>in their core software. So how did we do it?</p><p>During our phone call, the tech team at Bitstamp let us know their existing hot wallet used bitcoind. They asked if we had an API that was bitcoind-compatible. Unfortunately, we did not. Moreover, we did not yet even have an existing SDK in the language Bitstamp uses on their servers. But it was this question that essentially told us what we ought to do: build a translation layer that looks like bitcoind, but uses the BitGo API as its back-end. Our platform was ready and scalable — they just needed an easier way to talk to it.</p><p>A brief word of explanation of BitGo and its platform. BitGo has been working on multi-sig since the beginning of 2013. BitGo, at its core, is a security platform for Bitcoin. Our web-based enterprise multi-user wallet is built on our own platform, and we were nearing the wide-availability launch of our platform API when the Bitstamp hack occurred.</p><p><a href="https://www.bitgo.com/api">BitGo’s API</a> uses 2-of-3 multi-sig HD wallets. This means that a wallet consists of 3 HD (BIP32) root keys: the operational key, the BitGo key, and the backup key. These keys are generated on 3 separate machines, and 2 are never present on the same device. Such a wallet can generate an unlimited number of new addresses in order to maintain privacy. To spend funds, the user must first construct a transaction and attach his signature using the operational key, all on the client. Then, he submits the transaction to the BitGo server API for co-signing.</p><p>Before deciding to co-sign, BitGo applies security policy checks on the wallet, such as enforcing velocity limits, address target whitelists, IP restrictions, and so on. If the transaction passes the security checks, BitGo issues the second signature on the transaction using its key, and submits it to the network. If not, then BitGo may either reject the transaction, or hold it for additional approval from another administrator on the wallet. The final (backup) key does not come into play during normal operation. It is a cold-storage key which is for disaster recovery, and also allows the customer to retain ultimate custody of the bitcoin.</p><p>Back to the story… We knew we couldn’t possibly fully replicate all of bitcoind’s functionality in such a short time. But the Bitstamp eng team was very quickly able to send to us the pieces of their code which interacted with bitcoind. With that code, we now had a map. We now knew we only needed to implement a limited set of API calls. And we realized that for the non-wallet-specific blockchain calls, we could just proxy to Bitstamp’s existing bitcoind instance. If we succeeded, we would be able to drop in a replacement, and Bitstamp’s existing systems wouldn’t know the difference.</p><p>Over the next 24 hours, while the Bitstamp team kept forging ahead with their infrastructure work and re-launch plans, the BitGo engineering team built our multi-sig bitcoind replacement, which we named BitGoD. We built BitGoD in NodeJS, using the <a href="https://www.npmjs.com/package/json-rpc2">json-rpc2 module</a>, and the <a href="https://www.npmjs.com/package/bitgo">BitGoJS SDK</a>. The proxied calls were very straightforward to get up and running, and a number of the wallet calls, such as <strong>getnewaddress, getbalance </strong>and <strong>listunspent </strong>had 1-for-1 equivalents already in BitGo’s SDK. The core functionality of <strong>sendtoaddress</strong>, despite being a multi-sig transaction, involving client-side signing as well as server-side signing, was able to be replicated in 37 lines of code using our existing SDK. A slightly simplified version of that code is below:</p><pre>handleSendToAddress = function(address, btcAmount, comment) {<br>  this.ensureWallet();<br>  var self = this;<br>  var satoshis = Math.floor(Number(btcAmount) * 1e8);<br>  <br>  return this.getWallet()<br>  .then(function(wallet) {<br>    var recipients = {};<br>    recipients[address] = satoshis;<br>    <strong>return self.wallet.createTransaction({<br>      recipients: recipients,<br>      keychain: self.getKeychain()<br>    });</strong><br>  }).then(function(tx) {<br>    <strong>return self.wallet.sendTransaction({<br>      tx: tx.tx,<br>      message: comment<br>    });</strong><br> }).then(function(result) {<br>   return result.hash;<br> }).catch(function(err) {<br>  // handle errors...<br> });<br>}</pre><p>The most tricky call to replicate was <strong>listtransactions</strong>. BitGo has an API to return the transactions on a wallet, but it returns 1 record per transaction. On the other hand, bitcoind returns one record per transaction output, excluding change addresses. This wasn’t fundamentally difficult — it amounts to expanding each of our tx records into multiple records in BitGoD. But we had to be very careful about ensuring that we were producing the same results as bitcoind for all types of transactions. Additionally, we had to add some key bits of info to the records our API was returning in order to fully provide the needed information.</p><p>Finally, we added a few additional JSON-RPC commands to BitGoD to allow passing in the required BitGo authorization token and the operational key. We shipped the code for BitGoD to the Bitstamp team on Thursday afternoon and began testing the integration with their team. There were a few small issues with the new code that had to be ironed out. But within a few hours, all the site functionality was working. New deposit addresses could be generated, deposits were credited, and withdrawals could be processed.</p><p>The next morning, the Bitstamp team made the final call to go live with the new implementation, and they opened their doors again to new customers. Almost immediately, transactions began flowing through the new hot wallet, and every customer that deposited funds saw brand-new multi-sig addresses. Our hats are off to Nejc, Damijan and the entire Bitstamp team and their investors for successfully managing their way through this crisis. I believe this unfortunate event will ultimately only make them stronger as a company.</p><p>We are happy to have played a small part in helping Bitstamp re-launch their exchange. And we’re looking forward to continuing to work with them to determine how to use multi-sig most effectively for their operational security, now that the immediate crisis has passed.</p><p><em>Note: We will be open-sourcing BitGoD in the very near future after implementing the remaining API calls. We think it can be a great easy first step to multi-sig for businesses that are already using bitcoind in their stack.</em></p><p><em>Update (Feb 20 2015): We have released </em><a href="https://github.com/BitGo/bitgod"><em>BitGoD</em></a><em> — check it out!</em></p><p><em>Ben Davenport is co-founder and Chief Product Officer at BitGo.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7db367998bc7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>