-
Notifications
You must be signed in to change notification settings - Fork 1
GimelSec - TimeLock.execute
lacks payable
#387
Comments
valid issue |
Escalate for 10 USDC. Valid low. Definitely not medium. there is no admin function that needs msg.value. |
You've created a valid escalation for 10 USDC! To remove the escalation from consideration: Delete your comment. You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final. |
fix PR: Y2K-Finance/Earthquake#134 |
Update: but it looks like currently there is no |
Escalation accepted Valid low |
This issue's escalations have been accepted! Contestants' payouts and scores will be updated according to the changes made on this issue. |
GimelSec
high
TimeLock.execute
lacks payableSummary
TimeLock.execute
lackspayable
. If_value
inTimeLock.execute
is not zero, it could always revert.Vulnerability Detail
TimeLock.execute
lackspayable
. The caller cannot send the value.https://github.com/sherlock-audit/2023-03-Y2K/blob/main/Earthquake/src/v2/TimeLock.sol#L113
And the contract is modified from https://solidity-by-example.org/app/time-lock/ . The example code has the
payable
receive function. ButTimeLock
doesn’t have one.Impact
TimeLock.execute
cannot work if_value
!= 0.Code Snippet
https://github.com/sherlock-audit/2023-03-Y2K/blob/main/Earthquake/src/v2/TimeLock.sol#L113
Tool used
Manual Review
Recommendation
Add
payable
onTimeLock.execute
. Also add a check to ensuremsg.value == _value
.The text was updated successfully, but these errors were encountered: