Raisebox Faucet

First Flight #50
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Impact: low
Likelihood: high
Invalid

Missing event in adjustDailyClaimLimit()

Description

Missing event emission when changing dailyClaimLimit.

Risk

Likelihood: High

  • No event emitting every time the claim limit is changed.

Impact: Low

  • Changing limit is important owner action that must be easy to monitor.

Proof of Concept

No event is emitted in the adjustDailyClaimLimit function

function adjustDailyClaimLimit(uint256 by, bool increaseClaimLimit) public onlyOwner {
if (increaseClaimLimit) {
dailyClaimLimit += by;
} else {
if (by > dailyClaimLimit) {
revert RaiseBoxFaucet_CurrentClaimLimitIsLessThanBy();
}
dailyClaimLimit -= by;
}
<@ Should emit event when changing claim limit
}

Recommended Mitigation

Add event in the function.

/// in the events declaration section
+ event RaiseFaucetBox_ClaimLimitChanged(uint256 newLimit);
///
function adjustDailyClaimLimit(uint256 by, bool increaseClaimLimit) public onlyOwner {
if (increaseClaimLimit) {
dailyClaimLimit += by;
} else {
if (by > dailyClaimLimit) {
revert RaiseBoxFaucet_CurrentClaimLimitIsLessThanBy();
}
dailyClaimLimit -= by;
}
+ emit RaiseFaucetBox_ClaimLimitChanged(dailyClaimLimit);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 15 days ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.