<?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 Jordan Clifford on Medium]]></title>
        <description><![CDATA[Stories by Jordan Clifford on Medium]]></description>
        <link>https://medium.com/@jcliff?source=rss-be762e1cb4c6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*RwInziEJyLXkw31v_gG7jg.png</url>
            <title>Stories by Jordan Clifford on Medium</title>
            <link>https://medium.com/@jcliff?source=rss-be762e1cb4c6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 05:18:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jcliff/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[Charting Crypto’s Course]]></title>
            <link>https://jcliff.medium.com/charting-cryptos-course-761ca5e38d5d?source=rss-be762e1cb4c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/761ca5e38d5d</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Jordan Clifford]]></dc:creator>
            <pubDate>Thu, 19 Dec 2019 21:52:26 GMT</pubDate>
            <atom:updated>2019-12-19T21:52:26.278Z</atom:updated>
            <content:encoded><![CDATA[<p>Cryptocurrencies are nearly eleven years old now, and an impressive ecosystem has formed around them. The total cryptoassets market cap is well north of $100 billion. Billions of dollars of crypto are traded daily. Millions of users have installed a crypto wallet. Major US financial institutions CME and ICE make markets in crypto derivatives.</p><p>Yet, despite the incredible advancements, there remains a lot of work to get where we want to be. As an industry, we’re looking forward to global democratized access to financial products, banking the unbanked (and unbanking the banked), and mainstream applications.</p><p>In this post, we’ll take a look at crypto’s trajectory and what efforts are underway to make the visions turn into reality.</p><h3>What’s needed?</h3><p>If cryptocurrencies are going to succeed, they’ll need to do so because they are a success in the free market. This requires offering the best product market-fit in a particular segment of the market. Usually, in the absence of a sanctioned monopoly, the best experience, price, or a cost/benefit sweet spot is what the market prefers.</p><p>Each market is different, and cryptocurrencies are already solving problems for a few resourceful and tech savvy folks in particularly oppressed parts of the world like Venezuela. Challenges such as volatility, liquidity, transaction costs, and lack of convenient user interfaces prevent them from becoming ubiquitous in more market segments. An aspiring freelancer in a developing country is more ready to jump through difficult hoops than someone in the first world with plenty of financial opportunity and access.</p><p>Crypto enthusiasts have long held beliefs that removing middlemen and counterparty risk from transactions will make them cheaper and faster. It can make previously impractical or impossible transactions possible for the first time. Micropayments as reward for content creators or marketplace access for sex workers and freelancers in oppressive countries are often cited as example areas that are ripe for disruption. As crypto takes over in relatively niche areas, we can expect the infrastructure to mature much more rapidly with wide use and become even more user friendly.</p><h3>Developers (&amp; their tool chains)</h3><p>Today the internet’s impact is readily apparent. Facebook, Amazon, Netflix and Google have taken over massive swaths of people’s attention and wallets. Over the years, these companies introduced countless products and features that serve the needs of the general public and that has turned them into the largest companies in the world.</p><h4>The Internet</h4><p>What’s easy to forget though is the 1990s and 2000s when the internet was a much more empty and intimidating place. Much like the crypto landscape today, the internet was hard to use. Before the web browser, people were siloed into proprietary experiences, and it just wasn’t obvious how all this tech would become useful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*e0vujn30Y7YfHmfO.png" /><figcaption>How the early internet looked. credit: <a href="https://www.telnetbbsguide.com/connection/dial-up">Telnet BBS Guide</a></figcaption></figure><p>Early on, developers used C/C++ for server infrastructure and Java servlets on the client. Development was difficult and without references of successful applications, progress was slow. Adobe Flash made media and interactivity easier, but was riddled with security vulnerabilities and has now been largely replaced with HTML5. JavaScript took at least a decade to become ubiquitous on the front end. JavaScript now powers many backends as well with the popular Node.js that was first released in 2009.</p><p>Today’s services rest on top of a massive foundation of prior art, libraries, standards, and best practices. These standards evolved to meet the increasingly innovative developer community’s demands. Low level protocols such as TCP/IP, UDP, HTTP, SMTP, FTP as well as higher layer protocols such as WebRTC or BitTorrent took time to develop.</p><h4>Crypto’s early days</h4><p>Crypto has proven that it’s possible to store and send value seamlessly using only computers and open protocols. This is impressive, but it is difficult to access, similar to the early bulletin boards that populated the internet in the 80s. It requires determination and possibly technical chops to debug issues along the way. Who doesn’t remember the blue screen of death when using Windows 95?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*IF0mPQsd53sXXZa3.jpg" /><figcaption>Early software comes with growing pains. Credit: <a href="https://www.youtube.com/channel/UCKnzVns0quHI0nI7q2655cQ">Jackey Force</a></figcaption></figure><p>Right now, developers across crypto are building out all levels of the technical stack. Many teams are focused on the bottom of the stack. Firming up these foundational layers is necessary before significant amounts of investment in end user applications and interfaces can be justified.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/357/1*eKU8sg9l3Xd_Vc8oq_zzzQ.png" /></figure><p>Deficiencies in the stack limit the ability for digital assets to be used cheaply and conveniently. Today crypto offers the best value in select market segments that have extremely limited options. But, just like the early internet solved problems only for the most dedicated, we can expect the technology to improve and the cost/benefit tradeoff to become more and more attractive.</p><h3>What to look for?</h3><p>We’re in the early innings of digital assets. Digital assets are a promising technology, but still require a lot of maturing before they will be able to meet the larger needs of the world’s population. Ultimately, for crypto to succeed it will take developments at all layers of the stack.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=761ca5e38d5d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Intro to Blockchain: UTXO vs Account based]]></title>
            <link>https://jcliff.medium.com/intro-to-blockchain-utxo-vs-account-based-89b9a01cd4f5?source=rss-be762e1cb4c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/89b9a01cd4f5</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[economics]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <dc:creator><![CDATA[Jordan Clifford]]></dc:creator>
            <pubDate>Fri, 20 Sep 2019 21:15:23 GMT</pubDate>
            <atom:updated>2019-09-20T21:15:23.194Z</atom:updated>
            <content:encoded><![CDATA[<p>The term blockchain carries a lot of hype, but it is sometimes difficult to understand the full meaning. Blockchain, originally block chain, was coined to describe Bitcoin’s data structure after its launch in 2009. The name describes a chain of blocks, while each block includes transactions or updates to a shared ledger. This definition isn’t quite satisfying though and doesn’t differentiate blockchains from what’s been possible long before Bitcoin.</p><p>Let’s look at what it really means to be a blockchain and compare how top platforms use a blockchain to store and agree on the shared ledger.</p><h3>Background</h3><p>To illustrate why the superficial understanding of blockchains is inadequate, let’s look at linked lists, which were <a href="https://books.google.com/books?id=XhYrw6-4OVgC&amp;lpg=PA129&amp;ots=JZvcYF62-g&amp;dq=linked%20list%201955&amp;pg=PA130#v=onepage&amp;q&amp;f=false">invented in 1955</a>. Linked lists are a very common data structure, often taught in college computer science classes. Each element includes data and a pointer to the next element. This data included is arbitrary and up to the programmer. A linked list could have easily been adapted so that each element includes a list of transactions to update a shared ledger.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/0*nkQZu65y5m_9ZxBB.png" /><figcaption>Image credit: <a href="https://www.geeksforgeeks.org/data-structures/linked-list/">Geeksforgeeks</a></figcaption></figure><p>However, this linked structure would not be considered a blockchain. The reason it’s not a blockchain is that it doesn’t describe a method to ensure a single version of the chain will exist. Furthermore, it’s not difficult to rewrite history and create an alternative linked list that’s just as valid as the original. Without further social context, it’s impossible to decide which version is correct.</p><p>Blockchains solve the problem of deciding which chain is valid with the use of consensus algorithms. Consensus algorithms combine cryptography and economic incentives to enforce correctness and immutability. Decentralized consensus distinguishes public blockchains from predecessor technology such as linked lists or shared databases. I’ve previously wrote about <a href="https://medium.com/scalar-capital/on-consensus-e47920cd8914">consensus here</a>.</p><h3>Ledger Data</h3><p>Blockchains provide a way for adversaries to agree on the current global state in a peer-to-peer manner. Let’s look at how blockchains store their ledger state and what tradeoffs they face.</p><p>All cryptocurrencies start with a genesis state, and then each block includes transactions that move the state forward.</p><h4>UTXO based</h4><p>This is the original form of a blockchain used by Bitcoin and many Bitcoin derivatives such as Zcash and Litecoin. In a UTXO based ledger, strictly speaking, there are no accounts or wallets at the protocol layer. Instead, coins are stored as a list of unspent transaction outputs or UTXOs. Each UTXO has a quantity and a criteria for spending it. Transactions are created by consuming existing UTXOs and producing new UTXOs in their place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*vCdTqj0MXhwE_o_eHq5EsQ.png" /><figcaption>Image Credit: <a href="https://bitcoin.org/bitcoin.pdf">bitcoin whitepaper</a></figcaption></figure><p>A UTXO is akin to a pile of coins that gets transferred by satisfying the current spending criteria. UTXOs can be divided or combined to create the denomination needed for a particular transaction.</p><p><strong>Advantages:</strong></p><ul><li>Simplicity. Spending a UTXO is all or nothing. Since UTXOs are uniquely referenced and completely consumed upon spending, there is no chance for a transaction to be replayed.</li><li>Transactions can be trivially verified in parallel. It is impossible for two transactions to affect the same UTXO. This is due to the stateless nature of UTXO transactions. Transactions do not refer to any input outside of the UTXOs consumed and corresponding signatures.</li><li>Privacy preserving behavior is encouraged in the UTXO model. Users are encouraged to generate a new address for every incoming transaction including change addresses. By using a new address each time, it is difficult to definitively link different coins to a single owner.</li></ul><p><strong>Disadvantages:</strong></p><ul><li>UI/UX considerations are tricky. Users tend to think of accounts when they conceptualize their money. Since there is no concept of an account within Bitcoin, it is up to the wallet provider to manage a potential set of addresses and sum the corresponding balances. Doing so in a privacy preserving way may require running a local node.</li><li>Smart contracting abilities are quite limited in a UTXO model. Each UTXO has spending criteria that dictates spending conditions. This can require signatures from multiple parties, but there is little ability to reference outside state such as oracles.</li></ul><h4>Account based models</h4><p>Rather than following in Bitcoin’s footsteps, smart contract focused blockchains have chosen to employ an account strategy. Instead of having each coin be uniquely referenced, coins are represented as a balance within an account. Accounts can either be controlled by a private key or a smart contract.</p><p>One important difference between UTXO based blockchains and account based blockchains is that UTXO transactions specify the resulting state exactly. We know what the result will be when we apply the transaction. The resulting coin locations are embedded in the transaction itself. This is not so with an account based system. Transactions in an account based system rely on existing state and are therefore known as stateful. This allows more flexibility with the expense of more moving parts.</p><p>To illustrate some of the nuance introduced in an account based model, consider that balances can be partially spent in an account model. If I have 100 ETH, I can send you 5 ETH and the result is that I have 95 ETH and you have 5 ETH. If the system is not carefully designed, that transaction could be replayed resulting in me having 90 ETH and you having 10 ETH, despite the sender’s intention to have the transaction applied only once. To avoid this, an incrementing nonce is required to ensure that transactions are not processed multiple times.</p><p><strong>Advantages</strong></p><ul><li>More flexible transactions. Transactions depend on the existing state and can have diverging effects based on external input. This allows things like oracles and other logic to influence the resulting state of a transaction.</li><li>Transactions do not explicitly include the resulting state resulting in smaller transaction sizes.</li></ul><p><strong>Disadvantages</strong></p><ul><li>Because the result of a transaction depends on the input state, care must be taken when executing transactions in parallel. Generally, transactions affecting the same account will need to be executed one after another.</li><li>Account models encourage address reuse which is generally a detriment to privacy, since the account itself links transactions together to a single owner.</li></ul><h3>Conclusion</h3><p>Blockchains allow an entire community to share a ledger without trusting each other. The actual format of that ledger may look very different from one cryptocurrency to another. The underlying protocol design dictates how data is stored and must make tradeoffs that impact how the network is accessed and what it’s best used for.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89b9a01cd4f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Futures & Crypto]]></title>
            <link>https://medium.com/scalar-capital/futures-crypto-8ac1a993ce85?source=rss-be762e1cb4c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ac1a993ce85</guid>
            <category><![CDATA[cryptocurrency-investment]]></category>
            <category><![CDATA[derivatives]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[futures-trading]]></category>
            <dc:creator><![CDATA[Jordan Clifford]]></dc:creator>
            <pubDate>Tue, 03 Sep 2019 19:29:46 GMT</pubDate>
            <atom:updated>2019-09-03T21:07:12.796Z</atom:updated>
            <content:encoded><![CDATA[<h4>An exotic financial product category meets Bitcoin</h4><p>When the Chicago Mercantile Exchange (CME) launched the first Bitcoin futures contract in December 2017, it was a big step for the crypto industry. For the first time, a cryptoasset would be available as a commodity that could be traded via futures at the CME.</p><h4>So what are futures?</h4><p>A futures contract is a contractual agreement to transact at a later date. You choose the goods, a price, and a future date and agree to settle when that date rolls around. One party agrees to sell the goods at the agreed price to the other party. These agreements allow businesses to lower their uncertainty. Both the buyer and seller lock in a price for the future transaction.</p><p>These agreements also provide a way for traders to access leverage. Imagine a trader who believes that the price of copper will increase in the next three months. In the past, they may have had to buy copper or a shares in a copper company to execute on their idea. With futures, a new strategy opens. With a $10,000 budget, the trader could purchase $10,000 worth of copper and wait, but now they may be able to access a futures contract to agree to buy $100,000. They can buy a $100,000 contract with only $10,000 in their account, because most of the time the settlement amount will be within $10,000 in either direction. In the event the price moves aggressively against the buyer or seller, positions can be force liquidated to protect all counterparties.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*ITCS3qcjb4KpotHpBUxTCg.png" /><figcaption>Profit from $10,000 bet in futures (red) ordinary purchase (green)</figcaption></figure><p>To illustrate the potential for leverage, if the price of copper goes up 10% in the timeframe, buying copper would yield $11,000. But with a $100,000 futures contract, your account would have become worth $20,000. Notice that if the price of copper would have decreased by 10%, our trader would have been wiped out with $0 in account value — leverage can backfire.</p><h3>Cash Settled</h3><p>Futures contracts come in two formats: cash settled and physically delivered. The CME contracts are cash settled. With a cash settled contract, at the settlement date the current market value is compared to the agreed upon price, and the difference is transferred. If the value is higher, then the buyer did well to lock in the lower price and the seller pays the buyer. The inverse is true if the current price is lower than the agreed on price.</p><p>These contracts allow institutions and other futures traders the chance to bet on the price of bitcoin without having to hold bitcoin. These contracts are useful. With them institutions can get price exposure on a regulated exchange comfortable to them and miners can smooth out their income. However, they face criticism. A common criticism of cash settled futures is that there is no transfer of the underlying, and ultimately no requirement that either party have any bitcoin at all. Some fear that this could be used to dilute bitcoin’s supply since people can use this contract to get bitcoin price action and wouldn’t actually be buying real bitcoin from the market.</p><p>This criticism glosses over the fact that in order to have synthetic bitcoin, someone has to have the short side — a party that’s willing to take the opposite side on bitcoin’s performance. Far from creating bitcoin from thin air, it’s creating new bitcoin exposure from people who want the inverse of that price exposure. Futures markets can provide better liquidity and price discovery for the underlying regardless of whether the underlying is transferred.</p><h3>Physically Delivered</h3><p>Bakkt had made headlines for <a href="https://medium.com/bakkt-blog/cleared-to-launch-8dfc3e6f9ed0">gaining clearance</a> to issue their physically delivered futures contract on September 23rd. As the name suggests, when a physically delivered contract is settled, the physical goods come due. In this case, physical bitcoin simply refers to an on chain transaction — the coins remain digital. Rather than settle the difference in cash, the futures contract seller must sell and transfer the underlying asset to the buyer for the previously agreed on price.</p><p>In order to facilitate this delivery, Bakkt will launch a warehouse with $125M in insurance for its clients to post bitcoin for custody and transfer. Getting warehouse approval took many months of back and forth and delays with the CFTC. This wait will soon be over and Bakkt will become the first venue primarily regulated by a federal agency (the CFTC) to buy bitcoins.</p><h3>So what?</h3><p>Why do futures matter? Futures offer a standard contract for people to trade on the future price of an asset. The time duration allows for parties to hedge risk and express a variety of views that help the market with price discovery. Futures have done dramatic things for gold’s liquidity as its futures trading volume soundly eclipses the spot market.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tunno1ohfiH6sLKC" /><figcaption>Credit: CoinShares Research</figcaption></figure><p>The global futures markets are enormous and these markets are a powerful tool for reducing or taking on risk. Over time, we expect these futures markets to expand access to cryptoassets. We can expect more mainstream comfort with the asset class as large players get behind these products. Crypto is getting harder to ignore and meeting Wall St where it is.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ac1a993ce85" width="1" height="1" alt=""><hr><p><a href="https://medium.com/scalar-capital/futures-crypto-8ac1a993ce85">Futures &amp; Crypto</a> was originally published in <a href="https://medium.com/scalar-capital">Scalar Capital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Crossing shards]]></title>
            <link>https://medium.com/scalar-capital/crossing-shards-e03aed0c39d1?source=rss-be762e1cb4c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/e03aed0c39d1</guid>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[distributed-ledgers]]></category>
            <dc:creator><![CDATA[Jordan Clifford]]></dc:creator>
            <pubDate>Mon, 01 Jul 2019 16:02:23 GMT</pubDate>
            <atom:updated>2019-07-01T16:02:23.066Z</atom:updated>
            <content:encoded><![CDATA[<h4>Intro to sharding and cross-shard trust</h4><p>The challenges of scaling blockchains are well documented. The most successful blockchains in operation today form a linear chain, where each block or update references the previous. Every node on the network stores a complete copy of the ledger history. The singular chain model works extremely well at keeping the entire world in consensus. Unfortunately, it is rather limiting in terms of overall network throughput, since every node needs to receive and validate every transaction that happens globally.</p><h3>Background</h3><p>Many approaches have been proposed to help blockchains scale. The most popular approaches today are layer 2 solutions such as Lightning or Plasma, bigger blocks, and abandoning the idea of a linear blockchain completely in favor of a more scalable architecture. A couple of possibilities exist to replace a linear blockchain: DAGs and sharding.</p><h4>Note on DAGs</h4><p>Directed acyclic graphs (DAGs) have been proposed by projects such as IOTA, Byteball and Nano. They believe that it’s not important for everyone to have a global state, but rather nodes should only need local state relevant to them and enough connections to other nodes to verify their local state is not in conflict with others’ view.</p><p>In the absence of the global state, attacks such as the <a href="https://eprint.iacr.org/2015/263.pdf">Eclipse attack</a> are possible if an attacker can monopolize the incoming connections of a victim node. IOTA until May 2019 solved this with a centralized coordinator that everyone connects to. This arguably defeated the whole point of the DAG. They’ve recently announced a switch from the coordinator to voting module dubbed Coordicide. Consensus participants are going to be expected to proactively vote on conflicting transactions, which in my view sounds quite a lot like traditional blockchain consensus.</p><h3>Sharding</h3><p>Sharding systems are similar to DAGs, but they acknowledge the importance of a global view of state and impose formal structure on the ledger to ensure that the whole system stays in alignment. Sharding divides the validation work of a blockchain into groups that are each responsible for a subset of the work.</p><p>Many designs exist for sharding, yet very few are in production today. The primary design consideration is whether to have a beacon chain or not. A beacon chain acts a lot like a traditional blockchain, but rather than validate transactions and ledger state itself, it relies on each shard to come into consensus on its own state. This state is then condensed into a merkle root that is signed by a quorum of shard validators. The beacon chain then weaves together the shard roots into an overall chain root.</p><p>It is possible to have sharding without a beacon chain, but even more effort must be taken to divide resources fairly and prevent large reorganizations and shard takeover attacks.</p><h4>Complexities</h4><p>In a sharded system, the stated goal is that you divide the work among workers and therefore increase throughput. One of the first critical problems is understanding how work is divided. There must be protections taken to ensure that dishonest validators cannot overwhelm a particular shard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*-XDKeP6iFlPN7jk7BD4y8w.png" /><figcaption>Single Shard Takeover Attack. Source: <a href="https://medium.com/u/1b39791caf3f">Hsiao-Wei Wang</a></figcaption></figure><p>Above is a visualization that hints at how even just 1% of the validators could wreak havoc if they were to concentrate on a single shard. Ethereum plans to use a shuffling procedure that assigns validators to shards in an unpredictable manner to prevent a bad actor from taking over a shard.</p><h3>Cross-shard communication</h3><p>What happens on the boundaries of these shards? How do they interact with each other? One obvious answer is that if an application isn’t on my shard, I can make a new account on a different shard, or I may even be able to use a cross sharding service that takes my wallet address on one shard and lets me interact with applications on any other shards.</p><p>Imagine you want to receive a payment from a network participant that is not in the same shard as you. How can you receive money from a shard that you are not participating in?</p><p><strong>Visualized sample approach proposed by Ethereum researchers</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/571/0*BVsD4Xh1e-LgCPVn.png" /><figcaption>Credit: Ethereum Sharding FAQ</figcaption></figure><p>Here, we invoke the idea of receipts. A recipient shows proof that they are to receive coins from a foreign shard, by providing a merkle path to a transaction in the source shard. The destination shard consumes the receipt and credits the recipient’s account. This must be done in an atomic fashion. Either the sender’s and recipient’s accounts are modified together or they are not. If there is a gap or one end fails, the sender could trick the recipient into believing they’ve received funds that they’ll never end up getting.</p><h4>Transactions In Transit</h4><p>Truly atomic transactions across shards are a difficult problem, since it requires validators between shards communicate with each other synchronously. If demand for cross-shard transactions is high enough, performance can degrade as more shard workers must collaborate together to handle cross-shard transactions.</p><p>A sharded system must develop mechanisms for trusting that the network will not reverse these transactions from the foreign shard. How can one protect themselves from large reorganizations that may happen?</p><p>The best answer we have to date is ensure that the number of validators within a shard is above some minimum threshold so that the odds of dishonest validators overwhelming a single shard are low. Regular, but not overly frequent, validator rotation limits the ability for potential bribes of a validator set within a pool. If validator rotations are too frequent, then the cost of running a node will increase, and decentralization will be harmed, since nodes will need more storage and bandwidth to keep up with the shard changes.</p><h4>Finality</h4><p>One feature that simplifies these problems greatly is finality. Once a block is marked final by the economic majority in the system, we can be sure that foreign shards won’t change underneath us. Finality seals the entire ledger so that it cannot be mutated, and prior cross shard transactions can be considered just as secure as if there were just a single chain.</p><p>Proof-of-Stake is able to guarantee finality, while Proof-of-Work never can. This is the reason that Ethereum developers are pairing PoS and Sharding together into their roadmap plans for Eth2.0.</p><h3>Further Reading</h3><p><a href="https://medium.com/nearprotocol/the-authoritative-guide-to-blockchain-sharding-part-1-1b53ed31e060">NEAR’s Authoritative Guide to Blockchain Sharding</a></p><p><a href="https://medium.com/@icebearhww/ethereum-sharding-and-finality-65248951f649">Hsiao-Wei Wang’s Ethereum Sharding: Overview and Finality</a></p><p><a href="https://github.com/ethereum/wiki/wiki/Sharding-FAQ">Ethereum’s Sharding FAQ</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e03aed0c39d1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/scalar-capital/crossing-shards-e03aed0c39d1">Crossing shards</a> was originally published in <a href="https://medium.com/scalar-capital">Scalar Capital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bandwidth and the Blockchain]]></title>
            <link>https://medium.com/scalar-capital/bandwidth-and-the-blockchain-2ad35c57dbdf?source=rss-be762e1cb4c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ad35c57dbdf</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Jordan Clifford]]></dc:creator>
            <pubDate>Wed, 12 Jun 2019 20:10:44 GMT</pubDate>
            <atom:updated>2019-06-12T20:10:44.629Z</atom:updated>
            <content:encoded><![CDATA[<h4>How developers are minimizing overhead</h4><p>Blockchains keep the entire world on the same page. As each block is minted, a new ledger state supersedes prior states. <a href="https://medium.com/scalar-capital/on-consensus-e47920cd8914">Consensus</a> mechanisms work to ensure that the state is agreed on by the wider community. In a well designed system, incentives ensure immutability. After enough time has elapsed, the state can’t be tampered with. These blockchains give us programmable money, and have rightfully captured the imagination of so many.</p><p>Bitcoin and Ethereum are two of the earliest incarnations of blockchains. These ledgers have proven to be popular and robust, yet it is commonly believed that they do not scale. Why would that be? And what can be done to improve the situation?</p><h3>Background</h3><p>Blockchains themselves are referred to as layer 1. The blockchain acts as a global source of truth on the current locations of all cryptoassets within the network. Full nodes on the network keep track of the current state of the ledger. To maintain decentralization or a lack of a power center, it must be possible for small miners to verify and contribute to the blockchain. Small miners may have system resources and bandwidth vastly inferior to larger players.</p><p>In order for blockchains to be trustless and censorship resistant, they cannot be controlled by any single entity or small group. Developers believe it is important to keep participation accessible to players of all sizes to avoid consolidation of power, and the emergence of a single point of control. It is for this reason that there has been such resistance to increasing the <a href="https://medium.com/scalar-capital/understanding-the-block-size-debate-351bdbaaa38">block size limit</a> in bitcoin. The limit acts to throttle the entire system, keeping it widely accessible.</p><p>It should be noted that local agreements can be made between parties to transfer coins without making a global update. This is often referred to as <a href="https://medium.com/scalar-capital/the-lightning-network-cf836329626b">layer 2 or off-chain transactions</a>, and has profound effects on scaling up transactions (not necessarily users). The idea is that transactions can be aggregated between parties before being written to the blockchain. The window for flushing local state to the global blockchain can be several months or even longer in some designs.</p><p>Engineers are optimistic that layer 2 solutions will bring massive scalability to blockchains and will be critical before cryptocurrencies are able to meet the demands of a large userbase. However, even though layer 2 acts as great leverage, it can only amplify the scale of the base blockchain. Layer 2 cannot provide unlimited scale on its own. Therefore, it’s important to optimize the network to use as little resources as possible for each transaction.</p><h3>The problem</h3><blockquote>The decentralized Bitcoin blockchain is globally shared broadcast medium — probably the most insanely inefficient mode of communication ever devised by man.</blockquote><blockquote>- Greg Maxwell</blockquote><p>The basic problem that layer 1 has is that copies of the ledger must stay in sync across the globe. Every full node stores a copy of the blockchain, and those copies must be identical to each other and independently verified by each node.</p><p>When a new block is found, it must be communicated to all other nodes. Latency is especially critical for mining nodes, since they need to be working on top of the most recent block at all times, or their effort is wasted. In order to verify the most recent block, miners need to know which transactions are included as well as have copies of all of these transactions.</p><p>Currently, Bitcoin software uses a naive approach to propagate transactions and blocks. Transactions are forwarded to all peers as they are received. Blocks are transmitted wholesale without regard for pieces of data that the recipient may already have. These inefficiencies are not tolerable for miners who need to make sure they have access to the most recent block.</p><h3>Remedies</h3><p>These inefficiencies within Bitcoin are well known. Efforts to make the network more efficient in terms of reducing bandwidth overhead as well as speeding up propagation have been ongoing for years. Former Bitcoin maintainer, Gavin Andresen, published a roadmap for <a href="https://gist.github.com/gavinandresen/e20c3b5a1d4b97f79ac2">O(1) block propagation</a> back in 2014. The roadmap has been significantly altered since, but the ideas are still relevant.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VmPNjHZFLVP8nymbMSBb6A.png" /><figcaption>Visualization of the FIBRE network. Credit: <a href="http://bitcoinfibre.org/public-network.html">bitcoinfibre.org</a></figcaption></figure><h4>Relay Networks</h4><p>Miners have taken initiative upon themselves to implement block relay networks such as <a href="http://bitcoinfibre.org/">FIBRE</a> and <a href="https://www.falcon-net.org/">Falcon</a>. These relay networks work by using low latency + high bandwidth connections, but they have drawbacks such as being centralized and using significant amount of bandwidth in an effort to minimize latency. They do not reduce overall bandwidth demands of running a non-mining node, which is needed before engineers will feel comfortable to scale up the system.</p><h4>Compact Blocks</h4><p>When it’s time to transmit a block, it’s suboptimal to transmit transactions that the recipient already has. Cryptographer <a href="https://github.com/gmaxwell">Greg Maxwell</a> recognized that recipients already know much of what’s included in a newly found block. Concretely, the recipients’ mempool (set of received, but unconfirmed transactions) likely contains many of the transactions that are within the new block. He studied this problem and drafted a <a href="https://people.xiph.org/~greg/efficient.block.xfer.txt">proposal</a> in December 2015.</p><p>Core developer <a href="https://github.com/TheBlueMatt">Matt Corallo</a> took Greg’s work and polished it up and it became <a href="https://github.com/bitcoin/bips/blob/master/bip-0152.mediawiki">BIP152</a> specifying Compact Blocks in early 2016. <a href="https://bitcoincore.org/en/2016/06/07/compact-blocks-faq/">Compact blocks</a> is a protocol that sends the block header, a list of shortened transaction IDs, and a set of transactions that the sender believes the recipient is unlikely to have rather than sending a block with all of its data. This change was meant to save on bandwidth, but has the nice side effect of reducing latency as well.</p><h4>Erlay</h4><p>The flood broadcasting based approach within Bitcoin is clearly not optimal for disseminating transactions within the network. A node can receive multiple copies of each transaction and must forward them to each peer they are connected to. This results in large amounts of bandwidth consumed resulting in unneeded overhead. It also encourages nodes to connect to fewer peers since each peer will require incremental bandwidth per transaction.</p><p>Connecting to fewer peers does limit bandwidth consumption, but it can be dangerous, as it opens the user up to what’s known as an eclipse attack. <a href="https://twitter.com/Ethan_Heilman">Ethan Heilman</a>, creator of <a href="https://medium.com/scalar-capital/tumblebit-96b346f2e86b">TumbleBit</a>, published a <a href="https://eprint.iacr.org/2015/263.pdf">research paper</a> on the eclipse attack in 2015. The basic idea is related to a Sybil attack. An attacker pretends to be many different entities in an effort to confuse the victim. The attacker monopolizes all outgoing connections to the victim’s node. By acting as the victim’s sole source of information, they mine special blocks to falsify the current state. It’s costly, but if the attacker can get the victim to believe that they have received a large sum of bitcoin, when in fact the funds have been moved elsewhere, the victim could be persuaded that they have received funds and release property.</p><p>Erlay results in a more well connected and robust network. If a node were to connect to 32 peers, Erlay researchers find that their optimizations would result in the node using 75% less bandwidth than they would with current software.</p><h3>What’s next?</h3><p>Block propagation has been heavily optimized with the relay networks that the miners use and compact blocks for ordinary node users. Still, researchers are working to remove overhead from the system to make it as streamlined as possible. Only once developers are satisfied that bandwidth requirements are as low as possible for the current amount of throughput, will increasing throughput be on the table.</p><h3>Further Resources</h3><ul><li>Greg Maxwell’s <a href="https://www.youtube.com/watch?v=EHIuuKCm53o">2017 talk on advances in block propagation</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ad35c57dbdf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/scalar-capital/bandwidth-and-the-blockchain-2ad35c57dbdf">Bandwidth and the Blockchain</a> was originally published in <a href="https://medium.com/scalar-capital">Scalar Capital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TumbleBit]]></title>
            <link>https://medium.com/scalar-capital/tumblebit-96b346f2e86b?source=rss-be762e1cb4c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/96b346f2e86b</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[cryptography]]></category>
            <dc:creator><![CDATA[Jordan Clifford]]></dc:creator>
            <pubDate>Tue, 28 May 2019 16:56:05 GMT</pubDate>
            <atom:updated>2019-05-29T15:32:27.183Z</atom:updated>
            <content:encoded><![CDATA[<h4>A new kind of mixing service on Bitcoin</h4><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*oGpAl2AQ8hBx-3L2Q7k8Lg.png" /><figcaption>TumbleBit Logo. Credit: <a href="https://cs-people.bu.edu/heilman/tumblebit/">Ethan Heilman</a></figcaption></figure><p>Fungibility is a key property that we demand from our currency. I’ve written on the relationship between <a href="https://hackernoon.com/privacy-on-the-blockchain-7549b50160ec">privacy and fungibility</a> before, and believe that it’s critical to get this right to lay the foundation for the future financial system. The developer community has continued to impress with the innovations and potential solutions that they propose.</p><h3>Background</h3><p>Currencies like Zcash and Monero have taken major steps forward to improve privacy. However, Bitcoin remains the most popular cryptocurrency with the largest network effect, most adoption and liquidity, and it has the widest audience that could benefit from improved privacy. Despite Bitcoin’s serious privacy weaknesses, its network effect is too large to ignore. Many developers believe that an anonymity service within Bitcoin would have more impact than launching a new cryptocurrency network.</p><p>Ordinary bitcoin transactions leave a very easy to trace transaction graph, revealing information about the sender, recipient, their relationship to each other, as well as potentially hinting at sensitive information about each of them including their spending habits, income and net worth. Obfuscating this transaction graph by mixing transactions together has been the goal of many developers concerned with privacy who wish to create plausible deniability by breaking the clear link between sender and recipient.</p><p><a href="https://github.com/gmaxwell">Greg Maxwell</a>, former CTO of Blockstream and prolific cryptographic contributor, first proposed <a href="https://bitcointalk.org/index.php?topic=279249.0">CoinJoin</a> as a privacy enhancement for Bitcoin in 2013. The idea is simple, combine many transactions from many users such that which inputs lead to which outputs becomes more ambiguous. It has a few weaknesses such as needing coordination between users wishing to mix. CoinJoin users initially used IRC channels or central servers to find mixing partners. CoinShuffle improves on CoinJoin by introducing a p2p network for finding mixing partners. CoinJoin also has potential Denial of Service attacks. If a mixing partner doesn’t sign their transaction, coins can be held in limbo.</p><p>Other mixers, <a href="https://eprint.iacr.org/2014/077.pdf">Mixcoin</a> and <a href="https://fc15.ifca.ai/preproceedings/bitcoin/paper_3.pdf">Blindcoin</a>, use trusted third parties to combine transactions. Users deposit their funds with the third party which would then combine coins into a single pool before forwarding them to the intended recipient. Requiring a trusted third party is not ideal, but these protocols introduced allow users to prove if a mixer misbehaves, acting as a deterrent for bad behavior.</p><h3>TumbleBit</h3><p>TumbleBit builds on plenty of prior art, and is interesting as both a scalability and privacy improvement to Bitcoin. It was first proposed by researchers from three universities in a <a href="https://eprint.iacr.org/2016/575.pdf">2016 paper</a>, and offers many advantages over other mixing strategies. The paper’s primary author, <a href="https://twitter.com/ethan_heilman">Ethan Heilman</a>, says the approach is inspired by <a href="https://www.chaum.com/">David Chaum</a>’s seminal 1982 paper, <a href="http://www.hit.bme.hu/~buttyan/courses/BMEVIHIM219/2009/Chaum.BlindSigForPayment.1982.PDF">Blind Signatures for Untraceable Payments</a>.</p><p>TumbleBit removes the need for mixing partners to coordinate with each other. Rather they can each act independently with the TumbleBit hub within a particular time window, known as an epoch. Epochs can last up to 24 hours. TumbleBit requires a central server, however the server has extremely limited power and no control over funds. The server is not able to de-anonymize transactions. It has no knowledge of the true transaction graph, since it is unable to distinguish between many possible transaction graphs.</p><h4>How it works</h4><p>Alice wants to pay Bob without being tracked by observers or the TumbleBit service itself. The crux of the idea is to create a service that solves cryptographic puzzles for bitcoin. These are known as RSA puzzles, and they are as difficult as cracking a RSA public key to retrieve the corresponding private key. This is currently infeasible which is why RSA cryptography is trusted. Further, the puzzles use RSA blinding which prevents it from linking the solution to a particular puzzle. It only knows that it solves one of the puzzles it issued, not which puzzle.</p><p>Alice, the payer, puts bitcoin in a payment channel with the TumbleBit hub. The hub gets paid upon the presentation of a solution to her cryptographic puzzle. This arrangement is dubbed the Puzzle-Solver Protocol. The protocol enforces that the server cannot collect until it presents a solution, and if it does present a solution Alice must pay.</p><p>On the other end, Bob, the payee, has entered a related agreement with the hub. The tumbler agrees to pay Bob upon the presentation of a solution to the RSA puzzle. This is known as the Puzzle-Promise Protocol.</p><p>By using blinding properties of RSA puzzles along with sufficient decoy puzzles, we’re able to break the link between the puzzle solver and the puzzle creator. Thanks to the properties of RSA encryption, the TumbleBit server knows the solution is valid, but it’s not able to determine exactly which puzzle it is solving, effectively obfuscating the relationship between payer and payee.</p><p>During the epoch, the protocol works well when many parties will engage with the service, after which it aggregates all transactions into a single transaction that redeems balances to the payees. TumbleBit requires that the transaction amounts are equal to prevent tracing analysis based on the amounts.</p><p>It’s worth noting that RSA cryptography does require two very large primes, which is considered a trusted setup and may be an issue for the most paranoid.</p><h3>What next?</h3><p>TumbleBit is a service that can be built on top of the existing Bitcoin network and doesn’t require changes to Bitcoin itself. This is great news as getting changes merged into Bitcoin has been historically challenging and isn’t likely to get easier.</p><p>Unfortunately, while the TumbleBit concept is innovative and useful, progress has been rather slow. The authors have released a proof of concept, <a href="https://github.com/BUSEC/TumbleBit">BUSEC/TumbleBit</a>, written in Python. The proof of concept has been used to mix <a href="https://www.blockchain.com/btc/tx/fd51bd844202ef050f1fbe0563e3babd2df3c3694b61af39ac811ad14f52b233">800 inputs</a>.</p><p>Slow progress is underway on a .NET production version, <a href="https://github.com/NTumbleBit/NTumbleBit">NTumbleBit</a>. The furthest along effort comes from a company called Stratis that has released a wallet called <a href="https://stratisplatform.com/2018/08/01/breeze-with-privacy-protocol-mainnet-release/">Breeze</a> with the TumbleBit protocol integrated. However development updates have not occurred since August 2018.</p><p>It will be up to the community to decide if the advantages TumbleBit offer are worth pursuing, or whether alternative approaches such as <a href="https://medium.com/scalar-capital/schnorr-signatures-754038368b87?sk=047f172d266ab1a568576c0e3abfcef7">Schnorr Signature</a> aggregation are more promising low hanging fruit.</p><h4>Further References</h4><ul><li>Ethan Heilman and Leen AlShenibr <a href="https://www.youtube.com/watch?v=iGVSnxz1mn8">2016 Scaling Bitcoin presentation</a></li><li>Nopara73’s <a href="https://hackernoon.com/understanding-tumblebit-part-1-making-the-case-823d786113f3">Understanding TumbleBit series</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96b346f2e86b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/scalar-capital/tumblebit-96b346f2e86b">TumbleBit</a> was originally published in <a href="https://medium.com/scalar-capital">Scalar Capital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bitcoin’s Taproot]]></title>
            <link>https://medium.com/scalar-capital/bitcoins-taproot-d61f11f247aa?source=rss-be762e1cb4c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/d61f11f247aa</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Jordan Clifford]]></dc:creator>
            <pubDate>Tue, 14 May 2019 19:31:14 GMT</pubDate>
            <atom:updated>2019-05-14T19:31:14.930Z</atom:updated>
            <content:encoded><![CDATA[<h4>Getting more from less</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1h903OjPu8dHx_2C.jpg" /><figcaption>A plant with a taproot root system. Photo credit: <a href="https://bitcoin.nl/">https://bitcoin.nl/</a></figcaption></figure><p>In early May 2019, <a href="https://twitter.com/pwuille?lang=en">Pieter Wuille</a>, a prolific Bitcoin Core contributor from Blockstream, quietly introduced a pair of BIPs (Bitcoin Improvement Proposals) that describe a new address scheme called <a href="https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-January/015614.html">Taproot</a>. The proposals build on the <a href="https://medium.com/scalar-capital/schnorr-signatures-754038368b87?sk=047f172d266ab1a568576c0e3abfcef7">Schnorr signature</a> and <a href="https://medium.com/scalar-capital/scriptless-scripts-25e18fd52ede">Scriptless Scripts</a> work that I discussed in prior posts and provide the required implementation details for them to become a reality. This unlocks many interesting possibilities for developers and marks an important step forward for Bitcoin.</p><p>Taproot not only allows the benefits from the prior concepts: enabling compact multisig and scriptless smart contracts, it goes one step further and <strong>allows an additional backup script to be specified and revealed only if needed</strong>. This backup script does not consume more space on the blockchain and is not even detectable unless it is needed. These techniques promise to be a boon for privacy, scalability, and flexibility.</p><h3>Background</h3><p>Bitcoin is the first and in many ways the simplest cryptocurrency out there. This is often thought of as a weakness since it’s harder to implement more complex ideas within Bitcoin. However, it can also be seen as a strength as the system is simpler and simple avoids many kinds of bugs. Plus, there are many efforts to introduce important building blocks for developers such as Taproot and the technologies it enables.</p><h4>UTXOs</h4><p>Bitcoin’s scripting language is deliberately limited, and each currently unspent bitcoin is tracked separately within an unspent transaction output or UTXO. UTXOs are bound to spending conditions that existed when the UTXO was created. UTXOs are stateless, so it’s not obvious how to implement many kinds of smart contracts. In Bitcoin, common spending conditions for a UTXO are a transaction signature by single key.</p><h4>MAST (Merkilized Abstract Syntax Trees)</h4><p>Bitcoin currently has the ability to encode complex logic to handle various spending conditions. This functionality is called Pay to script hash (P2SH). P2SH requires the recipient to create a script, compute a cryptographic hash of the script, and then commit that it by creating an address. To spend payments to the address, the recipient later must reveal the script that when hashed equals the original hash included in the address, as well any needed inputs to satisfy the script.</p><p>P2SH works well, but has a rather major downside that the entire script must be revealed when it comes time to spend funds. This is suboptimal for both privacy as well as scalability reasons. <a href="https://bitcointechtalk.com/what-is-a-bitcoin-merklized-abstract-syntax-tree-mast-33fdf2da5e2f">MAST</a>, which was originally proposed in a <a href="http://www.mit.edu/~jlrubin/public/pdfs/858report.pdf">2014 paper from MIT</a>, uses the power of Merkle trees to allow us to reveal only the branches needed to prove the script is satisfied. This approach means unused branches are never publicly revealed. Much larger and more complex scripts with many spending conditions can now be implemented efficiently, without revealing all possible spending conditions.</p><h4>Schnorr &amp; Scriptless Scripts</h4><p>Schnorr signatures allow multiple signers to combine their keys together to a form multisignature key which creates an address. This multisignature key is then used on the blockchain, but is indistinguishable to others from a single key.</p><p><a href="https://github.com/apoelstra">Andrew Poelstra</a> showed us how we can use these multisignature keys to create a special kind of smart contract where computation does not happen on the blockchain. Rather, parties must come to the conclusion on their own and only then publish the result to the blockchain where it is verified.</p><h3>Taproot</h3><p>The Taproot proposal offers a spec for how Schnorr signatures can be used within SegWit (Segregated Witnesses) addresses. This ability to add new signature schemes was one of the main drivers for pursuing SegWit in the first place.</p><p>In addition to offering a concrete specification allowing us to use MAST and Schnorr, Taproot uses a cryptographic technique to combine both into a single address. It’s possible to take the public key of a Schnorr address and ‘tweak’ it with a script. These addresses do not look different than ordinary Schnorr addresses. The fact that there’s a hidden script inside is not knowable unless it is needed.</p><p>To illustrate one simple potential use case. Imagine Alice wants to give Bob a long term gift. Bob is not to spend the coins for at least 5 years. Alice can deposit to a Taproot address where the spending conditions are either Alice + Bob’s multisig (everyone agrees case), but she also includes a hidden backup script that specifies the actual spending conditions (CheckSequenceVerify for 5 years + Bob’s signature). Once 5 years go by, Alice + Bob can sign together for a very efficient, compact and privacy preserving transaction. Nobody would be able to tell the underlying conditions or even who was involved in spending it. However, if Alice is not available or decides not to cooperate down the line, Bob can claim the money by revealing the script, which would result in a larger transaction that does reveal the spending conditions.</p><p>With a single address type, you can pay with either the public key or the hidden script. If the public key is a multisig, then the signature is indistinguishable from a signature from a single key. It’s expected that this will often represent the “everyone agrees” case.</p><p>Taproot is a natural progression of the idea that the blockchain should only be an arbiter of disputes, and computation should largely not take place on the blockchain itself. Rather, computation on the blockchain should be seen as a last resort measure and only utilized upon disagreement.</p><h3>What’s next?</h3><p>Incorporating Bitcoin consensus changes has historically been challenging, but these proposals should be less controversial than many others. As a soft-fork, they do not affect current nodes’ ability to validate the blockchain without upgrading. Miners will need to upgrade to ensure that the chain does not fork. Also in Taproot’s favor, is that these features are purely optional from the users’ perspective. If a user does not want to utilize this functionality they are not forced to.</p><p>We should expect a several month review period where cryptographers and developers provide feedback on the proposals. Then we will likely see several months of developer work and integration into Bitcoin’s testnet. If all goes well, this functionality may hit Bitcoin’s mainnet sometime in late 2020 or 2021.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d61f11f247aa" width="1" height="1" alt=""><hr><p><a href="https://medium.com/scalar-capital/bitcoins-taproot-d61f11f247aa">Bitcoin’s Taproot</a> was originally published in <a href="https://medium.com/scalar-capital">Scalar Capital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scriptless Scripts]]></title>
            <link>https://medium.com/scalar-capital/scriptless-scripts-25e18fd52ede?source=rss-be762e1cb4c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/25e18fd52ede</guid>
            <category><![CDATA[money]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Jordan Clifford]]></dc:creator>
            <pubDate>Tue, 23 Apr 2019 18:47:51 GMT</pubDate>
            <atom:updated>2019-04-23T18:47:51.392Z</atom:updated>
            <content:encoded><![CDATA[<h4>A different kind of smart contract</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*y7EMH7QfUu4Te84g.jpeg" /><figcaption>Photo credit: cryptoradar.com.br</figcaption></figure><p>In a recent post, I discussed <a href="https://medium.com/scalar-capital/schnorr-signatures-754038368b87?sk=047f172d266ab1a568576c0e3abfcef7">Schnorr signatures</a>. Schnorr signatures represent a new way to sign and verify transactions that have some surprisingly powerful properties. Schnorr signatures are smaller than ECDSA and can be combined, known as signature aggregation. This allows multiple inputs to share a signature resulting in gains in privacy and scalability.</p><p>Exploring the mathematical properties of Schnorr signatures further, Andrew Poelstra from Blockstream, found that the signatures themselves could be constructed and modified in special ways to enforce various agreements between parties. Spending conditions are introduced, yet completely hidden from the blockchain. Only the involved parties know of the terms of the contract or that a contract even exists. To the rest of the world, the transactions look completely ordinary and indistinguishable from a normal spend. Poelstra dubbed this new methodology “Scriptless Scripts.”</p><h3>Background</h3><p>One of the most exciting things about cryptocurrencies is their ability to remove intermediaries from all kinds of transactions. In the traditional world, brokers, banks, insurance, trust, and title companies all act to provide trust to transactions. If two parties don’t trust each other, then the intermediary gets involved as a trusted third party. These third parties take a cut of the transaction and introduce a potential point of failure.</p><h3>Scripts</h3><p>A blockchain can replace intermediaries and act as a trust anchor for parties wishing to transact. Assets can be held and transferred according to programmable logic that the network evaluates. This logic is called a script, defined as “an automated series of instructions carried out in a specific order.” Bitcoin has a scripting language based on an old programming language called Forth, while Ethereum has Solidity which compiles to Ethereum Virtual Machine (EVM) code.</p><p>Currently, smart contracts need the entire network to obtain and execute the encoded logic. Having everyone execute the script is simple and easy to understand. However, it is less efficient than pushing execution off the blockchain to the interested parties. It is also fundamentally less private since the logic itself is made public. Executing smart contract logic off-chain is precisely the goal of many approaches including Plasma, Lightning, and scriptless scripts.</p><p>Note: In Bitcoin, there is work being done to conceal branches of the contract that turn out to be irrelevant to the final result such as <a href="https://bitcointechtalk.com/what-is-a-bitcoin-merklized-abstract-syntax-tree-mast-33fdf2da5e2f">MAST</a> (Merkelized Abstract Syntax Trees).</p><h3>Scriptless Scripts</h3><p>Scriptless scripts was born out of necessity when Poelstra was investigating <a href="https://medium.com/scalar-capital/behind-mimblewimble-cd9da78a00e9">MimbleWimble</a>. MimbleWimble is such a constrained platform that it does not support scripts at all. The entire blockchain functions only on signatures and commitments that represent spendable coins. Without scripts, Poelstra wanted to find a way to introduce rudimentary smart contract functionality.</p><p>To have smart contracts using only signatures, we take advantage of signature aggregation within Schnorr. Aggregation is a property we get from Schnorr signatures because they are linear. This means they can be added and subtracted and the result is a valid signature corresponding to the same addition or subtraction of the public keys. This is not the case with the ECDSA signatures that Bitcoin currently uses. With ECDSA, adding and subtracting signatures results in gibberish.</p><p>To visualize what’s happening in Schnorr, consider the following (simplified) example:</p><p>pubkey1 + pubkey2 + pubkey3 = pubkeyY</p><p>signature1 + signature2 + signature3 = signatureY</p><p>We attach bitcoin to pubkey Y, which is not a key anyone has access to, but really the summation of pubkeys 1,2, and 3. Signatures from each of the keys 1,2, and 3 can be summed to create a signature for pubkey Y, and the blockchain won’t be any wiser that there was actually three keys involved in creating the signature. It will look just like an ordinary signature from pubkey Y, but the network accepts it as authorizing the spend.</p><p>In order to implement smart contracts in this scriptless world, the spending conditions are not enforced by the blockchain, but rather enforced by the parties themselves. Only once the parties within the contract agree that the conditions have been met will they collaborate and sign the finalizing transaction. To the blockchain, it looks like an ordinary signature and only the participants know what’s going on.</p><h4>Adaptor Signatures</h4><p>One simple but powerful application of these ideas is to create a cross chain atomic swap. This can be done with adaptor signatures which allow for the trustless exchange of assets. An adaptor signature is a signature offset by a value that once combined with the true signature, allows the recipient to compute the sender’s private key. The adaptor signature can be verified as authentic but does not reveal anything until the true signature is published. These adaptor signatures allow us to achieve atomicity in cross chain atomic swaps. The holder of the adaptor signature can rest assured they will be able to claim their coins if their counterparty claims their coins.</p><p>The (simplified) process goes like this. Alice and Bob want to swap coins. First Alice and Bob both deposit coins into 2-of-2 addresses with Alice and Bob as signers. Alice uses an ephemeral or one time private key because she will be providing it to Bob as part of the process. Alice provides Bob an adaptor signature which Bob finds convincing. Bob knows that when Alice publishes her signature claiming her coins, he will know enough information to compute her private key and retrieve his coins. So Bob signs a transaction releasing Alice’s coins. Alice signs her half and broadcasts the transaction to receive her coins. This allows Bob to compute her key and sign a transaction to claim his coins.</p><h3>Benefits</h3><p>Scriptless scripts scale better than standard smart contracts because the enforcement and execution of the terms of the contract happen off chain. By pushing this execution to the people that care about it, communal computing resources are spared the burden of storing contract data and executing terms and conditions.</p><p>Privacy is also improved by having the terms of the contract hidden from the public. The terms are known only by the parties within the contract, and what’s visible is indistinguishable from other coins and transactions. This gives us a property known as deniability which means that the transactions are indistinguishable from ordinary transactions to a neutral observer.</p><h3>Further Resources</h3><p>Andrew Poelstra: <a href="https://youtu.be/3pd6xHjLbhs?t=5759">Scaling Bitcoin Talk 2017</a>, <a href="https://youtu.be/ovCBT1gyk9c">Real World Crypto Talk 2018</a></p><p>TariLabs: <a href="https://tlu.tarilabs.com/cryptography/scriptless-scripts/introduction-to-scriptless-scripts.html">Introduction to Scriptless Scripts</a></p><p>Spencer Bogart: <a href="https://medium.com/blockchain-capital-blog/crypto-innovation-spotlight-2-scriptless-scripts-306c4eb6b3a8">Crypto Innovation Spotlight 2: Scriptless Scripts</a></p><p>Aaron Van Wirdum: <a href="https://bitcoinmagazine.com/articles/scriptless-scripts-how-bitcoin-can-support-smart-contracts-without-smart-contracts/">Scriptless Scripts: How Bitcoin Can Support Smart Contracts Without Smart Contracts</a></p><p>Adam Gibson: <a href="https://joinmarket.me/blog/blog/flipping-the-scriptless-script-on-schnorr/">Flipping the scriptless script on Schnorr</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25e18fd52ede" width="1" height="1" alt=""><hr><p><a href="https://medium.com/scalar-capital/scriptless-scripts-25e18fd52ede">Scriptless Scripts</a> was originally published in <a href="https://medium.com/scalar-capital">Scalar Capital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Schnorr Signatures]]></title>
            <link>https://medium.com/scalar-capital/schnorr-signatures-754038368b87?source=rss-be762e1cb4c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/754038368b87</guid>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Jordan Clifford]]></dc:creator>
            <pubDate>Wed, 03 Apr 2019 16:26:04 GMT</pubDate>
            <atom:updated>2019-04-03T16:26:04.538Z</atom:updated>
            <content:encoded><![CDATA[<h4>Improving Bitcoin’s privacy and scalability</h4><p>Back in September 2013, an anonymous author wrote a bitcointalk.org <a href="https://bitcointalk.org/index.php?topic=290971.0">post</a> suggesting there may be ways to improve privacy and scalability by aggregating or combining signatures. Multiple inputs can share a signature authorizing the collective movement of the coins. In doing so, people have an economic incentive to combine transactions which results in less precious blockchain space and more ambiguity as to the payer and payee within a transaction, improving privacy.</p><p>Since then, the Bitcoin developer community has been abuzz with this idea and a relatively obscure method of cryptographic signatures has been thrust to the forefront of this movement. The method is known as Schnorr Signatures. They were created by cryptographer Claus Schnorr, and first released to the public in a <a href="https://www.semanticscholar.org/paper/Efficient-Identification-and-Signatures-for-Smart-Schnorr/8d69c06d48b618a090dd19185aea7a13def894a5#paper-header">1989 paper</a>. It’s unknown whether Satoshi considered this method for signatures, but it likely wouldn’t have mattered as Schnorr held a patent on this method until 2008.</p><h3>Background</h3><p>Each block within the Bitcoin blockchain contains one or more transactions. Transactions are composed of a list of existing inputs which are to be consumed, a list of outputs to be created, and proof that the owners of the inputs approve of the transaction which will transfer their bitcoins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/0*ofRzkdMLZpkSyV6k.png" /><figcaption>credit: Satoshi Nakamoto</figcaption></figure><p>In Bitcoin, the majority of inputs need a cryptographic proof in the form of a digital signature to be spent. It’s possible to have many different types of spending criteria that must be satisfied, including no criteria at all, which are known as anyone-can-spend outputs.</p><h3><strong>Quick intro to digital signatures</strong></h3><p>The most popular signature algorithms in use today are Rivest–Shamir–Adleman (RSA) and Digital Signature Algorithm (DSA). RSA was built for both encryption and signatures, while DSA was originally built only for signatures, but has since been adapted to support encryption as well. The two algorithms rely on different <a href="https://crypto.stanford.edu/pbc/notes/crypto/factoring.html">cryptographic assumptions</a>: RSA relies on factoring being hard, while DSA relies on the discrete log problem being hard.</p><p>Both techniques require public and private key pairs. The private key is needed to sign the message while the public key is used to verify the signature. Keys are technically very large numbers that we use to conduct discrete math. The set of numbers that are possible values in these computations are known as a field or group.</p><p>Currently, Bitcoin uses Elliptic Curve Digital Signature Algorithm (ECDSA), a modification of the Digital Signature Algorithm (DSA) to work on elliptic curves. The curve defines the mathematical group used for computations, which dictates the key format and the set of values the cryptography operates on. The advantages of ECDSA is that thanks to the efficiencies of elliptic curve cryptography, you can achieve the same security as RSA with smaller key sizes. This has made ECDSA an astute choice for Bitcoin since smaller keys make for a smaller footprint overall for the system, resulting in less data and faster operation.</p><h3><strong>Schnorr Signatures</strong></h3><p>Schnorr signatures can be adapted to any mathematical group that satisfies the discrete log problem. Luckily the elliptic curve in Bitcoin, secp256k1, fits this property. This means that the same private and public keys can be used with Schnorr signatures in Bitcoin. Schnorr signatures have many advantages over ECDSA signatures:</p><ol><li>Schnorr signatures are smaller. Most ECDSA signatures are 71 or 72 bytes. All Schnorr signatures will be 64 bytes.</li><li>They allow for more compact multisig. Current m-of-n signature schemes in Bitcoin require the presentation and verification of m signatures. Schnorr multisig needs just one signature to account for all m parties.</li><li>Signature aggregation across inputs! Not only can we condense a multisig input’s signatures into a single signature, we can aggregate signatures from multiple inputs into a single signature. When combined with <a href="https://en.bitcoin.it/wiki/CoinJoin">CoinJoin</a>, this can make transactions cheaper and more private. Even without CoinJoin, this can greatly reduce the size and cost of a transaction. Pieter Wuille, the primary engineer behind bringing Schnorr signatures to Bitcoin, estimates that just by having users aggregate signatures across inputs, the Bitcoin blockchain could shrink by 25–30%.</li><li>Scriptless Scripts! By using Schnorr signatures in clever ways that are well beyond the scope of this post, we can actually implement different spending conditions just by using a special process to create the required signatures. Scriptless scripts exploit the linear nature of Schnorr signatures so that partial signatures must be combined in specific ways to satisfy the spending criteria. Blockstream’s Andrew Poelstra has done some great research into the possibilities <a href="https://download.wpsoftware.net/bitcoin/wizardry/mw-slides/2017-03-mit-bitcoin-expo/slides.pdf">here</a>.</li><li>Schnorr Signatures are provably immalleable. ECDSA signatures can be changed without having access to the private key that created them. This was a big problem for Bitcoin when the signatures were included in generating the transaction id. <a href="https://bitcoincore.org/en/2016/01/26/segwit-benefits/">Segregated Witness</a> made this less of an issue by splitting out the signatures (also known as witnesses), but it is still nice to have consistent signatures.</li></ol><h3>Any downsides?</h3><p>Schnorr signatures accentuate a weakness that already exists with the current ECDSA system. These signature schemes utilize a nonce, a value intended to be used only once, that must be selected at random or at least be unpredictable or an attacker can reverse engineer the private keys. This famously <a href="https://www.bbc.com/news/technology-12116051">happened to Sony </a>in 2011 when the ECDSA scheme used on the PS3 was revealed to not choose this nonce randomly at all. The result was a group publishing Sony’s private keys allowing users to install their own OS and/or pirate PS3 games.</p><p>With ECDSA, the nonce can be deterministic based on what is being signed since there is no signature aggregation. This is what Bitcoin does without issue. However, when aggregation is introduced, we will need a real source of random entropy in order to create signatures. The problem is that with multiple parties joining to create signatures, malicious parties can start the request for two multisignatures with the same nonce and the same inputs. They would abort the requests before completion, but may have created just the right conditions to reverse engineer a victim’s private key.</p><h3>What’s next?</h3><p>One obstacle to Schnorr signatures being implemented is that they are not yet standardized. Bitcoin Core developers, led by Pieter Wuille, have a <a href="https://github.com/sipa/bips/blob/bip-schnorr/bip-schnorr.mediawiki">draft proposal</a> offering a standardization for the implementation of single signatures. The draft is currently being peer reviewed by the Bitcoin community.</p><p>Signature aggregation is another layer of complexity due to possible attacks with crafted nonces. Blockstream has been doing some fascinating work on this problem and their proposed solution has been dubbed <a href="https://blockstream.com/2019/02/18/en-musig-a-new-multisignature-standard/">MuSig</a>. MuSig currently solves the problem by adding more rounds to the signature creation process to ensure that nobody is able to harm others by manipulating the nonce selection. Currently the MuSig protocol requires three rounds of coordination with the co-signers. The first round requires everybody produce unique input that will be hashed together to ensure that the same nonce is never used to sign the same message.</p><p>There is ongoing research into optimizing signature aggregation. Blockstream’s hope is that they will be able to reduce the rounds of communication from three to two by utilizing zero knowledge proofs to ensure proper entropy. It seems unlikely that Schnorr signatures will enter Bitcoin this year, but they are well on their way and with any luck we can hope to see them introduced around the next block reward halving in 2020.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=754038368b87" width="1" height="1" alt=""><hr><p><a href="https://medium.com/scalar-capital/schnorr-signatures-754038368b87">Schnorr Signatures</a> was originally published in <a href="https://medium.com/scalar-capital">Scalar Capital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Privacy surrounding the Blockchain]]></title>
            <link>https://medium.com/scalar-capital/privacy-surrounding-the-blockchain-7b92a6deea62?source=rss-be762e1cb4c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b92a6deea62</guid>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Jordan Clifford]]></dc:creator>
            <pubDate>Tue, 26 Mar 2019 16:04:06 GMT</pubDate>
            <atom:updated>2019-03-26T16:24:22.562Z</atom:updated>
            <content:encoded><![CDATA[<h4>The Network Layer</h4><h3>Background</h3><p>In an earlier <a href="https://hackernoon.com/privacy-on-the-blockchain-7549b50160ec">post</a>, I discussed what it means to have privacy on the blockchain. Obscuring the sender, recipient and the amounts on the chain with cryptography go a long way in providing much needed privacy to the users.</p><p>The blockchain is a very public and permanent record of transactions and events. It is important to make sure that sensitive or revealing information is not stored on the blockchain. It’s better to only store pseudonymous information, and best is to store only anonymous information that cannot be traced back to the user. This is a well studied problem, and cryptocurrencies like Monero, Zcash and Grin aim to preserve user privacy at the blockchain layer.</p><p>What’s not as obvious however, is what information exists and is transmitted before the transactions are etched into the blockchain forever. The network layer can reduce privacy substantially if precautions are not taken. Information comes in many forms and is necessarily transmitted between computers before it reaches the blockchain. This information may include signed or unsigned transactions, unmixed transactions, transaction metadata, requests for payment, requests for balance information, along with many other types of data that are inherent in blockchain protocols.</p><h3>Potential Observers</h3><p>To have privacy is to have control over who has access to the data or information we wish to protect. Real privacy is a difficult undertaking as user action is potentially observable at several places.</p><h4>Client</h4><p>The client is the origination for your network traffic. The client is a device that has an IP address associated with it so that it may communicate with other devices on the internet. Association of your activity with your IP address reduces your anonymity set to a relatively small collection of possible users, and could even identify you as an individual if it is not a shared IP address.</p><p>Safeguarding your client devices requires knowing your device’s origins and avoiding the installation of malware or any software that may contain viruses or backdoors. Brand new devices or devices that are from a trusted source and wiped clean are your best bet.</p><h4>Server</h4><p>The server is the destination for communication. Blockchains are usually operated as peer-to-peer networks, and there are no true servers in these networks. Nevertheless, the client on the other end may be thought of as a server since it is the counterparty for all protocol communication.</p><p>Servers have access to all data communicated to it, so it is important to design protocols so that servers have only necessary information and nothing extra. Sensitive information is ideally never communicated or needed when utilizing functionality of a cryptoasset. The administrator of the server may be logging all kinds of information, so it is best if they know little or nothing about you to limit their ability to tie your activity to your identity, compromising your privacy.</p><h4>Network</h4><p>Many people think of the internet as one large network. This is subtly misleading, as the internet is really a vast collection of networks that are all linked together via routers at peering exchanges. Your computer’s communication will hop through many networks on the way to the destination and the administrators and operators of each one will get a chance to observe your activity.</p><p>The client and the server are each likely a part of a Local Area Network or LAN. From the LAN they connect to an Internet Service Provider or ISP. The ISP will typically have peering relationships with other ISPs and traffic may flow through several ISPs, each getting a chance to profile the activity.</p><h3>Protecting content with encryption</h3><p>One of the most powerful precautions for protecting sensitive data is to encrypt it. Encryption takes what’s known as plain text data along with a key and uses it to create ciphertext. Ciphertext can only be reversed to the plain text with access to the intended key. The key used to encrypt may be the same as the key used to decrypt. This is known as symmetric encryption. The alternative is to have separate public and private keys. The public key is used to encrypt data and the private key reverses the encryption. This is more expensive computationally, but has the advantage that a key does not need to be shared.</p><p>Many forms of encryption are available but the most common standard today is known as Transport Layer Security or TLS. TLS has superseded SSL or Secure Socket Layer which is now deprecated. The latest version is TLS 1.3 and includes many security improvements, garnering <a href="https://www.eff.org/deeplinks/2019/02/ets-isnt-tls-and-you-shouldnt-use-it">praise from the EFF</a>. The main advantage of TLS is a number of vulnerability fixes as well as support for forward secrecy. One of the main vulnerabilities in SSL is known as the downgrade attack which weakens the protection offered by abandoning the newer protocol version in favor of an older less secure version. This is allowed in SSL for backwards compatibility reasons, but is a known flaw. Forward secrecy uses unique session keys to ensure communication will remain private even if the server keys are compromised at a later date.</p><p>Encryption limits what intermediaries can learn from handling your internet traffic. When a system is encrypted, observers do not have access to the actual data being transmitted. Instead, they have access to metadata such as timestamps and size and pattern of communication. If enough metadata and evidence is collected, privacy is reduced and may be compromised.</p><h3>Defence against metadata and pattern analysis</h3><h4>VPN</h4><p>As mentioned, your IP address is a sensitive piece of information when associated with your online communication. For many of us, this IP address does not change very often. It is either explicitly static or infrequently changed. VPNs are a popular solution for decoupling activity with an IP address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/0*oZmX25k0O8LPU4bm.png" /><figcaption>Sample Marketing for a VPN service. Photo Credit: vpngeeks.com</figcaption></figure><p>A VPN is a service provided by a special kind of server. It is used to relay communication on behalf of the user. The user redirects all communication through the VPN, replacing their true client IP with the IP of the VPN server. To all of the user’s counterparties, it looks as if the VPN is the originator of the traffic. This removes the client’s IP address from the equation which is a boon for privacy. Furthermore, if it is a well trafficked VPN server, it may have many users which further obscures who performed the activity improving privacy.</p><p>It is important to note that the VPN does have access to all activity happening on its servers and may be logging this activity. Depending on the privacy needs, it may be best to rotate VPNs frequently, or to use a more advanced solution altogether.</p><h4>Tor</h4><p>Tor, short for The Onion Router, was developed by the Navy in 2002. The protocol is dedicated to protecting individuals’ privacy. Tor’s goal is to prevent servers and onlookers from learning the user’s geographic location or doing network surveillance and traffic analysis. Tor consists of several exit nodes which are accessible from the ordinary internet, as well as relayers which act as intermediaries within the Tor protocol to route the traffic.</p><p>The onion in the name of the protocol is a metaphor alluding to the technique of wrapping up the data in multiple layers of encryption. This ball of data is then passed through several relayers. Each relayer decrypts the received data, peeling the onion, to find more encrypted data and the address of the next relayer. This process repeats several times until it arrives at the destination in its original form.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*uQyhxChXs_OP4XFY.jpg" /><figcaption>Photo Credit: thebestvpn.com</figcaption></figure><p>By introducing a sequence of relayers, each with only knowledge of the immediate prior and immediate next node, we’ve eliminated the ability for relayers to interpret what is happening, and we’ve also removed the ability for the server to know precisely who it is communicating with.</p><p>While Tor’s privacy guarantees are strong, it is imperfect, and depending on the uniqueness and timing of the activity, it may be possible to deanonymize activity, especially if enough exit nodes are being surveilled.</p><p>Tor offers the ability to connect to the public internet privately, but also has the ability to launch websites that are only accessible through Tor via .onion addresses. Perhaps the most famous Tor site of all was the drug marketplace, Silk Road, founded by Ross Ulbricht and shut down in 2013.</p><h4>I2P/Kovri</h4><p>I2P is quite similar to Tor with a couple of important differences. Tor has the user select a series of relayers that become a circuit. This circuit acts as the route for all traffic during the Tor session. In contrast, I2P does routing at the packet level. Network traffic is divided up into packets and each packet in the I2P protocol is routed independently.</p><p>It’s also important to note that I2P acts as a self contained network and does not allow users to access the rest of the internet. Only services and applications specifically developed for I2P can be accessed with the I2P network. This is similar to .onion sites on Tor that are only accessible within the Tor network.</p><p>Kovri is a C++ implementation of I2P that is being built specifically for the cryptocurrency Monero. The goal is to integrate it into Monero so that all transactions are relayed through the Kovri network, removing the ability for observers to trace transactions back to their originating IP address.</p><h4>Dandelion</h4><p>Dandelion is a protocol specifically designed to mask the origin of a crypto transaction. Rather than broadcast to the entire network at once, which may allow spy nodes to see the IP address, Dandelion splits propagation into two phases known as Stem and Fluff (or Anonymity and Spreading as seen in this diagram)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/0*KnLV3D01IbGIuHJs" /><figcaption>Photo Credit: Giulia Fanti</figcaption></figure><p>During the stem phase, transactions are passed forward to just one recipient a random number of times. Each node decides at random whether to pass the transaction forward continuing the stem phase, or to enter the fluff phase. Given that the number of hops is not known, it is difficult for each node to discern whether the transaction actually originated at the previous hop or was passed along from one or more prior hops. Only after the transaction has been passed forward a number of times during the stem phase, will the fluff phase begin. The fluff phase broadcasts the transaction to the wider network, leaving the true origin hidden in the mix of stem nodes.</p><p>The Dandelion protocol, which is has been updated and now called Dandelion++, is being incorporated into MimbleWimble currencies Grin and Beam and may eventually be adapted for Bitcoin and other cryptocurrencies.</p><h3>Path to the blockchain</h3><p>Transactions destined for the blockchain have a long journey. First the user creates intent. The most basic intent would consist of an amount and a recipient address. More complex intent may involve smart contract logic or multiple recipients. Depending on the system, more complex transactions may be harder to achieve privately.</p><p>From intent, the user generates a signed transaction using the private keys corresponding to their funds. Depending on the wallet software, this may generate observable network traffic potentially compromising user privacy. This is the reason that web wallets or light clients are considered harmful to privacy by crypto experts. Full nodes are able to generate and sign transactions without reaching out to the world for details needed during the creation process.</p><p>Once a transaction is created, it needs to be broadcast to the world. If it is going to be joined with other transactions before making it to the blockchain, it is important to think about who has access to the component transactions that are used to generate the composite transaction. Grin is an example of a system where transactions are combined before being written to the blockchain. If it weren’t for Dandelion, nodes observing the original incoming transactions would have full access to those individual transactions and may be able to use that information to discern sender and recipient within transactions.</p><h3>What next?</h3><p>As more and more of our lives migrate to the digital realm, it is vitally important to have control over our own data to protect ourselves. As we have seen here, if privacy is to be preserved, doing so at the blockchain layer is necessary, but not sufficient. Steps must be taken to ensure privacy is not compromised on the path to the blockchain. In the coming years, we can expect breakthroughs in both surveillance and privacy in what is sure to remain a game of cat and mouse for the indefinite future.</p><p><em>Disclaimer: Jordan Clifford is a managing director of Scalar Capital which holds positions in some, but not all, of the aforementioned assets. This post is not investment or legal advice.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b92a6deea62" width="1" height="1" alt=""><hr><p><a href="https://medium.com/scalar-capital/privacy-surrounding-the-blockchain-7b92a6deea62">Privacy surrounding the Blockchain</a> was originally published in <a href="https://medium.com/scalar-capital">Scalar Capital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>