Platform: Code4rena
Start Date: 21/07/2023
Pot Size: $90,500 USDC
Total HM: 8
Participants: 60
Period: 7 days
Judge: 0xean
Total Solo HM: 2
Id: 264
League: ETH
Rank: 42/60
Findings: 1
Award: $312.74
🌟 Selected for report: 0
🚀 Solo Findings: 0
312.7392 USDC - $312.74
After updating the multiplier of an NFT ID all delegates have the old votes base on the old multiplier as long as the user who uses this NFT ID does not call any function that triggers _syncVotingPower
. Even though the function updateVotingPower
can be called by anybody to update anybody’s voting power, there is no feasible way to determine whose voting power needs to be updated after changing the multiplier of an NFT ID. This can lead to old voting power multiplications making the votes of a delegate to high (if the factor was lowered) or to low (if the factor was increased). This makes governance voting skewed.
Example: Alice deposits 100 tokens using the NFT ID 1. When she deposits the multiplier of the ID is 1.5 giving her 100 * 1.5 = 150 votes. Now the voting power of the NFT ID 1 is changed to 1.
Bob deposits 100 tokens also using the NFT ID 1. He now has 100 * 1 = 100 votes even though both use the same NFT and deposit the same token.
There is no easy way to find out that Alice uses the NFT with the ID 1 and updateVotingPower
for her. As long as she does not trigger _syncVotingPower
she will have more votes than Bob.
Manual review
Add a mapping of token ID to array of addresses that use this token ID. This way, when changing multiplier of an NFT ID it is easy to know for which addresses the voting power needs to be adjusted.
Other
#0 - c4-pre-sort
2023-07-30T11:15:19Z
141345 marked the issue as duplicate of #160
#1 - c4-pre-sort
2023-08-01T08:35:46Z
141345 marked the issue as not a duplicate
#2 - 141345
2023-08-01T08:55:08Z
lack detailed impact/loss.
QA might be more appropriate.
#3 - c4-sponsor
2023-08-02T20:01:53Z
PowVT marked the issue as sponsor acknowledged
#4 - c4-sponsor
2023-08-02T20:02:20Z
PowVT marked the issue as disagree with severity
#5 - PowVT
2023-08-02T20:12:31Z
This is a known drawback to our design and the updateVotingPower
function. We intend to have a frontend show which users VotingPower is eligible to be updated/ reduced.
#6 - c4-judge
2023-08-10T14:40:21Z
0xean marked the issue as duplicate of #431
#7 - 0xean
2023-08-10T14:40:48Z
I believe this to be the same underlying or design issue as #431 and believe they should be marked as duplicates.
#8 - c4-judge
2023-08-11T16:06:01Z
0xean marked the issue as satisfactory
#9 - c4-judge
2023-08-11T16:06:22Z
0xean changed the severity to 2 (Med Risk)