The buyPresent() function does not verify that it's Christmas time before allowing present purchases, while collectPresent() enforces this restriction. This creates an inconsistency where users can buy presents any time of year but can only collect free presents on Christmas.
collectPresent() enforces Christmas time check with revert
buyPresent() has no such time restriction
Inconsistency suggests potential oversight in design
Likelihood:
Anyone can call buyPresent() anytime
No conditions prevent year-round usage
Inconsistency exists in current code
Impact:
Timing restriction bypass - users can get presents before Christmas
Inconsistent protocol behavior between functions
Potential design violation if Christmas timing is important
Low actual damage - doesn't break core functionality or steal funds
This test shows that buyPresent() works before Christmas while collectPresent() reverts, demonstrating the inconsistency.
Add time check to buyPresent() if Christmas-only timing is intended, or document the intentional difference.
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.