Centralisation RIsk: VoterProxy
owner may set the operate
to an address they own and drain all token balances
#82
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
disagree with severity
Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments)
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Lines of code
https://github.com/code-423n4/2022-05-vetoken/blob/2d7cd1f6780a9bcc8387dea8fecfbd758462c152/contracts/VoterProxy.sol#L274-L285
https://github.com/code-423n4/2022-05-vetoken/blob/2d7cd1f6780a9bcc8387dea8fecfbd758462c152/contracts/VoterProxy.sol#L123-L143
Vulnerability details
Impact
The
owner
ofVoterProxy
is able to callsetOperator()
(if the previous operator is shutdown). This allows them to then callexecute()
,withdraw()
orwithdrawAll()
.Execute makes a call to any arbitrary contract with arbitrary data. This may therefore call any ERC20 token, and gauge or the
VoterEscrow
account and withdraw protocol funds.The functions
withdraw()
andwithdrawAll()
can also be abused to take all funds deposited in the gauges and transfer them to the owner's malicious address.This poses a significant centralisation risk if the owner private key is compromised or the owner decides to rug pull.
Proof of Concept
After the owner has updated the
operator
viasetOperator()
they are able to callVoterProxy.execute()
to execute any call to any smart contract.Similarly, for
withdraw()
andwithdrawAll()
Recommended Mitigation Steps
This issue may be mitigated removing the ability for the
owner
to change the operator inVoterProxy
.If the functionality is require ensure it is behind a time lock and multisig / dao.
The text was updated successfully, but these errors were encountered: