Smart contracts are regarded as one of the most promising and appealing notions in blockchain technology. Their self-enforcing and event-driven features make some online activities possible without a trusted third party. Nevertheless, problems such as miscellaneous attacks, privacy leakage, and low processing rates pre-vent them from being widely applied. Various schemes and tools have been proposed to facilitate the construction and execution of secure smart contracts. However, a comprehensive survey for these proposals is absent, hindering new researchers and developers from a quick start. This paper surveys the literature and online resources on smart contract construction and execution over the period 2008-2020. We divide the studies into three categories: (1) design paradigms that give examples and patterns on contract construction, (2) design tools that facilitate the development of secure smart contracts, and (3) extensions and alternatives that improve the privacy or efficiency of the system. We start by grouping the relevant construction schemes into the first two categories. We then review the execution mechanisms in the last category and further divide the state-of-the-art solutions into three classes: private contracts with extra tools, off-chain channels, and extensions on core functionalities. Finally, we summarize several challenges and identify future research directions toward developing secure, privacy-preserving, and efficient smart contracts.
翻译:智能合同被认为是链链技术中最有希望和最有吸引力的概念之一,其自我强化和事件驱动的特征使得一些在线活动在没有信任的第三方的情况下成为可能。然而,诸如杂项袭击、隐私泄漏和低处理率等问题被广泛采用。已经提出了各种计划和工具,以促进建造和执行可靠的智能合同。然而,对这些提案的全面调查却不存在,阻碍了新的研究人员和开发商的快速启动。本文对2008-2020年期间智能合同建设和执行方面的文献和在线资源进行了调查。我们将这些研究分为三类:(1) 设计模式,提供合同建设方面的范例和模式;(2) 设计工具,便利开发可靠的智能合同;(3) 扩展和替代方法,改善系统的隐私或效率。我们首先将相关施工计划分为头两类。我们随后审查最后一类的执行机制,并将最新解决方案进一步分为三类:拥有额外工具的私人合同、离链渠道以及核心功能的扩展。最后,我们总结了几项挑战,并确定了未来研究方向,以开发智能隐私的高效合同。