scispace - formally typeset
Search or ask a question
Book ChapterDOI

A Survey of Attacks on Ethereum Smart Contracts SoK

22 Apr 2017-Vol. 10204, pp 164-186
TL;DR: This work analyses the security vulnerabilities of Ethereum smart contracts, providing a taxonomy of common programming pitfalls which may lead to vulnerabilities, and shows a series of attacks which exploit these vulnerabilities, allowing an adversary to steal money or cause other damage.
Abstract: Smart contracts are computer programs that can be correctly executed by a network of mutually distrusting nodes, without the need of an external trusted authority. Since smart contracts handle and transfer assets of considerable value, besides their correct execution it is also crucial that their implementation is secure against attacks which aim at stealing or tampering the assets. We study this problem in Ethereum, the most well-known and used framework for smart contracts so far. We analyse the security vulnerabilities of Ethereum smart contracts, providing a taxonomy of common programming pitfalls which may lead to vulnerabilities. We show a series of attacks which exploit these vulnerabilities, allowing an adversary to steal money or cause other damage.
Citations
More filters
Posted Content
TL;DR: This study presents the first empirical study on smart contract maintenance, which can help smart contract developers better maintain their smart contract-based projects, and highlights some key future research directions to improve the Ethereum ecosystem.
Abstract: Smart contracts are self-executed programs that run on a blockchain They cannot be modified once deployed and hence they bring unique maintenance challenges compared to conventional software This study focuses on the key novel maintenance issues related to smart contracts on Ethereum, and aims to answer (i) What kinds of issues will smart contract developers encounter for corrective, adaptive, perfective, and preventive maintenance? (ii) What are the current maintenance methods used for smart contracts? and (iii) What should we do in the future to increase the maintainability of smart contracts? To obtain the answers to these research questions, we first conducted a systematic literature review to analyze 131 smart contract related research papers published from 2014 to 2020 Since the Ethereum ecosystem is fast-growing some results from previous publications might be out-of-date and there may be a practice gap between academia and industry To address this we performed an online survey of smart contract developers on Github to validate our findings and we received 165 useful responses Based on the survey feedback and literature review, we present the first empirical study on smart contract maintenance Our study can help smart contract developers better maintain their smart contract-based projects, and we highlight some key future research directions to improve the Ethereum ecosystem

12 citations


Cites background from "A Survey of Attacks on Ethereum Sma..."

  • ...[49] studied attacks on smart contracts on Ethereum between 2015 to 2017, and provided a classification of programming pitfalls which might lead to the security issues of smart...

    [...]

  • ...Attackers can utilize the errors / bugs to steal Ethers or lock the balance maliciously [49]....

    [...]

Book ChapterDOI
15 Dec 2019
TL;DR: This work proposes an efficient model for the detection of vulnerabilities in Ethereum smart contracts with machine learning techniques that is able to effectively and fast detect vulnerabilities based on the patterns learned from training samples.
Abstract: Smart contracts are decentralized applications running on the blockchain to meet various practical scenario demands. The increasing number of security events regarding smart contracts have led to huge pecuniary losses and destroyed the ecological stability of contract layer on the blockchain. Faced with the increasing quantity of contracts, it is an emerging issue to effectively and efficiently detect vulnerabilities in smart contracts. Existing methods of detecting vulnerabilities in smart contracts like Oyente mainly employ symbolic execution. This method is very time-consuming, as the symbolic execution requires the exploration of all executable paths in a contract. In this work, we propose an efficient model for the detection of vulnerabilities in Ethereum smart contracts with machine learning techniques. The model is able to effectively and fast detect vulnerabilities based on the patterns learned from training samples. Our model is evaluated on 49502 real-world smart contracts and the results verify its effectiveness and efficiency.

12 citations

Posted Content
TL;DR: Flint is proposed, a new statically-typed programming language specifically designed for writing robust smart contracts and its features enforce the writing of safe and predictable code, and introduces protection blocks to encourage good practices.
Abstract: The Ethereum blockchain platform supports the execution of decentralised applications or smart contracts. These typically hold and transfer digital currency to other parties on the platform; however, they have been subject to numerous attacks due to the unintentional introduction of bugs. Over a billion dollars worth of currency has been stolen since its release in July 2015. As smart contracts cannot be updated after deployment, it is imperative that the programming language supports the development of robust contracts. We propose Flint, a new statically-typed programming language specifically designed for writing robust smart contracts. Flint's features enforce the writing of safe and predictable code. To encourage good practices, we introduce protection blocks. Protection blocks restrict who can run code and when (using typestate) it can be executed. To prevent vulnerabilities relating to the unintentional loss of currency, Flint Asset traits provide safe atomic operations, ensuring the state of contracts is always consistent. Writes to state are restricted, simplifying reasoning about smart contracts.

12 citations


Cites background from "A Survey of Attacks on Ethereum Sma..."

  • ...” We highlight problems with example vulnerable contracts[4]:...

    [...]

  • ...There is also a possible denial of service attack[4] and the corresponding Flint program would only suffer from this problem, if the non re-entrancy of external calls were explicitly changed to allow re-entrancy....

    [...]

  • ...However, Solidity supports a variety of unsafe patterns[4] which makes it difficult for analysis tools[32,11] and programmers to find all vulnerabilities....

    [...]

Journal ArticleDOI
TL;DR: In this article , the authors proposed a Monte Carlo approach to predict the probability that a transaction will be mined within a given time limit, based on the probability of a transaction being processed with a given probability in a given amount of time.
Abstract: In blockchains, transaction fees are fixed by the users. The probability for a transaction to be processed quickly increases with the fee level. In this paper, we study the transaction fee optimization problem in the Ethereum blockchain. This problem consists of determining the minimum price a user should pay so that its transaction is processed with a given probability in a given amount of time. To reach this goal, we define a new solution method based on a Monte Carlo approach to predict the probability that a transaction will be mined within a given time limit. Numerical results on real data highlight the quality of the results.

12 citations

Journal ArticleDOI
TL;DR: The anti‐interference, antitampering and antidetection of the newly proposed model are verified through theoretical analysis and experiment, and the amount of information in the proposed method is 4.7 times that of the traditional time‐based covert communication.
Abstract: The traditional covert communication that relies on a central node is vulnerable to detection and attack. Applying blockchain to covert communication can improve the channel's anti‐interference and antitampering. Whisper is the communication protocol of Ethereum, which mainly relies on payload to store information and padding to expand. These two fields can store a large amount of information, creating conditions for the realization of covert communication. In this paper, we propose a covert communication method based on the whisper protocol to covertly transfer information in the blockchain. To implement this method, we use payload to store the carrier information, matching it with the secret message. The generated index is recorded in the padding field. To improve the concealment of communication, we simulate the default filling rules of the protocol to maintain the message size. A new topic–key pair interaction method is also proposed to improve the security of the model. Moreover, the anti‐interference, antitampering and antidetection of the newly proposed model are verified through theoretical analysis and experiment. The experimental findings show that the amount of information in the proposed method is 4.7 times that of the traditional time‐based covert communication. The time consumption of information transmission is reduced to 52.25% under the same settings and even less in actual use. The cost of the new topic–key pair interaction is reduced by nearly 50% compared with the original method.

12 citations

References
More filters
Book
01 Jan 2002
TL;DR: This presentation discusses Functional Programming in HOL, which aims to provide students with an understanding of the programming language through the lens of Haskell.
Abstract: Elementary Techniques.- 1. The Basics.- 2. Functional Programming in HOL.- 3. More Functional Programming.- 4. Presenting Theories.- Logic and Sets.- 5. The Rules of the Game.- 6. Sets, Functions, and Relations.- 7. Inductively Defined Sets.- Advanced Material.- 8. More about Types.- 9. Advanced Simplification, Recursion, and Induction.- 10. Case Study: Verifying a Security Protocol.

2,964 citations

