-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PartyGovernance.sol#accept - Inactive members can still accept proposals #163
Comments
This is to allow hosts Invalid |
ydspa marked the issue as insufficient quality report |
gzeon-c4 marked the issue as unsatisfactory: |
gzeon-c4 marked the issue as unsatisfactory: |
Hey @gzeon-c4 We would like to point out that even if the current code is like so, to allow hosts to The protocol allows inactive members to participate in proposal acceptance, a function meant only for active members. This discrepancy creates a vulnerability where malicious actors can influence voting outcomes, undermining the protocol's integrity. We believe the issue has been misjudged and we kindly ask you to re-evaluate its severity given its high impact. This breaks a core invariant of any governance protocol, as no members that currently doesn't hold any voting power, should be able to participate in voting. We propose implementing a dedicated function accessible only to hosts, allowing them to accept even when they are "inactive." This function should be restricted from regular inactive members. Cheers. |
It is a no-op as inactive member would not have voting power by definition |
Their previous snapshots will, the report and PoC showcase it. You can see in the PoC that the Cheers. |
activeness is defined by their previous snapshot https://github.com/code-423n4/2023-10-party/blob/b23c65d62a20921c709582b0b76b387f2bb9ebb5/contracts/party/PartyGovernance.sol#L222-L225 |
Hey @gzeon-c4 Inactivity is defined by their last snapshot, while This means if you had voting power before the creation of a proposal, then The PoC clearly showcases this, using |
Gotcha, tho I still think this is an intended behavior to allow them to vote with their snapshot voting power (even after rage quit) just like you can sell your voting token after the snapshot and still vote, at least this does not seems to break anything. The inconsistency between accept vs propose/execute/cancel can be explained by the later does not depends on the voting snapshot. I will ping @0xble to confirm. |
Thank you for your time and extra comments. Have a good one. |
Final thoughts on this? @0xble |
Going to keep this as invalid due to the currently behavior aligns with how snapshot voting usually works. |
Lines of code
https://github.com/code-423n4/2023-10-party/blob/b23c65d62a20921c709582b0b76b387f2bb9ebb5/contracts/party/PartyGovernance.sol#L595-L658
Vulnerability details
Impact
The protocol employs
_assertActiveMember
to enforce that only active members (either having intrinsic voting power or delegated voting power) call important functions, likepropose/execute/cancel
.accept
is missing the_assertActiveMember
check.For example, if a user has 1 card with 10 voting power, a proposal is created and the user calls
rageQuit
, he/she can stillaccept
, even though they technically have 0 intrinsic/delegated voting power and they have no Cards.The lack of
_assertActiveMember
, a user canaccept
any proposal as long as he burned his Cards after the proposal was created.So if we have 10 ongoing proposals, the user calls
rageQuit
after they are created, he can vote on all 10 of the proposals.Proof of Concept
Paste the following inside
test/crowdfund/InitialETHCrowdfund.t.sol
in contractInitialETHCrowdfundTest
and run
forge test --mt test_nonActiveMembersCanStillVote -vvvv
Tools Used
Manual Review
Recommended Mitigation Steps
Use the
_assertActiveMember
function to ensure that msg.sender is an active memberAssessed type
Access Control
The text was updated successfully, but these errors were encountered: