Open code423n4 opened 2 years ago
Czar102
Proper event declaration eases off-chain monitoring.
In the case of qualitative variables, it is recommended to use indexed keyword.
indexed
Despite the uint duration argument seems to be a quantitative one, it is limited to few values, which specify the "locking mode".
uint duration
uint duration variable should be considered qualitative and be marked indexed in the following events:
event LockPeriodSet(uint256 duration, uint8 bonusMultiplier); event LockPositionCreated(uint256 indexed tokenId, address indexed owner, uint256 amount, uint256 duration);
Agreed. We will mark them indexed in both LockPeriodSet and LockPositionCreated.
LockPeriodSet
LockPositionCreated
Fixed in release candidate contract interface for LockPeriodSet and LockPositionCreated.
Handle
Czar102
Vulnerability details
Impact
Proper event declaration eases off-chain monitoring.
Proof of Concept
In the case of qualitative variables, it is recommended to use
indexed
keyword.Despite the
uint duration
argument seems to be a quantitative one, it is limited to few values, which specify the "locking mode".Recommended Mitigation Steps
uint duration
variable should be considered qualitative and be markedindexed
in the following events: