The WeatherNft::requestMintWeatherNFT() function allows users to register for automated weather updates by setting _registerKeeper to true and providing LINK tokens via the _initLinkDeposit parameter. However, the function does not validate that the deposit amount is sufficient to fund Chainlink Automation operations. A user can pass any value, including zero, which would result in automation that fails immediately or after minimal usage due to insufficient funds.
Impact: NFTs registered with insufficient LINK deposits will have non-functioning automation. This creates several issues:
Users may believe their NFT will update automatically when it won't
System resources are wasted on registering automations that will fail
Users have no way to add more LINK later (no top-up function)
The contract's reputation could be damaged when automations fail unexpectedly
The function would accept this call, register an automation with Chainlink that has zero funding, and the automation would fail on the first attempt due to insufficient LINK
Define a minimum required LINK deposit as a contract constant
Additionally, consider implementing a function to allow users to add more LINK to their automation subscription when funds run low.
This is informational/invalid. If the LINK deposit is not enough, the function `registerUpkeep` will revert and it is responsibility of the user to provide the correct amount of `_initLinkDeposit`, if the user wants automated weather updates.
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.