The adoption of blockchain-based distributed computation platforms is growing\nfast. Some of these platforms, such as Ethereum, provide support for\nimplementing smart contracts, which are envisioned to have novel applications\nin a broad range of areas, including finance and Internet-of-Things. However, a\nsignificant number of smart contracts deployed in practice suffer from security\nvulnerabilities, which enable malicious users to steal assets from a contract\nor to cause damage. Vulnerabilities present a serious issue since contracts may\nhandle financial assets of considerable value, and contract bugs are\nnon-fixable by design. To help developers create more secure smart contracts,\nwe introduce FSolidM, a framework rooted in rigorous semantics for designing\ncon- tracts as Finite State Machines (FSM). We present a tool for creating FSM\non an easy-to-use graphical interface and for automatically generating Ethereum\ncontracts. Further, we introduce a set of design patterns, which we implement\nas plugins that developers can easily add to their contracts to enhance\nsecurity and functionality.\n
Simplicity is a typed, combinator-based, functional language without loops and recursion, designed to be used for crypto-currencies and blockchain applications. It aims to improve upon existing crypto-currency languages, such as Bitcoin Script and Ethereum's EVM, while avoiding some of the problems they face. Simplicity comes with formal denotational semantics defined in Coq, a popular, general purpose software proof assistant. Simplicity also includes operational semantics that are defined with an abstract machine that we call the Bit Machine. The Bit Machine is used as a tool for measuring the computational space and time resources needed to evaluate Simplicity programs. Owing to its Turing incompleteness, Simplicity is amenable to static analysis that can be used to derive upper bounds on the computational resources needed, prior to execution. While Turing incomplete, Simplicity can express any finitary function, which we believe is enough to build useful ``smart contracts'' for blockchain applications.
Lee Thomas, Chao Long, Pete Burnap, Jianzhong Wu · 5 authors
An electricity supply smart contract was developed and demonstrated to perform pre-time-of-use price negotiation between demand and generation and post-time-of-use settlement and payment. The smart contract was demonstrated with 1000 loads/generators with usages simulated using lognormal probability distributions. It combines payment of deposit, negotiation of price based on estimates, settlement based on actual usage and enactment of payments using crypto-currency. The settlement procedure rewards customers that adjusted to balance the system. The smart contract was written in the solidity programming language and implemented with a simulated Ethereum blockchain using testrpc and go-ethereum. In the example test case, a price was agreed, settled and payment enacted.
Blockchain systems are designed to produce blocks at a constant average rate. The most popular systems currently employ a Proof of Work (PoW) algorithm as a means of creating these blocks. Bitcoin produces, on average, one block every 10 minutes. An unfortunate limitation of all deployed PoW blockchain systems is that the time between blocks has high variance. For example, 5% of the time, Bitcoin's inter-block time is at least 40 minutes. This variance impedes the consistent flow of validated transactions through the system. We propose an alternative process for PoW-based block discovery that results in an inter-block time with significantly lower variance. Our algorithm, called Bobtail, generalizes the current algorithm by comparing the mean of the k lowest order statistics to a target. We show that the variance of inter-block times decreases as k increases. If our approach were applied to Bitcoin, about 80% of blocks would be found within 7 to 12 minutes, and nearly every block would be found within 5 to 18 minutes; the average inter-block time would remain at 10 minutes. Further, we show that low-variance mining significantly thwarts doublespend and selfish mining attacks. For Bitcoin and Ethereum currently (k=1), an attacker with 40% of the mining power will succeed with 30% probability when the merchant sets up an embargo of 8 blocks; however, when k>=20, the probability of success falls to less than 1%. Similarly, for Bitcoin and Ethereum currently, a selfish miner with 40% of the mining power will claim about 66% of blocks; however, when k>=5, the same miner will find that selfish mining is less successful than honest mining. The cost of our approach is a larger block header.
Stefanie Roos, Pedro Moreno-Sanchez, Aniket Kate, Ian Goldberg
Path-based transaction (PBT) networks, which settle payments from one user to another via a path of intermediaries, are a growing area of research. They overcome the scalability and privacy issues in cryptocurrencies like Bitcoin and Ethereum by replacing expensive and slow on-chain blockchain operations with inexpensive and fast off-chain transfers. In the form of credit networks such as Ripple and Stellar, they also enable low-price real-time gross settlements across different currencies. For example, SilentWhsipers is a recently proposed fully distributed credit network relying on path-based transactions for secure and in particular private payments without a public ledger. At the core of a decentralized PBT network is a routing algorithm that discovers transaction paths between payer and payee. During the last year, a number of routing algorithms have been proposed. However, the existing ad hoc efforts lack either efficiency or privacy. In this work, we first identify several efficiency concerns in SilentWhsipers. Armed with this knowledge, we design and evaluate SpeedyMurmurs, a novel routing algorithm for decentralized PBT networks using efficient and flexible embedding-based path discovery and on-demand efficient stabilization to handle the dynamics of a PBT network. Our simulation study, based on real-world data from the currently deployed Ripple credit network, indicates that SpeedyMurmurs reduces the overhead of stabilization by up to two orders of magnitude and the overhead of routing a transaction by more than a factor of two. Furthermore, using SpeedyMurmurs maintains at least the same success ratio as decentralized landmark routing, while providing lower delays. Finally, SpeedyMurmurs achieves key privacy goals for routing in PBT networks.
Stefanie Roos, Pedro Moreno-Sánchez, Aniket Kate, Ian Goldberg
Path-based transaction (PBT) networks, which settle payments from one user to\nanother via a path of intermediaries, are a growing area of research. They\novercome the scalability and privacy issues in cryptocurrencies like Bitcoin\nand Ethereum by replacing expensive and slow on-chain blockchain operations\nwith inexpensive and fast off-chain transfers. In the form of credit networks\nsuch as Ripple and Stellar, they also enable low-price real-time gross\nsettlements across different currencies. For example, SilentWhsipers is a\nrecently proposed fully distributed credit network relying on path-based\ntransactions for secure and in particular private payments without a public\nledger. At the core of a decentralized PBT network is a routing algorithm that\ndiscovers transaction paths between payer and payee. During the last year, a\nnumber of routing algorithms have been proposed. However, the existing ad hoc\nefforts lack either efficiency or privacy. In this work, we first identify\nseveral efficiency concerns in SilentWhsipers. Armed with this knowledge, we\ndesign and evaluate SpeedyMurmurs, a novel routing algorithm for decentralized\nPBT networks using efficient and flexible embedding-based path discovery and\non-demand efficient stabilization to handle the dynamics of a PBT network. Our\nsimulation study, based on real-world data from the currently deployed Ripple\ncredit network, indicates that SpeedyMurmurs reduces the overhead of\nstabilization by up to two orders of magnitude and the overhead of routing a\ntransaction by more than a factor of two. Furthermore, using SpeedyMurmurs\nmaintains at least the same success ratio as decentralized landmark routing,\nwhile providing lower delays. Finally, SpeedyMurmurs achieves key privacy goals\nfor routing in PBT networks.\n
Henrique Rocha, Sté́phane Ducasse, Marcus Denker, Jason Lecerf
Solidity is a language used to implement smart contracts on a blockchain platform. Since its initial conception in 2014, Solidity has evolved into one of the major languages for the Ethereum platform as well as other blockchain technologies. Due to its popularity, there are many tools specifically designed to handle smart contracts written in Solidity. However, there is a lack of tools for Pharo to handle Solidity contracts. Therefore, we implemented a parser using SmaCC to serve as a base for further developing Solidity support in Pharo. In this paper, we describe the parser creation, the irregularities we found in the Solidity grammar specification, and common practices on how to adapt the grammar to an LR type parser. Our experiences with parsing the Solidity language using SmaCC may help other developers trying to convert similar grammars.
Tien Tuan Anh Dinh, Rui Liu, Meihui Zhang, Gang Chen · 6 authors
Blockchain technologies are gaining massive momentum in the last few years. Blockchains are distributed ledgers that enable parties who do not fully trust each other to maintain a set of global states. The parties agree on the existence, values, and histories of the states. As the technology landscape is expanding rapidly, it is both important and challenging to have a firm grasp of what the core technologies have to offer, especially with respect to their data processing capabilities. In this paper, we first survey the state of the art, focusing on private blockchains (in which parties are authenticated). We analyze both in-production and research systems in four dimensions: distributed ledger, cryptography, consensus protocol, and smart contract. We then present BLOCKBENCH, a benchmarking framework for understanding performance of private blockchains against data processing workloads. We conduct a comprehensive evaluation of three major blockchain systems based on BLOCKBENCH, namely Ethereum, Parity, and Hyperledger Fabric. The results demonstrate several trade-offs in the design space, as well as big performance gaps between blockchain and database systems. Drawing from design principles of database systems, we discuss several research directions for bringing blockchain performance closer to the realm of databases.
Cloud computing has become an irreversible trend. Together comes the pressing need for verifiability, to assure the client the correctness of computation outsourced to the cloud. Existing verifiable computation techniques all have a high overhead, thus if being deployed in the clouds, would render cloud computing more expensive than the on-premises counterpart. To achieve verifiability at a reasonable cost, we leverage game theory and propose a smart contract based solution. In a nutshell, a client lets two clouds compute the same task, and uses smart contracts to stimulate tension, betrayal and distrust between the clouds, so that rational clouds will not collude and cheat. In the absence of collusion, verification of correctness can be done easily by crosschecking the results from the two clouds. We provide a formal analysis of the games induced by the contracts, and prove that the contracts will be effective under certain reasonable assumptions. By resorting to game theory and smart contracts, we are able to avoid heavy cryptographic protocols. The client only needs to pay two clouds to compute in the clear, and a small transaction fee to use the smart contracts. We also conducted a feasibility study that involves implementing the contracts in Solidity and running them on the official Ethereum network.
A developing field of interest for the distributed systems and applied cryptography community is that of smart contracts: self-executing financial instruments that synchronize their state, often through a blockchain. One such smart contract system that has seen widespread practical adoption is Ethereum, which has grown to secure approximately 30 billion USD of currency value and in excess of 300,000 daily transactions. \n \nUnfortunately, the rise of these technologies has been marred by a repeated series of security vulnerabilities and high pro file contract failures. To address these failures, the Ethereum community has turned to formal verification and program analysis which show great promise due to the computational simplicity and bounded-time execution inherent to smart contracts. Despite this, no fully formal, rigorous, comprehensive, and executable semantics of the EVM (Ethereum Virtual Machine) currently exists, leaving a lack of rigor on which to base such tools. \n \nIn this work, we present KEVM, the first fully executable formal semantics of the EVM, the bytecode language in which smart contracts are executed. We create this semantics in a framework for executable \nsemantics, the K framework. We show that our semantics not only passes the official 40,683-test stress test suite for EVM implementations, but also reveals ambiguities and potential sources of error in the existing \non-paper formalization of EVM semantics on which our work is based. \n These properties make KEVM an ideal formal reference implementation against which other implementations can be evaluated. \n \nWe proceed to argue for a semantics-first formal verification approach for EVM contracts, and demonstrate its practicality by using KEVM to verify practically important properties over the arithmetic operation of an \nexample smart contract and the correct operation of a token transfer function in a second contract. We show that our approach is feasible and not computationally restrictive. We hope that our work serves as the base for the development of a wide range of useful formally derived tools for Ethereum, including model checkers, certified compilers, and program equivalence checkers.
Blockchains such as Bitcoin and Ethereum execute payment transactions securely, but their performance is limited by the need for global consensus. Payment networks overcome this limitation through off-chain transactions. Instead of writing to the blockchain for each transaction, they only settle the final payment balances with the underlying blockchain. When executing off-chain transactions in current payment networks, parties must access the blockchain within bounded time to detect misbehaving parties that deviate from the protocol. This opens a window for attacks in which a malicious party can steal funds by deliberately delaying other parties' blockchain access and prevents parties from using payment networks when disconnected from the blockchain. We present Teechain, the first layer-two payment network that executes off-chain transactions asynchronously with respect to the underlying blockchain. To prevent parties from misbehaving, Teechain uses treasuries, protected by hardware trusted execution environments (TEEs), to establish off-chain payment channels between parties. Treasuries maintain collateral funds and can exchange transactions efficiently and securely, without interacting with the underlying blockchain. To mitigate against treasury failures and to avoid having to trust all TEEs, Teechain replicates the state of treasuries using committee chains, a new variant of chain replication with threshold secret sharing. Teechain achieves at least a 33x higher transaction throughput than the state-of-the-art Lightning payment network. A 30-machine Teechain deployment can handle over 1 million Bitcoin transactions per second.
Blockchains such as Bitcoin and Ethereum execute payment transactions securely, but their performance is limited by the need for global consensus. Payment networks overcome this limitation through off-chain transactions. Instead of writing to the blockchain for each transaction, they only settle the final payment balances with the underlying blockchain. When executing off-chain transactions in current payment networks, parties must access the blockchain within bounded time to detect misbehaving parties that deviate from the protocol. This opens a window for attacks in which a malicious party can steal funds by deliberately delaying other parties' blockchain access and prevents parties from using payment networks when disconnected from the blockchain. We present Teechain, the first layer-two payment network that executes off-chain transactions asynchronously with respect to the underlying blockchain. To prevent parties from misbehaving, Teechain uses treasuries, protected by hardware trusted execution environments (TEEs), to establish off-chain payment channels between parties. Treasuries maintain collateral funds and can exchange transactions efficiently and securely, without interacting with the underlying blockchain. To mitigate against treasury failures and to avoid having to trust all TEEs, Teechain replicates the state of treasuries using committee chains, a new variant of chain replication with threshold secret sharing. Teechain achieves at least a 33x higher transaction throughput than the state-of-the-art Lightning payment network. A 30-machine Teechain deployment can handle over 1 million Bitcoin transactions per second.
Blockchains such as Bitcoin and Ethereum execute payment transactions securely, but their performance is limited by the need for global consensus. Payment networks overcome this limitation through off-chain transactions. Instead of writing to the blockchain for each transaction, they only settle the final payment balances with the underlying blockchain. When executing off-chain transactions in current payment networks, parties must access the blockchain within bounded time to detect misbehaving parties that deviate from the protocol. This opens a window for attacks in which a malicious party can steal funds by deliberately delaying other parties' blockchain access and prevents parties from using payment networks when disconnected from the blockchain. We present Teechain, the first layer-two payment network that executes off-chain transactions asynchronously with respect to the underlying blockchain. To prevent parties from misbehaving, Teechain uses treasuries, protected by hardware trusted execution environments (TEEs), to establish off-chain payment channels between parties. Treasuries maintain collateral funds and can exchange transactions efficiently and securely, without interacting with the underlying blockchain. To mitigate against treasury failures and to avoid having to trust all TEEs, Teechain replicates the state of treasuries using committee chains, a new variant of chain replication with threshold secret sharing. Teechain achieves at least a 33x higher transaction throughput than the state-of-the-art Lightning payment network. A 30-machine Teechain deployment can handle over 1 million Bitcoin transactions per second.
Abstract Blockchains are distributed data structures that are used to achieve consensus in systems for cryptocurrencies (like Bitcoin) or smart contracts (like Ethereum). Although blockchains gained a lot of popularity recently, there are only few logic-based models for blockchains available. We introduce $\mathsf{BCL}$, a dynamic logic to reason about blockchain updates, and show that $\mathsf{BCL}$ is sound and complete with respect to a simple blockchain model.
A. Pinar Ozisik, George Bissias, Brian Neil Levine
We make several contributions that quantify the real-time hash rate and therefore the consensus of a blockchain. We show that by using only the hash value of blocks, we can estimate and measure the hash rate of all miners or individual miners, with quanti able accuracy. We apply our techniques to the Ethereum and Bitcoin blockchains; our solution applies to any proof-of-work-based blockchain that relies on a numeric target for the validation of blocks. We also show that if miners regularly broadcast status reports of their partial proof-of- work, the hash rate estimates are signi cantly more accurate at a cost of slightly higher bandwidth. Whether using only the blockchain, or the additional information in status reports, merchants can use our techniques to quantify in real-time the threat of double-spend attacks.
Robert Norvill, Beltrán Borja Fiz Pontiveros, Radu State, Irfan Awan · 5 authors
Smart contracts have recently attracted interest from diverse fields including law and finance. Ethereum in particular has grown rapidly to accommodate an entire ecosystem of contracts which run using its own crypto-currency. Smart contract developers can opt to verify their contracts so that any user can inspect and audit the code before executing the contract. However, the huge numbers of deployed smart contracts and the lack of supporting tools for the analysis of smart contracts makes it very challenging to get insights into this eco-environment, where code gets executed through transactions performing value transfer of a crypto-currency. We address this problem and report on the use of unsupervised clustering techniques and a seed set of verified contracts, in this work we propose a framework to group together similar contracts within the Ethereum network using only the contracts publicly available compiled code. We report qualitative and quantitative results on a dataset and provide the dataset and project code to the research community.
This chapter looks beyond the novelty of self-executing ‘smart contracts’ in blockchain networks and explores developments against the background fact that commercial parties have, for centuries, used documentary credit to simulate autonomous performance. Blockchain-based smart contracts and documentary credit share three core functionalities which are essential to any effective autonomous performance, analogue or digital—they both (i) act through internalized media of exchange; (ii) operate as closed systems; and (iii) provide means of securing sufficient resources to guarantee contractual performance. Using these three functionalities as a framework, this chapter conducts a comparative analysis of mechanisms for effecting autonomous contractual performance in a commercial setting. From this comparison, a few hypotheses are drawn regarding the potential areas where smart contract technology is more likely to find fruitful application. In particular, the chapter considers potential limitations to applying smart contracts to scenarios beyond digital asset transfers, how dispute resolution mechanisms should be designed to complement (rather impair) the autonomous nature of contractual performance under smart contracts, and potential capital cost implications which might arise in some cases when parties seek to replace human intermediaries with smart contracts.
In the absence to date of any specific pre-emptive federal regulation of blockchain distributed ledger technology in fintech, smart contracts, or other uses, this paper discusses early state legislation including Arizona, California, Delaware, Hawaii, Illinois, Maine, New York, Nevada and Vermont. While the list comprises usual suspects for early adoption of disruptive technology regulation, especially of its real-time aspects that were recognized in In re Dole Food Co (Del. Ch. Feb. 15, 2017), the mechanics of blockchain are still evolving and restrictive regulations appear both premature and at risk of expedited obsolescence. Before expanding to general record-keeping transactions, blockchain was first used in bitcoin, a virtual currency. Then, blockchain evolved towards self-executing smart contracts using ethereum technology and may eventually reach an “Internet of Agreements.” While its promise for applications like virtual currencies and payments is obvious and vigorously explored by major financial institutions, blockchain’s real strength lies in authentication and keeping records up-to-date, especially for valuable, highly liquid assets like securities. Key developments for blockchain’s regulation and implementation in an evidentiary context occurred in Arizona (recognition of smart contracts), Vermont (blockchain as evidence), Chicago (real estate records), and, most importantly, Delaware (pending initiative authorizing registration of shares of Delaware companies in blockchain form). Since 64 percent of Fortune 500 companies and over 1 million entities are incorporated in Delaware, an enactment of Delaware’s initiative will change regulatory landscape for securities by setting precedent in the most important corporate jurisdiction of the U.S. Other states competing for corporate taxes and fees would be sure to follow.
Digital currency platforms such as Bitcoin, Ethereum, and Ripple are slowly but surely revolutionizing trade and commerce alongside their potential to impact people's economic lifestyles immensely. Digital currencies present a unique medium for humanitarian, mission, and more notoriosly arms and terrorism transactions around the globe. Various factors like security, legislature, and infrastructure affect the viability of adopting digital currencies in developing countries such as Zimbabwe. The research study assesses whether this technology's shortcomings outweigh the conventional means of exchange: hard cash, gold, and checks. Therefore, aiding stakeholders in making informed decisions concerning interfacing technology with economics in the developing world.
Distributed ledger technology, a method of storing and maintaining the integrity of multiple copies of critical data using a massively redundant network of participating machines, has found a “killer application” in blockchain, a type of distributed ledger. A blockchain consists of sequential blocks that may never be modified or reordered, leaving a public, auditable record that is consistent and highly resistant to tampering and deletion. These qualities make blockchain eminently suitable for its most common use, cryptocurrency, and its occasional variants in the form of cryptocurrency tokens, used to represent ownership or some other right to virtual or physical goods and capabilities. Blockchain also enables smart contracts, discrete bodies of software written to serve both as the memorial and the means of execution of an agreement between parties. Smart contracts can have all the elements of a traditional contract, and as jurisdictions legislate or jurists rule on the fine points of enforceability and the acceptability of smart contracts as traditional contracts, applications in nearly every area of commerce have emerged. Digital lawyers may not need to become software developers, but deepening their understanding of the capabilities and limitations of the technology, developing a keen awareness of the issues at the intersection between code and the law, as well as the law’s readiness in this area, will be of great advantage to them and their clients in this rapidly evolving area at the intersection of technology, commerce and law.
Bitcoin is an application that runs on blockchain technology. Blockchain is a foundational technology that is bringing in the second era of the Internet – the era where value can be transferred, rather than just information. Blockchain is developing along a four-stage path similar to that which TCP/IP took. Both are foundational technologies. TCP/IP brought the Internet, and eventually brought significant (transformational) technological changes in business like Amazon.com and Skype. These are changes that could not have been forecast at the beginning of the Internet age. Blockchain is an immutable distributed ledger. It replaces the inefficient use of multiple centralized ledgers. It will support smart contracts that automatically make payments, adjust accounts, and coordinate records among multiple organizations. A payroll application on blockchain’s distributed ledger will allow employees to be paid, and all related deductions and deposits to be made in real-time. It will allow multiple government agencies to immediately have audit-level access to all employee records, and all employer matching-payments. With a fiat crypto-currency a payroll application on the blockchain will allow immediate global payroll compliance at a fraction of the cost of current payroll compliance. Based on the trajectory of ITP/IP’s development it is reasonable to assume that a payroll application will be seen on a blockchain (most likely Quorum, a private/permissioned blockchain based on the Ethereum platform) by 2018-2021. The first one will be constructed either by a government (Finland or Estonia) or by a private company (in the USA). Costs will be so low that the industry will consolidate (picture the arrival of Amazon.com among the group of brick and mortar books stores that preceded it in the late 1990’s). A traditional payroll service provider today needs to prepare for this change by developing a pilot program internally that will educate its workforce to the advantages and operational intricacies of a service based in the blockchain.
Bitcoin is an application that runs on blockchain technology. Blockchain is a foundational technology that is bringing in the second era of the Internet – the era where value can be transferred, rather than just information.
Blockchain is developing along a four-stage path similar to that which TCP/IP took. Both are foundational technologies. TCP/IP brought the Internet, and eventually brought significant (transformational) technological changes in business like Amazon.com and Skype. These are changes that could not have been forecast at the beginning of the Internet age.
Blockchain is an immutable distributed ledger. It replaces the inefficient use of multiple centralized ledgers. It will support smart contracts that automatically make payments, adjust accounts, and coordinate records among multiple organizations.
A payroll application on blockchain’s distributed ledger will allow employees to be paid, and all related deductions and deposits to be made in real-time. It will allow multiple government agencies to immediately have audit-level access to all employee records, and all employer matching-payments. With a fiat crypto-currency a payroll application on the blockchain will allow immediate global payroll compliance at a fraction of the cost of current payroll compliance.
Based on the trajectory of ITP/IP’s development it is reasonable to assume that a payroll application will be seen on a blockchain (most likely Quorum, a private/permissioned blockchain based on the Ethereum platform) by 2018-2021. The first one will be constructed either by a government (Finland or Estonia) or by a private company (in the USA). Costs will be so low that the industry will consolidate (picture the arrival of Amazon.com among the group of brick and mortar books stores that preceded it in the late 1990’s).
A traditional payroll service provider today needs to prepare for this change by developing a pilot program internally that will educate its workforce to the advantages and operational intricacies of a service based in the blockchain.
Emanuele Di Pascale, Jasmina McMenamy, Irene Macaluso, Linda Doyle
The disruptive power of blockchain technologies represents a great opportunity to re-imagine standard practices of telecommunication networks and to identify critical areas that can benefit from brand new approaches. As a starting point for this debate, we look at the current limits of infrastructure sharing, and specifically at the Small-Cell-as-a-Service trend, asking ourselves how we could push it to its natural extreme: a scenario in which any individual home or business user can become a service provider for mobile network operators, freed from all the scalability and legal constraints that are inherent to the current modus operandi. We propose the adoption of smart contracts to implement simple but effective Service Level Agreements (SLAs) between small cell providers and mobile operators, and present an example contract template based on the Ethereum blockchain.
Tien Tuan Anh Dinh, Ji Wang, Gang Chen, Rui Liu · 6 authors
Blockchain technologies are taking the world by storm. Public blockchains, such as Bitcoin and Ethereum, enable secure peer-to-peer applications like crypto-currency or smart contracts. Their security and performance are well studied. This paper concerns recent private blockchain systems designed with stronger security (trust) assumption and performance requirement. These systems target and aim to disrupt applications which have so far been implemented on top of database systems, for example banking, finance applications. Multiple platforms for private blockchains are being actively developed and fine tuned. However, there is a clear lack of a systematic framework with which different systems can be analyzed and compared against each other. Such a framework can be used to assess blockchains' viability as another distributed data processing platform, while helping developers to identify bottlenecks and accordingly improve their platforms. In this paper, we first describe BlockBench, the first evaluation framework for analyzing private blockchains. It serves as a fair means of comparison for different platforms and enables deeper understanding of different system design choices. Any private blockchain can be integrated to BlockBench via simple APIs and benchmarked against workloads that are based on real and synthetic smart contracts. BlockBench measures overall and component-wise performance in terms of throughput, latency, scalability and fault-tolerance. Next, we use BlockBench to conduct comprehensive evaluation of three major private blockchains: Ethereum, Parity and Hyperledger Fabric. The results demonstrate that these systems are still far from displacing current database systems in traditional data processing workloads. Furthermore, there are gaps in performance among the three systems which are attributed to the design choices at different layers of the software stack.