Raffle sol implementation logic allows direct plume transfers but has no withdraw locking funds permanently
The Raffle implementation contract has a receive function that accepts native PLUME, but no way to withdraw it, so any PLUME sent directly to the implementation is permanently locked. The proxy blocks direct transfers, but the implementation does not.
Originally disclosed on Immunefi
- Disclosed after under an hour
49893 sc insight raffle sol implementation logic allows direct plume transfers but has no withdraw locking funds permanently
- Submitted on Jul 20th 2025 at 08:34:29 UTC by @blackgrease for Attackathon | Plume Network
- Report ID: #49893
- Report Type: Smart Contract
- Severity: Insight
- Target: https://github.com/immunefi-team/attackathon-plume-network/blob/main/plume/src/spin/Raffle.sol
- Impact: Permanent freezing of funds
Summary
The implementation of the Raffle contract can receive native PLUME via its receive function, but it lacks any functionality to withdraw those funds, resulting in permanently locked tokens.
The RaffleProxy correctly blocks direct transfers (reverting with ETHTransferUnsupported()), but the implementation contract does not, so any PLUME sent directly to the implementation will be unretrievable.
Details
Raffle implementation snippet:
//---snip----
// UUPS Authorization
function _authorizeUpgrade(
address newImplementation
) internal override onlyRole(ADMIN_ROLE) { }
// Allow contract to receive ETH
receive() external payable {
}
}
Documentation states that the Raffle system is not expected to handle funds because rewards are handled off-chain:
"Claiming a Prize(Multi-Winner aware): ... The actual delivery of the prize is handled off-chain."
Source: https://github.com/plumenetwork/contracts/blob/main/plume/SPIN.md#2-the-raffle-contract-raffle.sol
Because the implementation contract can accept native PLUME and has no withdrawal or forwarding logic, any PLUME transferred directly to the implementation will be permanently locked.
Impact
Permanent locking of funds: any PLUME sent to the implementation contract will be inaccessible, resulting in protocol-held value that cannot be used for operations or recovery.
Mitigation
{% stepper %} {% step %}
Revert direct transfers
Modify the receive function to revert on direct transfers, for example:
receive() external payable {
+ revert("Direct Plume Transfer");
}
{% endstep %}
{% step %}
Remove the receive function
Alternatively, remove the receive function entirely so the implementation cannot accept native PLUME.
{% endstep %}
{% endstepper %}
Proof of Concept
A runnable PoC demonstrates sending native PLUME to the implementation contract and shows that funds become locked with no withdrawal path.
Gist (PoC): https://gist.github.com/blackgrease/75dcdaf92e9d5482e3e4c4abc30c3d82
Run with:
forge test --mt testCanSendPlumeButNoWithdraw --via-ir -vvv
Walk-through:
- Sending PLUME to the
RaffleProxyreverts as intended. - Sending PLUME to the
Raffleimplementation succeeds (because of thereceivefunction). - The implementation has no withdrawal functionality; funds remain locked.
- Private Gist Link: https://gist.github.com/blackgrease/75dcdaf92e9d5482e3e4c4abc30c3d82
- The original report included a Foundry test and a screenshot of the stack trace from the test run.
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 implementation contract defines a payable receive function but has no withdrawal or forwarding logic, so native PLUME sent to it cannot be recovered.
Impact
Any PLUME sent directly to the implementation contract is permanently locked and cannot be used for operations or recovery.
What the attacker needed
PLUME sent directly to the implementation contract
The fix
The receive function should be changed to revert on direct transfers, or removed entirely, so the implementation cannot accept native PLUME.
How it was found
- Send PLUME to the RaffleProxy; the transfer reverts as intended.
- Send PLUME to the Raffle implementation; the transfer succeeds because of the receive function.
- Observe that the implementation has no withdrawal functionality, so the funds remain locked.
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 can have a special function that lets it accept cryptocurrency sent to it. This Raffle contract accepts PLUME but has no function to send it back out, so any PLUME sent directly to it is stuck forever. The proxy in front of it correctly rejects direct transfers, but the implementation behind it does not.
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.