Skip to content
Business logic Audit finding Intermediate

Hardcoded supra subscription wallet can freeze spin

The Spin contract stores the admin address immutably and uses it as the client wallet for all Supra dVRF requests. If the Supra subscription wallet needs to be rotated, the contract cannot update the address, so future generateRequest calls revert and spins become impossible.

holydevoti0n Follow

Originally disclosed on Immunefi

Informational View original
  • Disclosed after under an hour

52221 sc insight hardcoded supra subscription wallet can freeze spin

Description

Brief / Intro

The admin address in the Spin contract is immutable and used as _clientWalletAddress for all Supra dVRF requests. If it ever needs to be changed, the contract can’t update it, so future generateRequest calls revert because the fixed address must stay whitelisted and funded.

Vulnerability Details

In generateRequest within the Spin contract the admin value is passed as the _clientWalletAddress:

https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/plume/src/spin/Spin.sol#L190

Solidity
// immutably set at initialise()
address public admin;                            // ← subscription wallet
...
uint256 nonce = supraRouter.generateRequest(
        callbackSignature,
        rngCount,
        numConfirmations,
        clientSeed,
        admin                     // ← _clientWalletAddress
);

Per Supra dVRF docs: https://docs.supra.com/dvrf/v2-guide

  • _clientWalletAddress must be “the client wallet address that is already registered with the Supra team”, i.e. the subscription owner that whitelists consumer contracts and funds the callback deposit.

The contract sets admin to msg.sender in initialize() and provides no setter. Because admin is effectively immutable after initialization, rotating the on-chain client wallet (the Supra subscription wallet) is impossible. If the external Supra subscription is switched to a different wallet, calls that use the hardcoded admin will revert.

Impact Details

Spins become permanently impossible as soon as the original Supra subscription (admin) wallet must be replaced with a new whitelisted and funded wallet.

Recommendation

Provide a governance-controlled function to update the admin address so the contract can use a new client wallet address in generateRequest. Ensure this setter is access-controlled (e.g., onlyOwner / onlyGovernance) and consider emitting an event on change.

{% hint style="warning" %} Make sure the new setter is protected by the appropriate access control and that change-of-admin processes are coordinated with Supra (so the new address is whitelisted and funded before switching). {% endhint %}

Proof of Concept

{% stepper %} {% step %}

Step

Once initialized, the Spin contract stores wallet A as admin. {% endstep %}

{% step %}

Step

Team registers and whitelists wallet A with Supra. {% endstep %}

{% step %}

Step

Rotation is needed (wallet A compromised or retired); team switches subscription to wallet B on Supra. {% endstep %}

{% step %}

Step

Spin contract still sends requests using wallet A (cannot change admin). Supra rejects the request because A is no longer valid, causing generateRequest to revert and spins to fail. {% endstep %} {% endstepper %}

The original report as published on Immunefi, by holydevoti0n. 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 admin address is set once during initialization and has no setter, making it impossible to change the client wallet address used for Supra dVRF requests.

Impact

Spins become permanently impossible if the original Supra subscription wallet must be replaced.

What the attacker needed

Supra subscription wallet needs rotation

The fix

A governance-controlled function should be added to update the admin address, with access control and an event.

How it was found

  1. The Spin contract is initialized with wallet A as admin.
  2. The team registers and whitelists wallet A with Supra.
  3. The team needs to rotate to wallet B and switches the Supra subscription.
  4. The Spin contract still uses wallet A, so Supra rejects requests and generateRequest reverts.

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 smart contract uses a fixed wallet address to pay for random number requests. If that wallet is ever replaced, the contract cannot use the new one, so the random number feature stops working.

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 holydevoti0n

View all

28 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.