Raisebox Faucet

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

Missing Event Emission in `BurnFaucetTokens`

Missing Event Emission in BurnFaucetTokens

Description

The function BurnFaucetTokens update the token reserve of the protocol but doesn't emit an event to signal this change.

function burnFaucetTokens(uint256 amountToBurn) public onlyOwner {
require(amountToBurn <= balanceOf(address(this)), "Faucet Token Balance: Insufficient");
// transfer faucet balance to owner first before burning
// ensures owner has a balance before _burn (owner only function) can be called successfully
_transfer(address(this), msg.sender, balanceOf(address(this)));
_burn(msg.sender, amountToBurn);
}

Risk

The lack of event emission makes it difficult for off-chain systems, indexers, and users to track critical changes.

Recommended Mitigation

Add this emit event :

event SepEthDripped(address indexed claimant, uint256 amount);
event SepEthDripSkipped(address indexed claimant, string reason);
event SepEthRefilled(address indexed refiller, uint256 amount);
event SepEthDonated(address indexed donor, uint256 amount);
event SepEthDripsPaused(bool paused);
event Claimed(address indexed user, uint256 amount);
event MintedNewFaucetTokens(address indexed user, uint256 amount);
+ event BurnedFaucetTokens(uint256 amount);

To the BurnFaucetTokens :

function burnFaucetTokens(uint256 amountToBurn) public onlyOwner {
require(amountToBurn <= balanceOf(address(this)), "Faucet Token Balance: Insufficient");
// transfer faucet balance to owner first before burning
// ensures owner has a balance before _burn (owner only function) can be called successfully
_transfer(address(this), msg.sender, balanceOf(address(this)));
_burn(msg.sender, amountToBurn);
+ emit BurnedFaucetTokens(amountToBurn);
}
Updates

Lead Judging Commences

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