Submitted by WatchPug
VotingEscrow.sol#L517-L528
VotingEscrow.sol#L1244-L1248
When _moveTokenDelegates(), dstRep must not have more than MAX_DELEGATES.
However, in _burn(), dstRep array wont get decreased. This opens a griefing attack vector, in which the attacker can deposit 1 wei of token for the victim, repeated for MAX_DELEGATES times, and the victim can no longer deposit, even if they try to merge or burn their tokenIds.
Even for a normal active user, this can be a problem as the dstRep array will continuously grow and cant decrease, one day the user wont be able to deposit anymore as they have reached the MAX_DELEGATES cap.
Change to:
pooltypes (Velodrome) acknowledged
Alex the Entreprenerd (judge) commented:
