Skip to main content
QUICK REVIEW

[Paper Review] Formal Specification and Verification of Smart Contracts for Azure Blockchain

Shuvendu K. Lahiri, Shuo Chen|arXiv (Cornell University)|Dec 20, 2018
Blockchain Technology Applications and SecurityComputer Science17 references55 citations
TL;DR

This paper presents VeriSol, a formal verifier for Solidity smart contracts that ensures semantic conformance to a state machine model with access-control policies. It automates verification across all smart contracts in Azure Blockchain Workbench, uncovering and enabling fixes for previously unknown bugs, after which full verification succeeded for all contracts.

ABSTRACT

Ensuring correctness of smart contracts is paramount to ensuring trust in blockchain-based systems. This paper studies the safety and security of smart contracts in the \emph{Azure Blockchain Workbench}, an enterprise Blockchain-as-a-Service offering from Microsoft. As part of this study, we formalize \emph{semantic conformance} of smart contracts against a state machine model with access-control policy and develop a highly-automated formal verifier for Solidity that can produce proofs as well as counterexamples. We have applied our verifier {\sc VeriSol} to analyze {\it all} contracts shipped with the Azure Blockchain Workbench, which includes application samples as well as a governance contract for Proof of Authority (PoA). We have found previously unknown bugs in these published smart contracts. After fixing these bugs, {\sc VeriSol} was able to successfully perform full verification for all of these contracts.

Motivation & Objective

  • To ensure correctness and trust in enterprise blockchain systems by formally verifying smart contracts in Azure Blockchain Workbench.
  • To define and enforce semantic conformance of smart contracts against a state machine model with access-control policies.
  • To develop an automated formal verification tool, VeriSol, capable of generating proofs and counterexamples for Solidity contracts.
  • To analyze all smart contracts shipped with Azure Blockchain Workbench, including governance and application samples, for previously undetected vulnerabilities.

Proposed method

  • Formalizing smart contract behavior using a state machine model extended with access-control policies to capture security semantics.
  • Designing VeriSol as a highly-automated formal verifier for Solidity that integrates symbolic execution and theorem proving.
  • Applying the verifier to analyze all smart contracts included in the Azure Blockchain Workbench distribution.
  • Generating formal proofs of correctness or counterexamples when verification fails, enabling precise bug localization.
  • Using the toolchain to validate both application-level contracts and a Proof of Authority governance contract.
  • Iteratively fixing discovered bugs and re-verifying to confirm resolution and full correctness.

Experimental results

Research questions

  • RQ1Can a formal verification approach effectively detect semantic and security bugs in enterprise-grade smart contracts deployed on Azure Blockchain Workbench?
  • RQ2How effective is automated verification in ensuring conformance to a state machine model with access-control constraints in real-world smart contracts?
  • RQ3What kinds of previously undetected bugs exist in production-ready smart contracts from a major cloud provider’s blockchain offering?
  • RQ4Can automated formal verification be scaled to cover all contracts in a production blockchain platform without manual intervention?
  • RQ5To what extent can formal verification be used to achieve full verification after fixing discovered vulnerabilities?

Key findings

  • VeriSol successfully identified previously unknown bugs in all smart contracts distributed with Azure Blockchain Workbench, including both application samples and the PoA governance contract.
  • After fixing the reported bugs, VeriSol was able to perform full formal verification for every contract in the distribution.
  • The formal verification process uncovered semantic inconsistencies and access-control violations that were not detected by prior testing or code review.
  • The results demonstrate that even production-ready smart contracts from enterprise platforms can contain subtle, exploitable flaws.
  • The success of VeriSol in achieving full verification post-fix confirms the effectiveness of its automated verification pipeline.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.