The WeatherNft::requestMintWeatherNFT
function accepts an initLinkDeposit
parameter used for funding Chainlink Automation upkeep registrations. If the provided LINK deposit is too small, the keeper registration may fail or rapidly exhaust its balance, effectively causing a Denial of Service (DoS) condition for the NFT's automated weather updates. Additionally, any LINK transferred to the contract under these conditions becomes permanently locked and irrecoverable by both the user and the protocol.
The contract does not enforce a minimum bound on the initLinkDeposit
parameter.
A user can supply a minimal LINK deposit (e.g., 1 wei LINK
) insufficient for covering the operational costs of Chainlink Automation.
This minimal deposit leads to immediate depletion, causing the automated upkeep to become non-functional (DoS condition).
The LINK tokens deposited are permanently locked within the contract, as there is no refund mechanism.
Likelihood:
Users could inadvertently or maliciously set an extremely small initLinkDeposit
, easily achievable by user error or attacker manipulation.
Impact:
NFT's automatic updates permanently cease functioning, directly harming user experience and protocol functionality (DoS).
Deposited LINK tokens remain permanently inaccessible, resulting in a permanent loss of user funds.
The provided PoC demonstrates that supplying an overly small initLinkDeposit
prevents proper Chainlink keeper registration, causing NFT automation to fail permanently. The minimal LINK transferred remains locked in the contract, inaccessible by the depositor or protocol administrators.
User provides a minimal LINK deposit (1 wei LINK) when minting the NFT.
The mint request and initial LINK deposit transfer succeed.
The Chainlink Automation setup either fails or quickly exhausts the tiny balance.
Automated weather updates cease, creating a DoS scenario.
Deposited LINK remains locked indefinitely within the contract.
Manual Review
Foundry Unit Testing
Enforce Minimum LINK Deposit
Add a require
check within requestMintWeatherNFT
to ensure a sufficient minimum LINK deposit:
This ensures that upkeep registrations have enough LINK for proper operation, preventing both DoS conditions and permanent fund lock-ups.
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.