The voiceCredits of the allocator are not updated when he allocates his voice credits
When an allocater allocates his voice credits in QVBaseStrategy the voice credits cannot exceed the available voice credits for the allocator. However when _qv_allocate() is called the voiceCredits for the allocator are not updated so he will always have unlimited voiceCredits to allocate to the recipients.
Vulnerability Detail
Each allocator should have a limited amount of votes to cast to the recipients. However allocator.voiceCredits which is supposed to be used to track the allocator voiceCredits isnt updated so the allocator can exceed the max limit and because it isnt updated he will have unlimited voice credits.
Impact
The allocator can use more than allowed voice credits which will lead to unfair voting because anyone can just allocate as much as they want to and the funds will then be distributed in an unfair way.
Arz
medium
The voiceCredits of the allocator are not updated when he allocates his voice credits
When an allocater allocates his voice credits in
QVBaseStrategy
the voice credits cannot exceed the available voice credits for the allocator. However when_qv_allocate()
is called thevoiceCredits
for the allocator are not updated so he will always have unlimitedvoiceCredits
to allocate to the recipients.Vulnerability Detail
Each allocator should have a limited amount of votes to cast to the recipients. However
allocator.voiceCredits
which is supposed to be used to track the allocatorvoiceCredits
isnt updated so the allocator can exceed the max limit and because it isnt updated he will have unlimited voice credits.Impact
The allocator can use more than allowed voice credits which will lead to unfair voting because anyone can just allocate as much as they want to and the funds will then be distributed in an unfair way.
Code Snippet
https://github.com/sherlock-audit/2023-09-Gitcoin/blob/6430c8004017e96ae2f5aac365bdefd0b6eeea72/allo-v2/contracts/strategies/qv-base/QVBaseStrategy.sol#L506
As you can see in
_qv_allocate()
the_allocator.voiceCredits
are not updated.Tool used
Manual Review
Recommendation
Update the voiceCredits in
_qv_allocate()
Duplicate of #150