Smart contracts codify real-world transactions and automatically execute the terms of the contract when predefined conditions are met. This paper proposes SmartML, a modeling language for smart contracts that is platform independent and easy to comprehend. We detail its formal semantics and type system with a focus on its role in addressing security vulnerabilities. We show along a case study, how SmartML contributes to the prevention of reentrancy attacks, illustrating its efficacy in reinforcing the reliability and security of smart contracts within decentralized systems.
翻译:智能合约将现实世界中的交易进行编码,并在满足预设条件时自动执行合约条款。本文提出一种平台无关且易于理解的智能合约建模语言SmartML。我们详细阐述了其形式化语义与类型系统,重点关注其在应对安全漏洞方面的作用。通过案例研究,我们展示了SmartML如何有效预防重入攻击,从而证明其在增强去中心化系统中智能合约的可靠性与安全性方面的实际效能。