Normal behavior: When a staker unstakes their rapper NFT, the contract should update the token’s stats according to the staking period and return the NFT and rewards to the original staker. Ownership metadata in RapperStats
should remain accurate.
Issue: The unstake
function does not verify that the rapper_token
parameter matches the token actually staked by the staker. This allows a staker to pass a different token ID. The call to transfer_record_only
then updates stats and ownership metadata for a token the staker never staked, potentially minting rewards incorrectly.
Mitigating factor: The function requires both the staker’s and module_owner
’s signatures, which reduces the risk because a staker cannot unilaterally call unstake
for an arbitrary token without module_owner approval.
Likelihood:
Without module_owner
, any staker could pass an arbitrary token ID to unstake
.
With module_owner
required, risk is reduced but still exists if module_owner
logic is misused or bypassed.
Impact:
Stats and owner_counts
tables become inaccurate, misrepresenting NFT ownership.
Stakers could receive rewards (CRED
tokens) for NFTs they never staked if the module_owner approves incorrect calls.
Summary: Storing and checking the token ID ensures the staker can only unstake the exact token they staked, making transfer_record_only
safe and rewards accurate. The module_owner
signature reduces the risk but does not fully eliminate it.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.