DeFiFoundry
20,000 USDC
View results
Submission Details
Severity: low
Invalid

Event is missing `indexed` fields

Summary

Index event fields make the field more quickly accessible to off-chain tools that parse events. However, note that each index field costs extra gas during emission, so it's not necessarily best to index the maximum allowed per event (three fields). Each event should use three indexed fields if there are three or more fields and gas usage is not particularly of concern for the events in question. If there are fewer than three fields, all of the fields should be indexed.

File: src/FjordAuction.sol

91: event AuctionEnded(uint256 totalBids, uint256 totalTokens);

98: event TokensClaimed(address indexed bidder, uint256 amount);

105: event BidAdded(address indexed bidder, uint256 amount);

112: event BidWithdrawn(address indexed bidder, uint256 amount);

File: src/FjordPoints.sol

92: event Staked(address indexed user, uint256 amount);

99: event Unstaked(address indexed user, uint256 amount);

106: event PointsDistributed(uint256 points, uint256 pointsPerToken);

113: event PointsClaimed(address indexed user, uint256 amount);

File: src/FjordStaking.sol

51: event Staked(address indexed user, uint16 indexed epoch, uint256 amount);

65: event RewardAdded(uint16 indexed epoch, address rewardAdmin, uint256 amount);

70: event RewardClaimed(address indexed user, uint256 amount);

76: event EarlyRewardClaimed(address indexed user, uint256 rewardAmount, uint256 penaltyAmount);

82: event ClaimedAll(address indexed user, uint256 totalRewardAmount, uint256 totalPenaltyAmount);

88: event Unstaked(address indexed user, uint16 indexed epoch, uint256 stakedAmount);

95: event VestedUnstaked(

104: event UnstakedAll(

114: event ClaimReceiptCreated(address indexed user, uint16 requestEpoch);

119: event RewardPerTokenChanged(uint16 epoch, uint256 rewardPerToken);

126: event SablierWithdrawn(address indexed user, uint256 streamID, address caller, uint256 amount);

133: event SablierCanceled(address indexed user, uint256 streamID, address caller, uint256 amount);

Tools Used

Aderyn

Recommendations

Add an index on the events.

Updates

Lead Judging Commences

inallhonesty Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.