Normally, LINK consumption should be protected with checks to avoid draining the balance.
Here, the contract allows continuous Chainlink Function requests via repeated performUpkeep()
calls or by registering with an extremely low deposit and zero heartbeat, triggering infinite upkeep.
Likelihood:
Will occur as soon as a malicious user interacts with low LINK deposits or calls performUpkeep() on many tokenIds.
No LINK threshold, rate-limit, or gas refund check exists to prevent abuse.
Impact:
LINK funds drained rapidly, making automation and Chainlink Functions unusable.
Service degradation for all users and blocked automation due to insufficient LINK.
Here's a scenario:
Attacker calls requestMintWeatherNFT(..., false, 0, 0)
multiple times, minting NFTs without depositing LINK.
Then, attacker repeatedly calls performUpkeep()
for each token, forcing the contract to send LINK-consuming Chainlink Function requests in a tight loop.
Over time, LINK is drained, and the contract can no longer serve real users.
Enforce a non-zero minimum heartbeat
value, e.g., require(heartbeat >= MIN_HEARTBEAT)
.
Enforce a minimum _initLinkDeposit
and validate registration success before accepting the request.
Consider using pull-payment model or user-funded LINK balance system where each NFT's upkeep and function calls are directly tied to user deposits.
Add a LINK balance check before sending Chainlink Function requests to prevent unexpected failure.
Optionally: track and cap LINK usage per user or token to contain abuse.
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.
This is informational. It is user's responsibility to provide correct input arguments. If the user provides incorrect arguments, it will lead to incorrect results, lost funds or failed transaction.
The `performUpkeep` function should be called by the Chainlink keepers or owners of the NFT. But there is no access control and anyone can call the function. This leads to malicious consumption of the user's LINK deposit.
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.