Submitted by IllIllI, also found by kenzo
Users can get unlimited votes which leads to them:
_mint() calls _moveTokenDelegates() to set up delegation
VotingEscrow.sol#L462-L467
and _transferFrom() calls _moveTokenDelegates() to transfer delegates
VotingEscrow.sol#L301-L316
but _burn() does not transfer them back to address(0)
VotingEscrow.sol#L517-L528
A user can deposit a token, lock it, wait for the lock to expire, transfer the token to another address, and repeat. During each iteration, a new NFT is minted and checkpointed. Calls to getPastVotes() will show the wrong values, since it will think the account still holds the delegation of the burnt NFT. Bribes and gauges also look at the checkpoints and will also have the wrong information
Call _moveTokenDelegates(owner,address(0)) in _burn()
pooltypes (Velodrome) confirmed and commented:
Alex the Entreprenerd (judge) commented:
