code-423n4 / 2022-09-party-findings

2 stars 0 forks source link

The delegation even if you have no `VotingPower` #292

Closed code423n4 closed 1 year ago

code423n4 commented 1 year ago

Lines of code

https://github.com/PartyDAO/party-contracts-c4/blob/main/contracts/party/PartyGovernance.sol#L911

Vulnerability details

Impact

when you buy a new VotingPower. You need to undelegated them before the next proposal

Proof of Concept

-When Alice sell his NFT by calling transferFrom() on PartyGovernanceNFT.sol. it will be set for the delegating to the previous delegator. but he actually doesn't have any VotingPower -But is Alice decide after some time to buy some VotingPower

Recommended Mitigation Steps

undelegated automatically when someone sells their VotingPower

merklejerk commented 1 year ago

This is intentional. Delegations are a property of the account, not the governance token ID.

HardlyDifficult commented 1 year ago

Working as intended. Closing as invalid.