The functions VestingEscrow::vote and VestingEscrow::voteWithReason do not return results
Summary
These functions are expected to return a result, but the adapter functions to which they delegate the call do not return any values. As a result, they will always return 0 bytes.
Vulnerability Detail
The functions VestingEscrow::vote and VestingEscrow::voteWithReason are expected to return a result of type bytes memory. They delegate the call to the adapter.
fibonacci
medium
The functions
VestingEscrow::vote
andVestingEscrow::voteWithReason
do not return resultsSummary
These functions are expected to return a result, but the adapter functions to which they delegate the call do not return any values. As a result, they will always return 0 bytes.
Vulnerability Detail
The functions
VestingEscrow::vote
andVestingEscrow::voteWithReason
are expected to return a result of typebytes memory
. They delegate the call to the adapter.The adapter then interacts with the IGovernor contract, but does not return a result.
According to the
IGovernor
interface, the functionscastVote
andcastVoteWithReason
return thebalance
value of typeuint256
.POC
Impact
This unexpected behavior could lead to errors when interacting with the protocol.
Code Snippet
https://github.com/sherlock-audit/2024-01-rio-vesting-escrow/blob/main/rio-vesting-escrow/src/VestingEscrow.sol#L152-L163 https://github.com/sherlock-audit/2024-01-rio-vesting-escrow/blob/main/rio-vesting-escrow/src/adaptors/OZVotingAdaptor.sol#L61-L73
Tool used
Manual Review
Recommendation
Duplicate of #80