The lastDripDay and lastFaucetDripDay variables default to 0, causing incorrect reset logic on the first day of operation.
Expected behavior: Day tracking variables should be initialized to current day in constructor.
The bug leaves variables at 0 (lines 26, 28), causing unnecessary resets on first claim.
Likelihood:
This issue occurs on every single deployment of the contract without exception
The first user to interact with the faucet will trigger the incorrect reset logic immediately
Impact:
Inconsistent behavior between the first day of operation and all subsequent days, potentially causing confusion in tracking and analytics
Could allow the possibility of more claims or ETH drips than intended on the deployment day due to unnecessary resets
This test verifies that day tracking variables are not initialized properly. It deploys the contract, checks the initial values, and demonstrates how the first claim unnecessarily triggers a reset because the comparison currentDay > 0 will always be true.
Initialize variables in constructor. Setting variables to current day at deployment ensures consistent behavior from the start.
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.