sherlock-audit / 2024-06-velocimeter-judging

0 stars 0 forks source link

Dandy Shamrock Sheep - Unnecessary Type Casting #706

Closed sherlock-admin4 closed 1 month ago

sherlock-admin4 commented 1 month 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;