BriVault

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

Missing Events for Critical State Changes

Description:

Several important functions do not emit events:

  • cancelParticipation() - no event emitted

  • _getWinnerShares() - state change not logged

  • _setFinallizedVaultBalance() - state change not logged

Events are important for off-chain tracking and transparency.

Impact:

  • Difficult to track state changes off-chain

  • Poor transparency

  • Harder to build front-end applications

Mitigation:

+ event ParticipationCancelled(address indexed user, uint256 refundAmount);
+ event VaultFinalized(uint256 finalBalance);
+ event WinnerSharesCalculated(uint256 totalWinnerShares);
function cancelParticipation() public {
// ... existing logic ...
+ emit ParticipationCancelled(msg.sender, refundAmount);
}
function _setFinallizedVaultBalance () internal returns (uint256) {
// ... existing logic ...
+ emit VaultFinalized(finalizedVaultAsset);
}
function _getWinnerShares () internal returns (uint256) {
// ... existing logic ...
+ emit WinnerSharesCalculated(totalWinnerShares);
}
Updates

Appeal created

bube Lead Judge 19 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.

Give us feedback!