The WeatherNft contract handles both ETH and LINK tokens as part of its core functionality for minting NFTs and registering upkeeps.
The contract lacks any mechanism to recover tokens that may get stuck in the contract, including tokens sent by mistake or LINK tokens remaining after operations are complete.
Likelihood: Medium
Users may mistakenly send ERC20 tokens to the contract address directly
LINK token balances might remain in the contract after upkeep cancellations or contract migrations
The contract does not handle refunds if a Functions request fails
Impact: Medium
Any tokens accidentally sent to the contract will be permanently locked
In case of contract upgrades or migrations, remaining LINK balances cannot be transferred to a new contract
Contract owner cannot recover valuable assets even in emergency situations
The contract accepts LINK tokens for Chainlink Automation registration:
However, there's no way to withdraw these tokens if:
The registration fails but tokens were already transferred
The upkeep is canceled later but LINK tokens remain in the contract
Other ERC20 tokens are accidentally sent to the contract
Implement a token recovery function that allows the owner to withdraw any ERC20 tokens:
Additionally, consider implementing a similar function for recovering native ETH that might be accidentally sent to the contract:
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.