52986 sc high jackpot check uses previous streakcount instead of current computed streak denying jackpot on first eligible day
Description
Brief / Intro
Vulnerability Details
uint256 currentSpinStreak = _computeStreak(user, block.timestamp, true);
...
if (isJackpot) {
uint256 currentWeek = getCurrentWeek();
if (currentWeek == lastJackpotClaimWeek) { ... }
else if (userDataStorage.streakCount < (currentWeek + 2)) {
// ↓ uses previous stored streak instead of currentSpinStreak
rewardCategory = "Nothing"; rewardAmount = 0;
} else {
// award jackpot
}
}
...
userDataStorage.streakCount = currentSpinStreak; // updated only after the checkImpact Details
Proof of Concept
References
Previous52290 sc medium deposit function in tellerwithmultiassetsupportpredicateproxy is completely broken due to wrong share lockNext52576 sc high flaw in raffle determinereward in jackpot prize calculation after week 12
Was this helpful?