In the Weather::fulfillMintRequest function, when a user requests automated weather updates ( _userMintRequest.registerKeeper is true), the contract attempts to register an upkeep with Chainlink Automation. However, the function does not verify that the registration was successful. The registerUpkeep() call can fail silently (e.g., due to insufficient LINK, invalid parameters, or issues with the registrar), returning an upkeepId of 0, which the contract stores without validation
Impact:
Users who pay for automated weather updates (both ETH for minting and LINK for automation) may not receive the service they paid for. The NFT will be minted successfully, but the weather will never update automatically. This creates a deceptive user experience where:
Users transfer LINK tokens that are essentially wasted
The NFT appears to have automation enabled but will never update
Users have no indication that the automation registration failed
If a user mints an NFT with automation and the registerUpkeep() call fails (returning 0), the contract will store an upkeepId of 0. Later, when Chainlink Automation attempts to execute updates, the corresponding upkeep won't exist, and the weather data will remain static.
Add validation to ensure the upkeep registration was successful
This ensures that if the automation registration fails, the entire transaction will revert, preventing users from paying for a service they won't receive and providing clear feedback about the failure.
This is informational. It is not required the keeper registration status to be checked, because if the `registerUpkeep` fails, the whole transaction will revert: https://github.com/smartcontractkit/chainlink/blob/b5e5f8bccfdc764ccba4ce8f87ce28223426c667/contracts/src/v0.8/automation/v2_1/AutomationRegistrar2_1.sol#L213
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.