The emergence of the Ethereum blockchain and the rise of Turing-complete smart contracts have led to the creation of new solutions for ensuring different kinds of termination. Indeed, non-termination of a smart-contract execution within the blockchain network may have critical consequences, ranging from slow performance to a complete denial of service in the worst scenarios. Furthermore, smart contracts lack a global access-control mechanism and may be executed indefinitely over time, even after they have exhausted their purposes. Therefore, this requires, in some cases, developing solutions implementing “soft” and “hard” terminations—such as pausable, interruptions, and kill-switch mechanisms—as well as providing safe termination guarantees. In addition, termination is even more crucial when we consider legal aspects of smart contracts, including compliance with laws and regulations, such as the smart contract requirements proposed by the European Union Data Act.
In this paper, we explore several mechanisms to ensure various kinds of termination in Ethereum, the most widely used blockchain. Moreover, we investigate similar mechanisms for traditional programming languages that can be applied to smart contracts in the blockchain context. The primary purpose of this study is to fill the gap caused by the lack of standards for these mechanisms and the emerging solutions typically proposed by practitioners.