Submitted by said, also found by Arabadzhiev
https://github.com/code-423n4/2024-03-neobase/blob/main/src/VotingEscrow.sol#L295-L311
https://github.com/code-423n4/2024-03-neobase/blob/main/src/VotingEscrow.sol#L315-L350
Due to the lack of restrictions on createLock and increaseAmount when the unlockOverride flag is set to true, users can createLock/increaseAmount on VotingEscrow, vote for a gauge inside the GaugeController to increase the desired gauges weight, and then immediately withdraw the locked native token from VotingEscrow to boost their desired gauges weight for free.
When users lock their native token on VotingEscrow, they gain the ability to increase gauge weight on GaugeController based on the amount of native token theyve locked, at the expense of having to lock the native token for LOCKTIME (1825 days) period, or until the governance toggle unlockOverride and set it to true.
https://github.com/code-423n4/2024-03-neobase/blob/main/src/VotingEscrow.sol#L357
However, due to the lack of restrictions on calling createLock and increaseAmount when unlockOverride is set to true, users can lock their native token, use it to vote on GaugeController, and immediately withdraw the token to manipulate and boost the desired gauge weights.
Add the following test inside GaugeController.t.sol:
Run the test:
Output:
From the test, it can be observed that relative gauge weights of desired gauge increased for next epoch.
Considering that unlockOverride is potentially used to finish the lock time early for all users inside VotingEscrow, consider adding a check inside createLock and increaseAmount. If unlockOverride is set to true, revert the operation.
Invalid Validation
zjesko (Neobase) confirmed
For this audit, 4 reports were submitted by wardens detailing low risk and non-critical issues. The report highlighted below by said received the top score from the judge.
The following wardens also submitted reports: carrotsmuggler, rvierdiiev, and Arabadzhiev.
