Method Article

Formal Verification of Blockchain Consensus Mechanisms Using Event-B

DOI:

10.3791/70193

May 8th, 2026

In This Article

Summary

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

This study presents a formal verification framework for blockchain consensus mechanisms and smart contracts, employing the Event-B method. This approach combines abstraction from representation, invariant-based proof, and temporal model checking with formal checks of safety, liveness, and resistance to double-spending before deployment.

Abstract

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

This study develops a formally grounded verification framework for blockchain consensus mechanisms and smart contract behavior using Event-B and the Rodin platform. Unlike prior approaches that rely primarily on simulation or case-based validation of isolated contracts, this work integrates Finite State Machine (FSM) abstraction, invariant-driven proof, refinement modeling, and temporal logic verification to analyze Proof of Work (PoW), Proof of Stake (PoS), and mechanisms for double-spending prevention. Solidity smart contracts are abstracted into FSMs and encoded as Event-B machines, enabling the formal specification of state transitions and safety constraints. Safety properties—including transaction uniqueness, state consistency, access control enforcement, and ledger invariant preservation—are verified through automatically generated proof obligations in Rodin. A total of 312 proof obligations were generated, of which 287 (92%) were automatically discharged, and 25 were proven interactively, resulting in complete invariant coverage. Liveness properties were specified in Computation Tree Logic (CTL) and validated via model checking, confirming deadlock freedom and eventual validator selection under PoS conditions. Double-spending prevention was formally enforced using state-consistent ledger modeling, where uniqueness constraints were proven across all reachable states. Protocol-level consensus logic for PoW and PoS was refined across three abstraction levels, ensuring block integrity and validator correctness through stepwise refinement. The results demonstrate that machine-checked proofs provide verifiable correctness guarantees beyond simulation-based evaluation, establishing a rigorous and reproducible verification pipeline that enhances correctness assurance and protocol-level robustness in blockchain systems.

Introduction

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

Blockchain technology has evolved into a distributed ledger paradigm that enables decentralized record-keeping without reliance on centralized authorities. By replicating ledger states across participating nodes and achieving agreement through consensus mechanisms, blockchain systems provide integrity, transparency, and tamper-resistance in open and adversarial environments. As described by Yaga et al.1, blockchain architecture combines cryptographic primitives, distributed consensus protocols, and peer-to-peer communication to ensure that validated transactions become computationally impractical to alter. Core consensus mechanisms such as Proo....

Access restricted. Please log in or start a trial to view this content.

Protocol

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

Study inputs
In this study, two Solidity smart contracts were used as verification inputs. The former was a Simple DAO-style contract that was used as a re-entrancy case study. The second one was a thinned-out ledger/state-transition contract designed to test contract-level constraints against double-spending. The original Solidity source code served as input to the abstraction and verification processes defined in this protocol. The general transformation process used for such contracts is illustrated in Figure 1, which shows the gradual transformation of the Solidity source code into the FSM, Event-B, and SMV models....

Access restricted. Please log in or start a trial to view this content.

Results

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

The findings of this work combine the formal verification products of Event-B and CTL model checking with executable information from blockchain simulation. The combination of these multi-layered outputs supports the validation of key behaviors in smart contracts, their consensus systems, and their ledger-soundness limitations within the limited exemplification of the design.

Environment setup and dependency verification
The execution environment used for model transformat.......

Access restricted. Please log in or start a trial to view this content.

Discussion

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

Formal and simulation-based verification demonstrate that the multi-layered verification system used in the given research was capable of verifying smart contract behavior, consensus-mechanism correctness, and the ledger-integrity property under the well-defined abstraction boundary. Event-B provides a mathematically grounded representation of safety properties, a state-flow, and re-entrancy-prevention logic in terms of invariants and refinement-based logic5,6. T.......

Access restricted. Please log in or start a trial to view this content.

Disclosures

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

The authors have no conflicts of interest to declare.

Materials

List of materials used in this article
NameCompanyCatalog NumberComments
Rodin Platform (v3.7.0)Rodin Team / Eclipse Foundationhttps://www.event-b.org/install.htmlEvent-B modeling, refinement, and proof-obligation generation and discharge
Event-B MethodUniversity of Southampton / Rodin Communityhttps://www.event-b.org/Formal modeling framework for invariant specification and refinement
nuXmv Model Checker (v2.0.0)FBK (Fondazione Bruno Kessler)https://nuxmv.fbk.eu/Symbolic model checking of CTL properties
Graphviz (v0.20.3)Graphviz Teamhttps://graphviz.org/FSM visualization and graph rendering
Python (v3.10.12)Python Software Foundationhttps://www.python.org/downloadsSimulation and execution environment
Web3.py (v7.6.0)Ethereum Foundation / Contributorshttps://web3py.readthedocs.io/Blockchain interaction and transaction simulation
NetworkX (v3.4.2)NetworkX Developershttps://networkx.org/Graph modeling of blockchain and FSM structures
Matplotlib (v3.8.0)Matplotlib Development Teamhttps://matplotlib.org/Plotting mining time and validator distributions
NumPy (v1.26.4)NumPy Developershttps://numpy.org/Numerical computations
Pandas (v2.2.2)Pandas Development Teamhttps://pandas.pydata.org/Data analysis and processing
OpenJDK 11Oracle / OpenJDK Communityhttps://openjdk.org/projects/jdk/11/Required runtime for Rodin platform
Ubuntu 22.04 LTSCanonical Ltd.https://ubuntu.com/downloadOperating system for all experiments
SolidityEthereum Foundationhttps://soliditylang.org/Smart contract source language used as input
nuXmv Input Language (SMV)FBKhttps://nuxmv.fbk.eu/documentation.htmlIntermediate model representation for CTL verification

References

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,
  1. Yaga, D., Mell, P., Roby, N., Scarfone, K. Blockchain Technology Overview. , National Institute of Standards and Technology. Gaithersburg, MD, USA. (2018).
  2. Wang, Y., et al. Formal specification and verification of smart contracts for Azure Blockchain. arXiv preprint. , (2019).
  3. Huth, M., Ryan, M.

Access restricted. Please log in or start a trial to view this content.

Reprints and Permissions

Request permission to reuse the text or figures of this JoVE article

Request Permission

Tags

Event B ModelingProof Of WorkProof Of StakeSmart Contract VerificationState Machine AbstractionInvariant ProofTemporal Logic VerificationDouble Spending Prevention

Related Articles