VetoProposal.voteToVeto()
checks the proposal status wrongly.
#20
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
duplicate-3
satisfactory
satisfies C4 submission criteria; eligible for awards
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Lines of code
https://github.com/code-423n4/2023-04-party/blob/440aafacb0f15d037594cebc85fd471729bcb6d9/contracts/proposals/VetoProposal.sol#L33
Vulnerability details
Impact
VetoProposal.voteToVeto()
wouldn't work as expected because voters can vote during theVoting
status only.Proof of Concept
When we check
veto()
, it works during 3 statuses,Voting, Passed, Ready
which is mentioned in the comment as well.But
voteToVeto()
works during theVoting
status only.As
veto()
should be executed after checking thepassThresholdBps
invoteToVeto()
,veto()
would work onVoting
status only.Tools Used
Manual Review
Recommended Mitigation Steps
voteToVeto()
should work duringVoting, Passed, Ready
statuses.The text was updated successfully, but these errors were encountered: