Submitted by Bahurum, also found by 0x52, 0xA5DF, 0xsanson, berndartmueller, cccz, CertoraInc, dipp, GalloDaSballo, GimelSec, Green, IllIllI, kenzo, MEP, panprog, and scaraven
VoteEscrowDelegation.sol#L213
A user who has delegated the vote of a veGolom token (that he/she owns) to another veGolom token cannot remove the delegation, so the delegatee token will permanently hold the voting power of the delegator token.
A user tries to remove the delegation from tokenId he/she owns to the delegated token, calling removeDelegation(uint256 tokenId).
The delegation should be removed at the lines:
but the array checkpoint.delegatedTokenIds is the list of delegators to tokenId itself. So, unless the delegation was from the token to itself, removeDelegation does nothing.
Two fixes are proposed:
or
kenzo (warden) commented:
zeroexdead (Golom) confirmed
zeroexdead (Golom) commented:
0xsaruman (Golom) resolved
LSDan (judge) increased severity to High and commented:
