The unstake
function is designed to calculate rewards based on the number of full days a Rapper has been staked. The specific issue is that the code uses integer division, which rounds down the result of staked_duration / 86400
. This means any staking duration less than a full 24 hours (86,400 seconds) will be calculated as 0 days, and the user will not receive any rewards or stat improvements for that time.
Likelihood:
This will occur whenever a user unstakes their NFT before a full 24-hour period has elapsed
Users are likely to test the staking feature with short durations, leading to this bug being easily discovered.
Impact:
Users are not rewarded for their time, leading to a poor user experience.
This can create a sense of unfairness and lead to a lack of trust in the protocol.
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.