Skip to content
Business logic Audit finding Intermediate

Oracle callback timing vulnerability causes jackpot prize loss

The reward calculation uses the current timestamp at callback time rather than the time the spin was started, so a spin begun in the final campaign week can be processed after the campaign ends. If that spin wins the jackpot, the prize lookup returns zero and the user receives nothing.

KlosMitSoss Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

51218 sc high oracle callback timing vulnerability causes jackpot prize loss

Submitted on Aug 1st 2025 at 01:25:02 UTC by @KlosMitSoss for Attackathon | Plume Network

Description

Brief/Intro

When a callback from the Supra Router is executed, the current week is calculated based on the current timestamp rather than when the spin was initiated. This creates a timing vulnerability where users can start a spin during an active campaign, but the callback executes after the campaign has ended. When such delayed spins win the jackpot, users receive zero rewards despite legitimately winning and paying the spin fee.

Vulnerability Details

Users who initiate spins in the final weeks of the campaign risk losing legitimately won jackpots due to oracle callback delays beyond their control. The vulnerability occurs in the handleRandomness() function:

Solidity
function determineReward(uint256 randomness, uint256 streakForReward) internal view returns (string memory, uint256) {
    ... ...
    uint8 weekNumber = uint8(getCurrentWeek()); // Uses current timestamp, not spin initiation time
    
    if (probability < jackpotThreshold) {
        return ("Jackpot", jackpotPrizes[weekNumber]); // Returns 0 for weeks > 11
    }
    ... ...
}

These delays cannot be controlled and will lead to unfair situations for users that didn't do anything wrong and started their spin during the campaign.

To mitigate this, consider using the timestamp of the startSpin() call such that the current week only relies on the user and not on the delay between the two calls.

Impact Details

The won jackpot cannot be claimed even though the user started the spin while the campaign was ongoing. This leads to users losing legitimately won jackpots which are currently worth up to 100,000 PLUME tokens.

References

Code references are provided throughout the report.

Proof of Concept

{% stepper %} {% step %}

Step

Alice calls startSpin() in week 11 of the campaign, which is the last valid week (https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/plume/src/spin/Spin.sol#L174-L195). {% endstep %}

{% step %}

Step

The callback is executed in week 12, meaning the campaign has already ended. Alice wins the jackpot. {% endstep %}

{% step %}

Step

In handleRandomness(), determineReward() is called. Inside this function, the week number is calculated based on the current timestamp, not the timestamp of the startSpin() call (https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/plume/src/spin/Spin.sol#L285-L286). {% endstep %}

{% step %}

Step

This week number is used to retrieve the jackpot prize for the week (https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/plume/src/spin/Spin.sol#L293). However, since the week number is greater than 11 and the campaign only lasts 12 weeks (weeks 0-11), the jackpot prize for week 12 will be 0. The following comment also confirms this: https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/plume/src/spin/Spin.sol#L451 {% endstep %}

{% step %}

Step

As a result, Alice wins the jackpot but cannot claim anything, even though she submitted the spin on time while the campaign was ongoing. {% endstep %} {% endstepper %}

The original report as published on Immunefi, by KlosMitSoss. Images and videos are our own copies; raw HTML is shown as text. View it on Immunefi.

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

The reward function derives the campaign week from the current block timestamp at callback execution instead of storing and using the timestamp of the original startSpin call.

Impact

A user who legitimately wins the jackpot from a spin started during the campaign could receive zero rewards, losing a prize worth up to 100,000 PLUME tokens.

What the attacker needed

Spin started in the final campaign week; oracle callback delayed until after campaign end; winning spin

The fix

The week number should be derived from the timestamp of the startSpin call, stored at spin initiation, rather than from the callback time.

How it was found

  1. Alice calls startSpin in week 11, the last valid week of the campaign.
  2. The oracle callback executes in week 12, after the campaign has ended, and Alice wins the jackpot.
  3. handleRandomness calls determineReward, which calculates the week number from the current timestamp.
  4. That week number is used to look up the jackpot prize, but week 12 has a prize of zero.
  5. Alice cannot claim anything despite having spun while the campaign was ongoing.

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 pays to spin a prize wheel during a limited-time campaign. The result is decided later by an outside service, and the code checks which week it is when that answer arrives, not when the user spun. If the answer arrives after the campaign has finished, a winning spin is paid zero.

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.

More by KlosMitSoss

View all

25 more disclosed reports, best first.

More from Plume Network

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.