The storage variable s_keeperRegistry
(declared in WeatherNftStore
and initialized in WeatherNft
) that is never used in any function, wasting gas during deployment and potentially indicating incomplete upkeep management functionality, which could lead to permanent loss of users' LINK tokens if upkeeps need to be canceled.
The Chainlink Automation system requires both a Registrar (to register upkeeps) and a Registry (to manage/cancel them) for full lifecycle support. However, the WeatherNft
contract initializes the Registry address (s_keeperRegistry
) without ever using it, while only leveraging the Registrar (s_keeperRegistrar
) to create upkeeps. This imbalance allows upkeep creation but prevents cancellation or management, risking permanently locked LINK tokens if upkeeps require termination.
(Key issues: Unused Registry, asymmetric functionality, financial risk.)
Likelihood:
Reason 1 The issue occurs whenever an NFT owner needs to cancel an upkeep (e.g., when they no longer want weather updates)
Reason 2 The issue occurs when the contract needs upgrading or replacing, as the existing upkeeps cannot be properly terminated
Impact:
Impact 1 Users' LINK tokens remain locked in upkeeps with no cancellation mechanism
Impact 2 Upkeeps continue to execute and consume LINK tokens even if no longer desired
The WeatherNft
contract stores the Chainlink Automation Registry address (s_keeperRegistry
) but never uses it.
This means there's no function to cancel automated weather updates (upkeeps). As a result, LINK tokens deposited by users for these upkeeps become permanently locked in the Chainlink system, with no way for the user or contract owner to recover them through the WeatherNft
contract.
Add two event in the WeatherNftStore
contract:
Implement proper upkeep cancellation functionality using the s_keeperRegistry
address in the WeatherNft
contract:
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.