arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.05827cs.SE
收藏

SSR: 通过定义和检测DeFi质押中的逻辑缺陷来保障质押奖励

SSR: Safeguarding Staking Rewards by Defining and Detecting Logical Defects in DeFi Staking

Sun Yat-sen University(中山大学);Harbin Institute of Technology(哈尔滨工业大学);Peng Cheng Laboratory(鹏城实验室)

Zewei Lin, Jiachi Chen, Jingwen Zhang, Zexu Wang, Yuming Feng, Weizhe Zhang, Zibin Zheng

AI总结:

SSR通过定义和检测DeFi质押中的逻辑缺陷,提高质押奖励的安全性,检测出22.24%的合同存在缺陷

摘要:

去中心化金融(DeFi)质押是DeFi生态系统中最突出的应用之一,其中DeFi项目允许用户在平台上质押代币,并向参与者发放额外的代币作为奖励。然而,DeFi质押中的逻辑缺陷可能使攻击者通过操纵奖励金额、重复声称奖励或进行其他恶意行为来获取不应得的奖励。为了缓解这些威胁,我们进行了首次研究,专注于定义和检测DeFi质押中的逻辑缺陷。通过分析64起安全事件和144份审计报告,我们识别出六种不同的逻辑缺陷类型,每种都配有详细的描述和代码示例。基于这项实证研究,我们开发了SSR(Safeguarding Staking Reward)静态分析工具,旨在检测DeFi质押合同中的逻辑缺陷。SSR利用大型语言模型(LLM)提取质押逻辑的基本信息,并构建一个DeFi质押模型。然后通过分析该模型和相关语义特征来识别逻辑缺陷。我们基于已知的安全事件和审计报告构建了真实数据集来评估SSR的有效性。结果表明,SSR实现了总体精确度为92.31%、召回率为87.92%、F1分数为88.85%。此外,为了评估逻辑缺陷在现实世界智能合约中的普遍性,我们编译了一个大规模的15,992个DeFi质押合同的数据集。SSR检测到其中3,557(22.24%)个合同至少包含一个逻辑缺陷。

英文摘要:

Decentralized Finance (DeFi) staking is one of the most prominent applications within the DeFi ecosystem, where DeFi projects enable users to stake tokens on the platform and reward participants with additional tokens. However, logical defects in DeFi staking could enable attackers to claim unwarranted rewards by manipulating reward amounts, repeatedly claiming rewards, or engaging in other malicious actions. To mitigate these threats, we conducted the first study focused on defining and detecting logical defects in DeFi staking. Through the analysis of 64 security incidents and 144 audit reports, we identified six distinct types of logical defects, each accompanied by detailed descriptions and code examples. Building on this empirical research, we developed SSR (Safeguarding Staking Reward), a static analysis tool designed to detect logical defects in DeFi staking contracts. SSR utilizes a large language model (LLM) to extract fundamental information about staking logic and constructs a DeFi staking model. It then identifies logical defects by analyzing the model and the associated semantic features. We constructed a ground truth dataset based on known security incidents and audit reports to evaluate the effectiveness of SSR. The results indicate that SSR achieves an overall precision of 92.31%, a recall of 87.92%, and an F1-score of 88.85%. Additionally, to assess the prevalence of logical defects in real-world smart contracts, we compiled a large-scale dataset of 15,992 DeFi staking contracts. SSR detected that 3,557 (22.24%) of these contracts contained at least one logical defect.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