Submitted by 0x52, also found by 0xsanson
Submitting as high risk because it breaks a fundamental operation (transferring) for a large number of tokens.
https://github.com/code-423n4/2022-07-golom/blob/7bbb55fca61e6bae29e57133c1e45806cbb17aa4/contracts/vote-escrow/VoteEscrowDelegation.sol#L212-L213
L242 of transferFrom() calls removeDelegation() with the tokenId of the token being transferred. For tokens that dont have any checkpoints, L212 will return 0. This was cause an underflow error and revert in L213.
Make removeDelegation simply return if nCheckpoints = 0.
kenzo (warden) commented:
zeroexdead (Golom) disagreed with severity
LSDan (judge) decreased severity to Medium and commented:
