Raisebox Faucet

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

Missing Event Emission for Daily Claim Limit Adjustment

Missing Event Emission for Daily Claim Limit Adjustment

Description

The adjustDailyClaimLimit function normally adjusts the dailyClaimLimit up or down by a specified amount, restricted to owner. However, it emits no event upon state change, obscuring off-chain tracking of limit modifications.

function adjustDailyClaimLimit(uint256 by, bool increaseClaimLimit) public onlyOwner {
if (increaseClaimLimit) {
dailyClaimLimit += by;
} else {
if (by > dailyClaimLimit) {
revert RaiseBoxFaucet_CurrentClaimLimitIsLessThanBy();
}
dailyClaimLimit -= by;
}
//@> no event emission for dailyClaimLimit state change
}

Risk

Likelihood:

  • Owner adjusts limit during high-usage periods.

  • Frequent tweaks without on-chain visibility.

Impact:

  • Off-chain monitors miss changes, risking claim failures.

  • Reduces transparency, hinders auditing of limit history.

Proof of Concept

function adjustDailyClaimLimit(uint256 by, bool increaseClaimLimit) public onlyOwner {
if (increaseClaimLimit) {
dailyClaimLimit += by;
} else {
if (by > dailyClaimLimit) {
revert RaiseBoxFaucet_CurrentClaimLimitIsLessThanBy();
}
dailyClaimLimit -= by;
}
//@> no event emission for dailyClaimLimit state change
}

POC Explanation: Not A test, It shows there's clearly no event emission here.

Recommended Mitigation

+event DailyClaimLimitAdjusted(uint256 newLimit, bool increased);
function adjustDailyClaimLimit(uint256 by, bool increaseClaimLimit) public onlyOwner {
if (increaseClaimLimit) {
dailyClaimLimit += by;
+ emit DailyClaimLimitAdjusted(dailyClaimLimit, true);
} else {
if (by > dailyClaimLimit) {
revert RaiseBoxFaucet_CurrentClaimLimitIsLessThanBy();
}
dailyClaimLimit -= by;
+ emit DailyClaimLimitAdjusted(dailyClaimLimit, false);
}
}

Mitigation Key Points: Add DailyClaimLimitAdjusted event with new limit and direction. Emit post-adjustment. Enables off-chain indexing; no gas/performance hit.

Updates

Lead Judging Commences

inallhonesty Lead Judge 12 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.