hats-finance / Paladin-0x1610bfde27e57b068af7f38aec3d2a7b1d146989

Smart contract for the Vote-Flywheel part of Paladin Tokenomics
Other
0 stars 1 forks source link

Proxy managers can set themselves as proxy #45

Open hats-bug-reporter[bot] opened 7 months ago

hats-bug-reporter[bot] commented 7 months ago

Github username: -- Twitter username: 97Sabit Submission hash (on-chain): 0xef1046a72d84382edfbf2e15abd9b886db3129210aee953ad1c16dc2a57ce72f Severity: high

Description: Description\ Proxy managers are able to set themselves as a user's voting proxy by calling setVoterProxy. There is no restriction on the endTimestamp they can set.

This allows a proxy manager to set themselves as a user's proxy with an endTimestamp very far in the future (e.g. 100 years from now). Even if the user later removes the proxy manager's permissions, the manager will still be set as the user's proxy and able to use their voting power until the end timestamp is reached.

For instance:

This allows proxy managers to indefinitely retain proxy access and voting rights, even after the user revokes their permissions. It undermines the ability for a user to revoke proxy manager permissions.

It is suggested that when revokeProxyManager (for instance) is called, also immediately clear any proxy set by that manager for the user.

  1. Proof of Concept (PoC) File

    https://github.com/PaladinFinance/Vote-Flywheel/blob/cf3c82f102a76f58acf003980c480eb9028f0e94/contracts/LootVoteController.sol#L423-L424

chainNue commented 7 months ago

Not an issue, it's limited by userLockEnd

ololade97 commented 7 months ago

Not an issue, it's limited by userLockEnd

?

Kogaroshi commented 7 months ago

Invalid, see in #46

ololade97 commented 7 months ago

Invalid, see in #46

Proxy manager can set himself as a proxy is the main issue here.

Kogaroshi commented 7 months ago

Invalid, see in #46

Proxy manager can set himself as a proxy is the main issue here.

See answer : https://github.com/hats-finance/Paladin-0x1610bfde27e57b068af7f38aec3d2a7b1d146989/issues/46#issuecomment-1939132272