EthereumZuri.ch 2025

Towards Formal Verification of Ethereum Smart Contracts: Enhancing Security and Reliability through Automated Techniques
01-31, 12:40–13:00 (Europe/Zurich), Beam Stage

Smart contracts on Ethereum power decentralized applications but operate in a trustless and immutable environment where even minor flaws can lead to catastrophic outcomes. Ensuring their correctness and security is paramount. Formal verification offers a rigorous approach to guarantee smart contracts meet their specifications, yet current methods face challenges such as complexity, scalability, and limited integration into developer workflows.

This talk introduces the Data-Aware Finite State Machine (DAFSM) model as a practical pathway toward the formal verification of Ethereum smart contracts. DAFSM models contracts as finite state machines with enriched capabilities for handling data, inter-contract communication, and modular transitions. This approach ensures safety properties, such as reentrancy prevention and role consistency, while supporting multi-contract verification for complex decentralized systems.

In addition to its existing capabilities, DAFSM serves as a foundation for a robust verification pipeline. Future developments include symbolic model checking for infinite data domains, plugins for integrated development environments (IDEs) like Remix and VS Code, and tools for analyzing and optimizing gas efficiency. The model also paves the way for privacy-preserving verification techniques, enabling contracts to leverage zero-knowledge proofs while maintaining formal guarantees.

Attendees will gain insights into the current state of formal verification, learn how DAFSM addresses critical challenges, and explore the potential of integrating verification seamlessly into smart contract development. This talk bridges the gap between theoretical rigor and practical application, offering a vision for building more secure and efficient Ethereum smart contracts.


Introduction
Smart contracts on Ethereum have revolutionized decentralized applications, but their execution in a trustless environment leaves no room for error. Vulnerabilities like reentrancy, arithmetic overflows, and logic flaws have led to substantial financial and reputational damages. Formal verification provides a systematic approach to rigorously ensure the correctness of smart contract behaviors against their specifications. However, existing verification techniques face challenges such as scalability, ease of use, and integration into mainstream development workflows.

This talk proposes our Data-Aware Finite State Machine (DAFSM) model as a robust framework for the formal verification of Ethereum smart contracts. By combining concepts from formal methods with practical engineering tools, our model lays a foundation for secure, reliable, and efficient smart contract development.

Proposed Model and Current Capabilities
Our DAFSM model captures the functional behavior of smart contracts by representing their states, transitions, and data updates as a finite state machine. It ensures:
- Modularity and Composability: Smart contracts and their interactions are modeled independently yet coherently, supporting inter-contract communication.
- Safety and Liveness Guarantees: The model ensures critical properties, such as prevention of reentrancy and empty-role conditions, by leveraging logical constraints over transitions.
- Static and Model Checking (MC): Our implementation integrates static analysis and automated model checking to verify transition correctness and guard consistency in single and multi-contract configurations.

Future Roadmap
While DAFSM provides a solid foundation, the following extensions are planned to enhance its usability and coverage:
1. Symbolic Model Checking (SMC): Incorporating symbolic execution to handle infinite data domains and complex predicates effectively.
2. Integration with IDEs: Developing plugins for widely-used development environments like Remix and Visual Studio Code, enabling real-time verification during coding.
3. Gas Optimization Analysis: Extending DAFSM to analyze and suggest optimizations for gas usage while ensuring correctness.
4. Privacy and Zero-Knowledge Extensions: Adding support for privacy-preserving techniques like zk-SNARKs to model and verify private smart contract interactions.

Takeaways
Participants will gain insight into how the DAFSM model addresses existing gaps in Ethereum smart contract verification. They will understand the current capabilities of the model, such as modular design and automated checks, and see the potential for future enhancements. This talk is not just about formal methods but about building practical bridges between theoretical rigor and developer-friendly tools. Together, we can ensure Ethereum smart contracts are secure, efficient, and ready for the demands of decentralized innovation.

I am a blockchain developer, researcher, and educator with a strong passion for formal methods and smart contract security. I am currently pursuing a PhD in Computer Science at the Gran Sasso Science Institute (GSSI) and the University of Camerino (UNICAM), where my work focuses on improving the reliability and safety of blockchain systems through formal verification techniques.

With a Master's degree in Software Engineering from Zhejiang Normal University and a Bachelor's degree in Computer Science from the University of Yaoundé I, I have gained extensive experience in blockchain development, Solidity-based decentralized applications (DApps), and secure protocol design. My research includes the creation of the Data-Aware Finite State Machine (DAFSM) model, which offers a formal approach to verify smart contracts while addressing challenges like multi-contract coordination and role consistency.

Beyond my research, I am passionate about teaching and sharing my knowledge, aiming to make blockchain technology more secure, accessible, and developer-friendly.