Submitted by ADM, also found by lsaudit (1, 2), QiuhaoLi, Jorgect (1, 2), SpicyMeatball, bart1e (1, 2), Yanchuan, 3docSec, MrPotatoMagic, nemveer (1, 2), Yuki, kaden, nonseodion (1, 2), Watermelon, RandomUser, BenRai (1, 2), cducrest, Topmark, Tendency, 0xDING99YA, and Kow
Due to a check requiring users only be able to delegate to others or themselves with longer lock times and verwas restrictions of all changes increasing lock times by 5 years users may be forced to remain delegated to someone they do not wish to be or extend their lock much longer than they wish.
If a user does not delegate to another user who started their lock during the same epoch they will be unable to undelegate back to themselves without extending their own lock. This is not much of an issue if they wish to do so early in the lock period but can become a problem if they wish to delegate to themselves after a longer period of time. i.e.
The undelegate fail can be shown by modifying the test testSuccessDelegate to:
and running:
forge test --match testSuccessUnDelegate
Modify VotingEscrow#L384 to:
which will allow users to delegate either to longer locks or undelegate back to themselves.
alcueca (Judge) increased severity to High and commented:
OpenCoreCH (veRWA) confirmed on duplicate 178
