BriVault

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

[I-1] Missing indexed Parameters in Events Prevents Efficient Off-Chain Filtering

[I-1] Missing indexed Parameters in Events Prevents Efficient Off-Chain FilteringDescription

Events lack indexed parameters, making it difficult and expensive for off-chain applications to filter and query specific events. Indexed parameters create topics that allow efficient event filtering.
```solidity
// briVault.sol
event joinedEvent(address user, uint256 countryId);
event WinnerSet(string winner);
event Withdraw(address user, uint256 amount);
event CountriesSet(string[48] countries);
```

Risk

Likelihood:

  • High — omitting indexed on event parameters is a common oversight and will frequently occur in real code.

Impact:

- Off-chain services cannot efficiently filter events by user address
- Increased query costs for front-ends and indexers

Proof of Concept

Recommended Mitigation

- remove this code
+ add this code
```diff
- event joinedEvent(address user, uint256 countryId);
- event WinnerSet(string winner);
- event Withdraw(address user, uint256 amount);
- event CountriesSet(string[48] countries);
+ event joinedEvent(address indexed user, uint256 indexed countryId);
+ event WinnerSet(string winner);
+ event Withdraw(address indexed user, uint256 amount);
+ event CountriesSet(string[48] countries);
```
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!