sherlock-audit / 2024-06-velocimeter-judging

11 stars 7 forks source link

Dandy Shamrock Sheep - Unnecessary Type Casting #706

Closed sherlock-admin4 closed 4 months ago

sherlock-admin4 commented 4 months ago

Dandy Shamrock Sheep

Low/Info

Unnecessary Type Casting

Summary

There's an unnecessary type casting in the _updateFor function.

Vulnerability Detail

In the _updateFor function:

uint _share = uint(_supplied) * _delta / 1e18;

Impact

Code Snippet

https://github.com/sherlock-audit/2024-06-velocimeter/blob/main/v4-contracts/contracts/Voter.sol#L526

Tool used

Manual Review

Recommendation

uint _share = _supplied * _delta / 1e18;