Weather Witness

First Flight #40
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: high
Valid

Locked-up Ether

Description: requestMintWeatherNFT collects msg.value == s_currentMintPrice on every call, but the contract provides no way to withdraw accumulated ETH.

Impact: All ETH paid by minters is locked in the contract. The owner cannot collect revenue or refund users in case of a problem.

Recommended Mitigation: Add a withdrawal function:

function withdraw() external onlyOwner {
payable(msg.sender).transfer(address(this).balance);
}
Updates

Appeal created

bube Lead Judge 4 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Lack of `withdraw` function

The contract collects funds for minting a WeatherNFT, but there is no function that allows the owner to withdraw these funds.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.