Platform: Code4rena
Start Date: 31/10/2023
Pot Size: $60,500 USDC
Total HM: 9
Participants: 65
Period: 10 days
Judge: gzeon
Total Solo HM: 2
Id: 301
League: ETH
Rank: 64/65
Findings: 1
Award: $15.78
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: 3docSec
Also found by: 0xMosh, 0xadrii, 0xmystery, Bauchibred, Ch_301, Emmanuel, J4X, Madalad, Pechenite, Shaheen, Topmark, TresDelinquentes, Walter, ZanyBonzy, adeolu, adriro, chainsnake, joaovwfreire, lsaudit, osmanozdemir1, sin1st3r__
15.7808 USDC - $15.78
Defeated
cancelDelay
to a large valuepropose()
Ready
proposal could get vetoed after passing the executionDelay
Defeated
the Proposal should enter the Status Defeated
if it exceeds its voting window without reaching passThresholdBps
.
There is no check for this in accept()
. so if this happened you should update pv.votes = type(uint96).max
There is one instance of this issue: GitHub: L595-L658
cancelDelay
to a large valueIf the globalMaxCancelDelay == 0
in the Party. malicious proposer could set cancelDelay
to a big value So no one can use this party anymore because his Proposal will stay in the InProgress status
There is one instance of this issue: GitHub: L797-L802
in PartyGovernanceNFT.rageQuit()
there is a for loop that could lead to out-of-gas
so the users could end up leaving some funds in the PARTLY in order to invoke rageQuit()
successfully
There are two instances of this issue:
GitHub: L378-L396 GitHub: L406-L441
propose()
The PartyGovernance._assertActiveMember()
should check if voting power
is not delegated to another user
There is one instance of this issue: GitHub: L222-L228
Ready
proposal could get vetoed after passing the executionDelay
It is not logical the Ready
proposal could get VETO or anyone could front-run the transaction of the veto()
/ execute()
because both of them accept the Ready states.
There is one instance of this issue: GitHub: L677 GitHub: L609
We know the host could abdicate (Burned his host status) by invoking PartyGovernance.abdicateHost() at any time.
on the changelog tabel one of the changes is to add functionality to skip the proposal’s veto period if all hosts have accepted it. So Once all hosts accept a proposal, the veto period is skipped. This allows for parties to move faster.
If all the hosts have accepted a Proposal and one of them calls PartyGovernance.abdicateHost(address(0))
the value of numHosts
gets decreased.
In order to skip the execution delay the PartyGovernance._hostsAccepted()
function should return true
File: PartyGovernance.sol 1088: if (pv.passedTime != 0) { 1089: // Ready. 1090: if (pv.passedTime + gv.executionDelay <= t) { 1091: return ProposalStatus.Ready; 1092: } 1093: // If unanimous, we skip the execution delay. 1094: if (_isUnanimousVotes(pv.votes, pv.totalVotingPower)) { 1095: return ProposalStatus.Ready; 1096: } 1097: // If all hosts voted, skip execution delay 1098: if (_hostsAccepted(pv.numHosts, pv.numHostsAccepted)) { 1099: return ProposalStatus.Ready; 1100: } 1101: // Passed. 1102: return ProposalStatus.Passed; 1103: }
But due to the decrease in the numHosts
value and the function `` only check in ==
number of the Hosts Accepted this proposal
it will return a false
File: PartyGovernance.sol 1122: function _hostsAccepted( 1123: uint8 snapshotNumHosts, 1124: uint8 numHostsAccepted 1125: ) private pure returns (bool) { 1126: return snapshotNumHosts > 0 && snapshotNumHosts == numHostsAccepted; 1127: }
should be
File: PartyGovernance.sol 1122: function _hostsAccepted( 1123: uint8 snapshotNumHosts, 1124: uint8 numHostsAccepted 1125: ) private pure returns (bool) { - 1126: return snapshotNumHosts > 0 && snapshotNumHosts == numHostsAccepted; + 1126: return snapshotNumHosts > 0 && numHostsAccepted >= snapshotNumHosts; 1127: }
#0 - c4-pre-sort
2023-11-13T04:18:28Z
ydspa marked the issue as insufficient quality report
#1 - c4-judge
2023-11-19T18:18:10Z
gzeon-c4 marked the issue as grade-b