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

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Lin, Zewei, Chen, Jiachi, Zhang, Jingwen, Wang, Zexu, Feng, Yuming, Zhang, Weizhe, Zheng, Zibin
Format: Preprint
Publié: 2026
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866908755085492224
author Lin, Zewei
Chen, Jiachi
Zhang, Jingwen
Wang, Zexu
Feng, Yuming
Zhang, Weizhe
Zheng, Zibin
author_facet Lin, Zewei
Chen, Jiachi
Zhang, Jingwen
Wang, Zexu
Feng, Yuming
Zhang, Weizhe
Zheng, Zibin
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2601_05827
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle SSR: Safeguarding Staking Rewards by Defining and Detecting Logical Defects in DeFi Staking
Lin, Zewei
Chen, Jiachi
Zhang, Jingwen
Wang, Zexu
Feng, Yuming
Zhang, Weizhe
Zheng, Zibin
Software Engineering
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.
title SSR: Safeguarding Staking Rewards by Defining and Detecting Logical Defects in DeFi Staking
topic Software Engineering
url https://arxiv.org/abs/2601.05827