This repository has been archived by the owner on Oct 22, 2023. It is now read-only.
PawelK - No deadline parameter in createCommitment
function
#82
Labels
Non-Reward
This issue will not receive a payout
PawelK
medium
No deadline parameter in
createCommitment
functionSummary
No deadline parameter in
createCommitment
functionVulnerability Detail
The
createCommitment
function doesn't contain deadline parameter. If the lender would create commitment a function, and forget about it or would be blocked to send the function via griefing attack, or any other reason, he might not calldeleteCommitment
function and might get a not favorable deal, because of the volatile market conditions.Impact
Unfavorable loan for the lender.
Code Snippet
Tool used
Manual Review
Recommendation
Add
deadline
field tocreateCommitment
, and if theacceptCommitment
function would be called after it, it should revert.You could also add that if the lender sets
deadline
to0
, then it lasts until canceled.It should be up to the lender to decide what risk of market change condition he is willing to take, and set according to the deadline for the commitment.
Duplicate of #187
The text was updated successfully, but these errors were encountered: