sherlock-audit / 2024-06-velocimeter-judging

11 stars 7 forks source link

Lone Oily Rooster - Missing View Modifier in `isApprovedOrOwner` Function #696

Closed sherlock-admin4 closed 4 months ago

sherlock-admin4 commented 4 months ago

Lone Oily Rooster

Low/Info

Missing View Modifier in isApprovedOrOwner Function

krkbaa

Summary

Vulnerability Detail

in IVotingEscrow.sol contract the isApprovedOrOwner function should have a view or pure modifier because it is a getter function that does not change the state. https://github.com/sherlock-audit/2024-06-velocimeter/blob/main/v4-contracts/contracts/interfaces/IVotingEscrow.sol#L23 also the team function https://github.com/sherlock-audit/2024-06-velocimeter/blob/main/v4-contracts/contracts/interfaces/IVotingEscrow.sol#L16

Impact

the function may be misinterpreted.

Code Snippet

Tool used

Manual Review

Recommendation

Add the View Modifier