Lune

PLDI2024Top-tier venue

Consolidating Smart Contracts with Behavioral Contracts

Guannan Wei, Danning Xie, Wuqi Zhang, Yongwei Yuan, Zhuo Zhang

Abstract

Ensuring the reliability of smart contracts is of vital importance due to the wide adoption of smart contract programs in decentralized financial applications. However, statically checking many rich properties of smart contract programs can be challenging. On the other hand, dynamic validation approaches have shown promise for widespread adoption in practice. Nevertheless, as part of the programming environment for smart contracts, existing dynamic validation approaches have not provided programmers with a notion to clearly articulate the interface between components, especially for addresses representing opaque contract instances. We argue that the "design-by-contract" approach should complement the development of smart contract programs. Unfortunately, there is limited linguistic support for it in existing smart contract languages.

In this paper, we design a Solidity language extension, ConSol, that supports behavioral contracts. ConSol provides programmers with a modular specification and monitoring system for both functional and latent address behaviors. The key capability of ConSol is to attach specifications to first-class addresses and monitor violations when invoking these addresses. We evaluate ConSol using 20 real-world cases, demonstrating its effectiveness in expressing critical conditions and preventing attacks. Additionally, we assess ConSol's efficiency and compare gas consumption with programs fixed with manually inserted assertions, showing that our approach introduces only marginal gas overhead. By separating specifications and implementations using behavioral contracts, ConSol assists programmers in writing more robust and readable smart contracts.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Ethainter: a smart contract security analyzer for composite vulnerabilities cites Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks
  • Demystifying Exploitable Bugs in Smart Contracts cites Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks
  • Demystifying Exploitable Bugs in Smart Contracts cites SMARTIAN: Enhancing Smart Contract Fuzzing with Static and Dynamic Data-Flow Analyses
  • SymGPT: Auditing Smart Contracts via Combining Symbolic Execution with Large Language Models cites Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks
  • SymGPT: Auditing Smart Contracts via Combining Symbolic Execution with Large Language Models cites Demystifying Exploitable Bugs in Smart Contracts
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Reasoning about External CallsSophia Drossopoulou, Julian Mackay, Susan Eisenbach, James NobleOOPSLA 2025
  2. SymGPT: Auditing Smart Contracts via Combining Symbolic Execution with Large Language ModelsShihao Xia, Mengting He, Shuai Shao, Tingting Yu et al.OOPSLA 2026

Builds on17

  1. Sereum: Protecting Existing Smart Contracts Against Re-Entrancy AttacksMichael Rodler, Wenting Li, Ghassan O. Karame, Lucas DaviNDSS 2019 · 298 citations
  2. SMARTIAN: Enhancing Smart Contract Fuzzing with Static and Dynamic Data-Flow AnalysesJaeseung Choi, Doyeon Kim, Soomin Kim, Gustavo Grieco et al.ASE 2021 · 164 citations
  3. Ethainter: a smart contract security analyzer for composite vulnerabilitiesLexi Brent, Neville Grech, Sifis Lagouvardos, Bernhard Scholz et al.PLDI 2020 · 163 citations
  4. Semantic Understanding of Smart Contracts: Executable Operational Semantics of SolidityJiao Jiao, Shuanglong Kan, Shang-Wei Lin, David Sanán et al.S&P 2020 · 82 citations
  5. Demystifying Exploitable Bugs in Smart ContractsZhuo Zhang, Brian Zhang, Wen Xu, Zhiqiang LinICSE 2023 · 80 citations

Related papers

  1. Declarative smart contractsHaoxian Chen, Gerald Whitters, Mohammad Javad Amiri, Yuepeng Wang et al.FSE 2022 · 14 citations
  2. Demystifying Loops in Smart ContractsBenjamin Mariano, Yanju Chen, Yu Feng, Shuvendu K. Lahiri et al.ASE 2020 · 20 citations
  3. Verifying Economic Security of Smart Contracts via Unintended ReturnYi Rong, Xupeng Li, Ronghui GuOOPSLA 2026
  4. A study of inline assembly in solidity smart contractsStefanos Chaliasos, Arthur Gervais, Benjamin LivshitsOOPSLA 2022 · 22 citations
  5. Verifying Declarative Smart ContractsHaoxian Chen, Lan Lu, Brendan Massey, Yuepeng Wang et al.ICSE 2024 · 2 citations
Dusk over the sea between two cliffs drawn in fine vertical lines