Eligible user loses jackpot
A user who starts a spin just before the end of Week 11 is eligible for a jackpot, but if the oracle callback arrives after Week 12 begins, the code uses the current week number to look up the jackpot prize, which does not exist for Week 12, so the user loses the jackpot even when the random result qualifies.
Originally disclosed on Immunefi
- Disclosed after under an hour
50275 sc high eligible user loses jackpot
Submitted on Jul 23rd 2025 at 09:04:01 UTC by @shadowHunter for Attackathon | Plume Network
- Report ID: #50275
- Report Type: Smart Contract
- Report severity: High
- Target: https://github.com/immunefi-team/attackathon-plume-network/blob/main/plume/src/spin/Spin.sol
- Impacts:
- Theft of unclaimed yield
Description
Brief/Intro
Any spin initiated before the start of Week 12 is eligible for the jackpot. However, if a user spins X seconds before the Week 12 cutoff but the Supra oracle callback arrives at—or after—the start of Week 12, the user does not receive the jackpot, even when the random result would otherwise qualify.
Vulnerability Details
See the Proof of Concept section below.
Impact Details
User will lose jackpot even when they were qualified.
Recommendation
Week should be calculated from the spin time and not the callback time.
Proof of Concept
{% stepper %} {% step %}
Scenario setup
- User A calls
startSpin()just before the end of Week 11, specifically at:
time = start of Week 12 - X seconds
- This makes User A eligible for a jackpot, since jackpot prizes are configured as:
jackpotPrizes[0] ... jackpotPrizes[11]
{% endstep %}
{% step %}
Oracle delay
- The Supra oracle processes the random number after some delay
Y, where:
Y > X
- The callback therefore happens during Week 12. {% endstep %}
{% step %}
Outcome and conditions
- Assume:
- The returned random number qualifies for a jackpot.
- The user has the required streak.
- Still, the user won't receive a jackpot because
weekNumberis now 12 and:
jackpotPrizes[12] // does not exist
{% endstep %}
{% step %}
Relevant code snippet
if (probability < jackpotThreshold) {
return ("Jackpot", jackpotPrizes[weekNumber]);
}
Problem: Even though the spin was valid during Week 11, the reward is denied due to the delayed callback pushing weekNumber into Week 12, where no jackpot prize is configured.
{% endstep %}
{% endstepper %}
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the code calculates the week number at the time the oracle callback is processed rather than at the time the spin was started, so a delayed callback can push the lookup into a week with no jackpot prize configured.
Impact
A user who was eligible for a jackpot could lose it if the oracle callback is delayed past the start of the next week.
What the attacker needed
Spin initiated just before week change; oracle callback delayed past week start; random result qualifies for jackpot; user has required streak
How it was found
- User A calls startSpin() just before the end of Week 11, at a time X seconds before Week 12 starts.
- The Supra oracle processes the random number after a delay Y, where Y > X, so the callback happens during Week 12.
- The returned random number qualifies for a jackpot and the user has the required streak.
- The user does not receive a jackpot because weekNumber is now 12 and jackpotPrizes[12] does not exist.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A user plays a game where they can win a jackpot if they spin at the right time. The game asks an outside service for a random number, and that answer can be slow. If the answer comes back after the week has changed, the game looks up the prize for the new week, finds nothing, and the user gets no jackpot even though they should have won.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.