Insufficient input validation #45
Labels
1 (Low Risk)
Assets are not at risk. State handling, function incorrect as to spec, issues with comments
bug
Something isn't working
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
WatchPug
Vulnerability details
https://github.com/maple-labs/debt-locker/blob/81f55907db7b23d27e839b9f9f73282184ed4744/contracts/DebtLocker.sol#L85-L89
Considering that
_allowedSlippage
is a crucial settings forgetExpectedAmount()
, it's necessary to addrequire(_allowedSlippage < 10000, "...")
to validate the input.If
_allowedSlippage
is misconfigured to a value >10000
,getExpectedAmount()
will always revert.Recommendation
Change to:
The text was updated successfully, but these errors were encountered: