Submitted by KIntern_NA, also found by ak1, cryptphi, and scaraven
Can not prevent expired locks being extended.
https://github.com/code-423n4/2022-08-fiatdao/blob/main/contracts/VotingEscrow.sol#L493-L523
Call function function increaseUnlockTime() with an expired lock (locked[msg.sender].end < block.timestamp)
https://github.com/code-423n4/2022-08-fiatdao/blob/main/contracts/VotingEscrow.sol#L511
But in case 1, senders lock was not delegated to another, the sender can delegate to new address with end time of lock equal to new end time. After that he can call increaseUnlockTime() and move to case 2. Then sender can undelegate and the lock will be extended, and sender will take back vote power.
Here is the script :
In every cases, expired locks should able to be extended -> should remove line VotingEscrow.sol#L511.
lacoop6tu (FIAT DAO) confirmed
Justin Goro (judge) commented:
IllIllI (warden) reviewed mitigation:
