Raisebox Faucet

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

State change without event.

State change without event.

Description

  • There are state variable changes in the RaiseBoxFaucet.sol::adjustDailyClaimLimit() function but no event is emitted.

  • Explain the specific issue or problem in one or more sentences

// This function does not emit an event,
// so it is difficult to track changes in the value of `dailyClaimLimit` off-chain.
function adjustDailyClaimLimit(uint256 by, bool increaseClaimLimit) public onlyOwner {
if (increaseClaimLimit) {
dailyClaimLimit += by;
} else {
if (by > dailyClaimLimit) {
revert RaiseBoxFaucet_CurrentClaimLimitIsLessThanBy();
}
dailyClaimLimit -= by;
}
}

Risk

Likelihood:

This issue uccurs every time the RaiseBoxFaucet.sol::adjustDailyClaimLimit() is executed.

Impact:

RaiseBoxFaucet.sol::adjustDailyClaimLimit() does not emit an event, so it is difficult to track changes in the value of dailyClaimLimit off-chain.

Recommended Mitigation

Consider emitting an event to enable offchain indexers to track the changes.

// -----------------------------------------------------------------------
// EVENTS
// -----------------------------------------------------------------------
// . . . .
event Claimed(address indexed user, uint256 amount);
event MintedNewFaucetTokens(address indexed user, uint256 amount);
+event DailyClaimLimitAdjusted(uint256 indexed dailyClaimLimit);
// . . . .
function adjustDailyClaimLimit(uint256 by, bool increaseClaimLimit) public onlyOwner {
if (increaseClaimLimit) {
dailyClaimLimit += by;
} else {
if (by > dailyClaimLimit) {
revert RaiseBoxFaucet_CurrentClaimLimitIsLessThanBy();
}
dailyClaimLimit -= by;
}
+ emit DailyClaimLimitAdjusted(dailyClaimLimit);
}
Updates

Lead Judging Commences

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