Skip to main content
QUICK REVIEW

[Paper Review] The Economics of Smart Contracts

Kirk Baird, Jeong Seong-Ho|arXiv (Cornell University)|Oct 23, 2019
Blockchain Technology Applications and Security21 references4 citations
TL;DR

This paper identifies a critical flaw in Ethereum's gas cost model, where execution times for key instructions like SLOAD grow disproportionately with blockchain length, despite fixed gas prices. Using extensive instrumentation across Ethereum's history, the authors propose a new performance-based gas model that incorporates block height to stabilize execution costs and eliminate growing inefficiencies in smart contract execution.

ABSTRACT

Ethereum is a distributed blockchain that can execute smart contracts, which inter-communicate and perform transactions automatically. The execution of smart contracts is paid in the form of gas, which is a monetary unit used in the Ethereum blockchain. The Ethereum Virtual Machine (EVM) provides the metering capability for smart contract execution. Instruction costs vary depending on the instruction type and the approximate computational resources required to execute the instruction on the network. The cost of gas is adjusted using transaction fees to ensure adequate payment of the network. In this work, we highlight the "real" economics of smart contracts. We show that the actual costs of executing smart contracts are disproportionate to the computational costs and that this gap is continuously widening. We show that the gas cost-model of the underlying EVM instruction-set is wrongly modeled. Specifically, the computational cost for the SLOAD instruction increases with the length of the blockchain. Our proposed performance model estimates gas usage and execution time of a smart contract at a given block-height. The new gas-cost model incorporates the block-height to eliminate irregularities in the Ethereum gas calculations. Our findings are based on extensive experiments over the entire history of the EVM blockchain.

Motivation & Objective

  • To investigate the growing discrepancy between actual execution time and gas costs in Ethereum's smart contract execution.
  • To identify that the current gas cost model fails to account for increasing execution time of core EVM instructions like SLOAD and SSTORE as the blockchain grows.
  • To develop a performance model that estimates gas usage and execution time based on block height.
  • To propose a revised gas cost model that incorporates block height to correct the inflation of execution time per unit gas.
  • To address the scalability and economic sustainability of Ethereum, especially under the upcoming proof-of-stake transition.

Proposed method

  • The authors performed macroscopic and microscopic instrumentation on the Parity Ethereum client to measure execution time and gas usage across the entire Ethereum blockchain up to block 8 million.
  • They analyzed the time-per-gas ratio for EVM instructions, focusing on SLOAD, SSTORE, and CALLCODE, and observed their execution times increase with block height.
  • A performance model was constructed to estimate gas consumption and execution time of smart contracts at any given block height.
  • The proposed model introduces a standard smart contract abstraction to simulate average contract behavior across different block heights.
  • The new gas cost model adjusts for block height by modifying the cost of state-accessing instructions, particularly SLOAD, to reflect actual resource usage.
  • The model was validated using empirical data collected from the Ethereum mainnet, showing consistent time growth for state-heavy operations.

Experimental results

Research questions

  • RQ1Why do execution times for EVM instructions like SLOAD increase over time despite fixed gas costs?
  • RQ2To what extent is the current Ethereum gas cost model misaligned with actual computational resource usage?
  • RQ3How does the size of the blockchain affect the performance of state-accessing operations in smart contracts?
  • RQ4Can a block height-aware gas cost model stabilize execution time per unit of gas and improve economic predictability?
  • RQ5What is the impact of this mispricing on the long-term scalability and security of Ethereum, especially under proof-of-stake?

Key findings

  • The execution time of the SLOAD instruction increases significantly with blockchain length, growing by up to 200% from block 1 million to block 8 million.
  • The SSTORE instruction also exhibits a measurable increase in execution time over time, though less pronounced than SLOAD.
  • The time-per-gas ratio for SLOAD is not constant and grows with block height, indicating a fundamental flaw in the current gas cost model.
  • The current gas cost model fails to account for the growing cost of state access, leading to disproportionate increases in execution time per unit of gas.
  • The proposed block height-aware gas model successfully stabilizes execution time per unit gas, eliminating the inflationary trend.
  • The study confirms that storage operations are the primary driver of performance degradation, while CPU usage correlates poorly with gas costs.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.