sherlock-audit / 2024-01-rio-vesting-escrow-judging

3 stars 2 forks source link

rvierdiiev - Governor.castVoteWithReasonAndParams function is not available #48

Closed sherlock-admin closed 9 months ago

sherlock-admin commented 9 months ago

rvierdiiev

medium

Governor.castVoteWithReasonAndParams function is not available

Summary

Because it's not possible to call Governor.castVoteWithReasonAndParams function from VestingEscrow contract, then in case if voting module uses params to calculate votes, then recipient will not be able to vote.

Vulnerability Detail

VestingEscrow contract provides ability to delegate votes and cast votes through OZVotingAdapter using delegatecall.

IGovernor interface has castVoteWithReasonAndParams function, that is not implemented by OZVotingAdapter.

In case if DAO will have implementation that only uses such function for voting(all other will be disabled) to fetch user votes according to params, then recipient will not be able to vote from the contract and will have only option to delegate.

Impact

Recipient can't vote when castVoteWithReasonAndParams function is used for voting.

Code Snippet

Provided above

Tool used

Manual Review

Recommendation

Add support for such function.

Duplicate of #97