Normally, when a user calls requestMintWeatherNFT
The i contract expects a precise msg.value
equal to s_currentMintPrice
and optionally registers a Chainlink Keeper by transferring LINK tokens (s_link
) from the caller if _registerKeeper
is true
.
However, the function only enforces msg.value == s_currentMintPrice
, with no validation on the sufficiency of _initLinkDeposit
. This allows an attacker to pass the mint price and set _registerKeeper = true
, but submit 0 LINK or insufficient LINK, causing downstream Chainlink Keeper registration to fail — all without immediate reversion, because the function does not validate the result or even whether s_link.safeTransferFrom(...)
succeeds.
Likelihood:
This occurs whenever a malicious or careless user sets _registerKeeper = true
but provides a zero or very small _initLinkDeposit
.
Since safeTransferFrom
does not revert if allowance or balance is insufficient (if not properly handled via try/catch or return value), the LINK may not be transferred, yet the process proceeds.
Impact:
Chainlink Keeper registration will fail silently, leading to unfulfilled weather NFT functionality or automated upkeep mechanisms.
The system will record registerKeeper = true
, misleading any future logic or external processes that rely on that flag.
Wasted gas fees for both user and protocol, and potential trust degradation if minting fails or data is not fetched as expected.
Set MIN_LINK_DEPOSIT
based on Chainlink Keeper requirements (typically 5-10 LINK).
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.