Lucene search

K
code423n4Code4renaCODE423N4:2021-10-MOCHI-FINDINGS-ISSUES-161
HistoryOct 27, 2021 - 12:00 a.m.

MochiTreasuryV0.withdrawLock() Is Callable When Locking Has Been Toggled

2021-10-2700:00:00
Code4rena
github.com
4

Handle

leastwood

Vulnerability details

Impact

withdrawLock() does not prevent users from calling this function when locking has been toggled. As a result, withdraws may be made unexpectedly.

#Proof of Concept

Tools Used

Manual code review

Recommended Mitigation Steps

Consider adding require(lockCrv, “!lock”); to withdrawLock() to ensure this function is not called unexpectedly. Alternatively if this is intended behaviour, it should be rather checked that the lock has not been toggled, otherwise users could maliciously relock tokens.


The text was updated successfully, but these errors were encountered:

All reactions