The WeatherNFT contract receives ETH payments for NFT minting but lacks any withdrawal functionality. This design flaw could lead to permanent locking of ETH funds in the contract with no recovery mechanism.
The contract implements payable functions that accept ETH (through requestMintWeatherNFT
with msg.value
) but provides no method to withdraw accumulated ETH. This violates the basic principle that any contract receiving funds should have a controlled withdrawal mechanism.
Contract accepts ETH payments through requestMintWeatherNFT
function
No withdrawal function implemented despite inheriting from ConfirmedOwner
No emergency recovery mechanism for stuck funds
ETH balance tracking is implicit rather than explicit
Users send ETH to contract for NFT minting
Contract owner has no way to access accumulated funds
No fallback or recovery mechanism exists
Users mint NFTs by sending ETH to contract
ETH accumulates in contract balance
Contract owner cannot access funds for:
Project development
Revenue sharing
Operational expenses
Funds remain permanently locked in contract
Permanent loss of project funds
Inability to utilize revenue for project maintenance
Violation of financial transparency expectations
Potential legal/compliance issues regarding unaccessible funds
Loss of trust from investors and users
Deploy WeatherNFT contract
Mint multiple NFTs by sending ETH
Verify ETH balance grows in contract
Attempt to withdraw ETH as owner (will fail)
Confirm funds are permanently locked
Implement owner-controlled withdrawal function:
Add withdrawal event logging:
Consider implementing:
Withdrawal limits
Multi-signature requirements
Timelock for large withdrawals
Emergency pause functionality
Follow best practices:
Explicit ETH balance tracking
Regular fund sweeping
Transparent withdrawal policies
The contract collects funds for minting a WeatherNFT, but there is no function that allows the owner to withdraw these funds.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.