01 Jan 2013
TL;DR: Ethereum as mentioned in this paper is a transactional singleton machine with shared state, which can be seen as a simple application on a decentralised, but singleton, compute resource, and it provides a plurality of resources, each with a distinct state and operating code but able to interact through a message-passing framework with others.
Abstract: The blockchain paradigm when coupled with cryptographically-secured transactions has demonstrated its utility through a number of projects, not least Bitcoin. Each such project can be seen as a simple application on a decentralised, but singleton, compute resource. We can call this paradigm a transactional singleton machine with shared-state. Ethereum implements this paradigm in a generalised manner. Furthermore it provides a plurality of such resources, each with a distinct state and operating code but able to interact through a message-passing framework with others. We discuss its design, implementation issues, the opportunities it provides and the future hurdles we envisage.

2,755 citations

Journal ArticleDOI
TL;DR: Protocols with application in important contracting areas, including credit, content rights management, payment systems, and contracts with bearer are discussed.
Abstract: Smart contracts combine protocols with user interfaces to formalize and secure relationships over computer networks. Objectives and principles for the design of these systems are derived from legal principles, economic theory, and theories of reliable and secure protocols. Similarities and differences between smart contracts and traditional business procedures based on written contracts, controls, and static forms are discussed. By using cryptographic and other security mechanisms, we can secure many algorithmically specifiable relationships from breach by principals, and from eavesdropping or malicious interference by third parties, up to considerations of time, user interface, and completeness of the algorithmic specification. This article discusses protocols with application in important contracting areas, including credit, content rights management, payment systems, and contracts with bearer.

1,495 citations

Proceedings ArticleDOI
24 Oct 2016
TL;DR: This paper introduces a novel quantitative framework to analyse the security and performance implications of various consensus and network parameters of PoW blockchains and devise optimal adversarial strategies for double-spending and selfish mining while taking into account real world constraints.
Abstract: Proof of Work (PoW) powered blockchains currently account for more than 90% of the total market capitalization of existing digital cryptocurrencies. Although the security provisions of Bitcoin have been thoroughly analysed, the security guarantees of variant (forked) PoW blockchains (which were instantiated with different parameters) have not received much attention in the literature. This opens the question whether existing security analysis of Bitcoin's PoW applies to other implementations which have been instantiated with different consensus and/or network parameters. In this paper, we introduce a novel quantitative framework to analyse the security and performance implications of various consensus and network parameters of PoW blockchains. Based on our framework, we devise optimal adversarial strategies for double-spending and selfish mining while taking into account real world constraints such as network propagation, different block sizes, block generation intervals, information propagation mechanism, and the impact of eclipse attacks. Our framework therefore allows us to capture existing PoW-based deployments as well as PoW blockchain variants that are instantiated with different parameters, and to objectively compare the tradeoffs between their performance and security provisions.

1,258 citations

Proceedings ArticleDOI
24 Oct 2016
TL;DR: This paper investigates the security of running smart contracts based on Ethereum in an open distributed network like those of cryptocurrencies, and proposes ways to enhance the operational semantics of Ethereum to make contracts less vulnerable.
Abstract: Cryptocurrencies record transactions in a decentralized data structure called a blockchain. Two of the most popular cryptocurrencies, Bitcoin and Ethereum, support the feature to encode rules or scripts for processing transactions. This feature has evolved to give practical shape to the ideas of smart contracts, or full-fledged programs that are run on blockchains. Recently, Ethereum's smart contract system has seen steady adoption, supporting tens of thousands of contracts, holding millions dollars worth of virtual coins. In this paper, we investigate the security of running smart contracts based on Ethereum in an open distributed network like those of cryptocurrencies. We introduce several new security problems in which an adversary can manipulate smart contract execution to gain profit. These bugs suggest subtle gaps in the understanding of the distributed semantics of the underlying platform. As a refinement, we propose ways to enhance the operational semantics of Ethereum to make contracts less vulnerable. For developers writing contracts for the existing Ethereum system, we build a symbolic execution tool called Oyente to find potential security bugs. Among 19, 336 existing Ethereum contracts, Oyente flags 8, 833 of them as vulnerable, including the TheDAO bug which led to a 60 million US dollar loss in June 2016. We also discuss the severity of other attacks for several case studies which have source code available and confirm the attacks (which target only our accounts) in the main Ethereum network.

1,232 citations

Trending Questions (1)
Why ethereum is important?

The provided paper does not explicitly mention why Ethereum is important.