Under-optimized smart contracts devour your money

By Ting Chen, Xiaoqi Li, Xiapu Luo, Xiaosong Zhang. IEEE International Conference on Software Analysis, Evolution, and Reengineering, 2017

381 citations recorded by the source corpus.

Smart contracts are full-fledged programs that run on blockchains (e.g., Ethereum, one of the most popular blockchains). In Ethereum, gas (in Ether, a cryptographic currency like Bitcoin) is the execution fee compensating the computing resources of miners for running smart contracts. However, we find that under-optimized smart contracts cost more gas than necessary, and therefore the creators or users will be overcharged. In this work, we conduct the first investigation on Solidity, the recommended compiler, and reveal that it fails to optimize gas-costly programming patterns. In particular, we identify 7 gas-costly patterns and group them to 2 categories. Then, we propose and develop GASPER, a new tool for automatically locating gas-costly patterns by analyzing smart contracts' bytecodes. The preliminary results on discovering 3 representative patterns from 4,240 real smart contracts show that 93.5%, 90.1% and 80% contracts suffer from these 3 patterns, respectively.

Subfields: Computer Networks and Communications, Information Systems, Signal Processing

View Paper: https://www.semanticscholar.org/paper/78b7ebe5a9d47ddaaa31f876125fc6f791f68a2c

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Computer Networks and Communications

  1. Zibin Zheng
  2. Vincent Gramoli
  3. Muhammad Imran
  4. Yong Yuan
  5. Baowen Xu
  6. Michael Bailey
  7. Jian Weng
  8. Andrew K. Miller

In Information Systems

  1. Zibin Zheng
  2. Yong Yuan
  3. Feiyue Wang
  4. Vincent Gramoli
  5. Shuai Wang
  6. Petar Tsankov
  7. Hongning Dai
  8. Maher Alharby

In Signal Processing

  1. Zibin Zheng
  2. Xin Xia
  3. Michael Bailey
  4. Martin T. Vechev
  5. Xiaodong Lin
  6. Petar Tsankov
  7. Miltiadis Allamanis
  8. Marc Brockschmidt

Citations in the corpus