Formalizing smart contract design patterns with DCR graphs
Mojtaba Eshghie, Wolfgang Ahrendt, Cyrille Artho, Thomas Hildebrandt, Gerardo Schneider
KTH Royal Institute of Technology · Chalmers University of Technology
Abstract
Abstract Smart contracts manage blockchain assets and embody business processes. Yet, mainstream languages lack explicit support for process concepts such as roles, action dependencies, and time constraints, leading to increased implementation complexity and analysis challenges. To address this, we use Dynamic Condition Response (DCR) graphs, a formal business process modeling language, to formalize the semantics of smart contract business logic. Modeling smart contracts in DCR graphs involves translating their underlying behavioral logic into a declarative visual model using DCR’s explicit constructs for events, roles, data, time, and inter-event relationships. Furthermore, we systematically model 15 common high-level smart contract design patterns , representing recurring solutions to business logic-level problems. These formalizations reduce ambiguity compared to informal descriptions and serve as language-independent specifications. We demonstrate the modeling process through three complete smart contract case studies that combine six design patterns. Our modeling methodology, formalizations, and correspondence between smart contract semantics and DCR graphs enable future automated analysis and verification.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- A Survey of Smart Contract Vulnerability Detection Based on Tree RepresentationInformation · 2026
- DMG: Dual-Stream multiple instance learning network for hunting vulnerable smart contracts via adaptive granularity fusionAutomated Software Engineering · 2026
- Detecting Vulnerabilities in EOSIO Smart Contracts via Joint Static and Dynamic Feature LearningACM Transactions on Software Engineering and Methodology · 2026
- Multimodal Graph Neural Networks and Evolutionary Knowledge Fusion for Secure and Explainable Governance in Intelligent IoT Interactive Media Systems.Big data · 2026
- DECAAF: A Visualization Framework for Decentralized Applications AnalysisDistributed Ledger Technologies: Research and Practice · 2026
- Enabling High-Throughput and Cost-Efficient Web 3.0 Services for Intelligent Sensing Networks via GNN-Enhanced Masked Deep Reinforcement Learning in Multi-Chain Systems.Sensors (Basel, Switzerland) · 2026