Run-time monitoring has been one of the widely used techniques to realize robust smart contracts. In this paper, we show how we can abstract aspects of run-time monitoring through declarations of programming languages so that a majority of run-time monitoring code required for preserving the intended semantics of Solidity and thereby overcome vulnerabilities can be instrumented automatically at compile time itself. For illustrative purposes, we use Solidity and call the augmented Solidity language \(\textrm{Solidity}^{{\tiny D}}\) . \(\textrm{Solidity}^{{\tiny D}}\) syntactically is identical to Solidity except for declarations. The declarations preserve the intended semantics of various constructs and thus overcome a large number of vulnerabilities. We illustrate how a vast variety of vulnerabilities encountered in programming smart contracts in Solidity are overcome through declarations. Declarations envisaged in \(\textrm{Solidity}^{{\tiny D}}\) are similar to that used in classic concurrent programming languages and are easily visualizable by the programmer. Declarations lead to automatic introduction of run-time code at compilation time needed to satisfy various executional constraints needed to satisfy the semantic requirements of declarations. Further, we demonstrate that \(\textrm{Solidity}^{{\tiny D}}\) , can be automatically transformed to pure Solidity: thus, enabling an effective debugging at source level rather than at the byte or EVM level. Another important outcome of using \(\textrm{Solidity}^{{\tiny D}}\) , is that it can be effectively used for asserting coarse-grained properties of declarations. Such a feature leads to gaining trust in the usage of smart contracts.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Enhancing Robustness of Smart Contracts Through Declarations

  • R. K. Shyamasundar,
  • Snehal Borse,
  • Mohammad Ummair

摘要

Run-time monitoring has been one of the widely used techniques to realize robust smart contracts. In this paper, we show how we can abstract aspects of run-time monitoring through declarations of programming languages so that a majority of run-time monitoring code required for preserving the intended semantics of Solidity and thereby overcome vulnerabilities can be instrumented automatically at compile time itself. For illustrative purposes, we use Solidity and call the augmented Solidity language \(\textrm{Solidity}^{{\tiny D}}\) . \(\textrm{Solidity}^{{\tiny D}}\) syntactically is identical to Solidity except for declarations. The declarations preserve the intended semantics of various constructs and thus overcome a large number of vulnerabilities. We illustrate how a vast variety of vulnerabilities encountered in programming smart contracts in Solidity are overcome through declarations. Declarations envisaged in \(\textrm{Solidity}^{{\tiny D}}\) are similar to that used in classic concurrent programming languages and are easily visualizable by the programmer. Declarations lead to automatic introduction of run-time code at compilation time needed to satisfy various executional constraints needed to satisfy the semantic requirements of declarations. Further, we demonstrate that \(\textrm{Solidity}^{{\tiny D}}\) , can be automatically transformed to pure Solidity: thus, enabling an effective debugging at source level rather than at the byte or EVM level. Another important outcome of using \(\textrm{Solidity}^{{\tiny D}}\) , is that it can be effectively used for asserting coarse-grained properties of declarations. Such a feature leads to gaining trust in the usage of smart contracts.