Some smart contracts violate decentralization principles by defining privileged accounts that manage other users' assets without permission, introducing centralization risks that have caused financial losses. Existing methods, however, face challenges in accurately detecting diverse centralization risks due to their dependence on predefined behavior patterns. In this paper, we propose JANUS, an automated analyzer for Solidity smart contracts that detects financial centralization risks independently of their specific behaviors. JANUS identifies differences between states reached by privileged and ordinary accounts, and analyzes whether these differences are finance-related. Focusing on the impact of risks rather than behaviors, JANUS achieves improved accuracy compared to existing tools and can uncover centralization risks with unknown patterns. To evaluate JANUS's performance, we compare it with other tools using a dataset of 540 contracts. Our evaluation demonstrates that JANUS outperforms representative tools in terms of detection accuracy for financial centralization risks . Additionally, we evaluate JANUS on a real-world dataset of 33,151 contracts, successfully identifying two types of risks that other tools fail to detect. We also prove that the state traversal method and variable summaries, which are used in JANUS to reduce the number of states to be compared, do not introduce false alarms or omissions in detection.
翻译:某些智能合约通过定义特权账户来未经许可管理其他用户的资产,违反了去中心化原则,引发了已造成经济损失的中心化风险。然而,现有方法由于依赖预定义的行为模式,在准确检测多样化的中心化风险方面面临挑战。本文提出JANUS,一种用于Solidity智能合约的自动化分析器,它能够独立于具体行为检测金融中心化风险。JANUS识别特权账户与普通账户所达状态之间的差异,并分析这些差异是否与金融相关。通过关注风险的影响而非行为本身,JANUS相比现有工具实现了更高的准确率,并能发现具有未知模式的中心化风险。为评估JANUS的性能,我们使用包含540份合约的数据集将其与其他工具进行比较。评估结果表明,在金融中心化风险的检测准确率方面,JANUS优于代表性工具。此外,我们在包含33,151份合约的真实数据集上对JANUS进行了评估,成功识别出其他工具未能检测到的两类风险。我们还证明了JANUS中用于减少待比较状态数量的状态遍历方法和变量摘要,不会在检测中引入误报或漏报。