buyPresent does not check the Christmas timestamp that collectPresent enforces, so presents can be minted before the intended unlock date.The present distribution is meant to stay closed until Christmas. collectPresent (src/SantasList.sol:148) reverts with SantasList__NotChristmasYet before CHRISTMAS_2023_BLOCK_TIME.
buyPresent (src/SantasList.sol:172) mints the same present NFT but never references CHRISTMAS_2023_BLOCK_TIME, so the time lock is absent on this path. To be clear, this is not the README known issue, which states the date constant may be off by up to 24 hours. That known issue is a tolerance on the value of the constant. The finding here is that buyPresent performs no timestamp check at all, regardless of how the constant is set.
Likelihood:
Any holder of SantaTokens can call buyPresent before the unlock and mint a present.
Impact:
The timed-release invariant that keeps presents closed until Christmas is broken on the buyPresent path, so presents enter circulation before the advertised unlock.
The caller still pays tokens, so impact is limited. It is a Low severity issue.
collectPresent is shown reverting before Christmas, while buyPresent mints a present at the same pre-Christmas timestamp. The test passes.
Apply the same time gate to buyPresent that collectPresent already has.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.