Contract may not have enough fund to cover refund
The contract owner can withdraw all ETH before the refund process is complete, leaving insufficient funds for refunds. Since the contract lacks a payable receive function, the owner cannot replenish it, so refunds may fail.
Submitted by gzeon, also found by AuditsAreUS, BowTiedWardens, pedroais, Ruhum, shenwilly, and teddav
Owner of the contract can call withdrawAll before the refund process is done to send all ETH to the vault. Since there are no payable receive function in ForgottenRunesWarriorsMinter, the owner won’t be able to replenish the contract for the refund process.
Proof of Concept
ForgottenRunesWarriorsMinter.sol#L616-L619
function withdrawAll() public payable onlyOwner {
require(address(vault) != address(0), 'no vault');
require(payable(vault).send(address(this).balance));
}
Recommended Mitigation Steps
Only allow owner to call withdrawAll after refund period.
cryppadotta (Forgotten Runes) confirmed and commented:
This is a great point. It would be annoying to accidentally do this and have to make a new contract for refunds.
Sponsor confirmed, submitted by contest judge.
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 withdrawAll function has no restriction to prevent withdrawal before the refund period ends, and the contract cannot receive ETH to replenish its balance.
What the attacker needed
Owner calls withdrawAll early; contract lacks payable receive function
The fix
The owner should only be allowed to call withdrawAll after the refund period has ended.
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 holds funds for refunds, but the owner can take all the money out early. If that happens, there is no way to put money back in, so people waiting for refunds might not get paid.
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.