Lack Of Return Value Check On the Dex Handler Malt Price Calculation #75
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
defsec
Vulnerability details
Impact
During the code review, It has been seen that malt price return value has not been checked on the function. If oracle is returned price as a 0, fullReturn will be zero on the earlyExitReturn function.
Proof of Concept
Tools Used
Code Review
Recommended Mitigation Steps
Consider to add return value check. The maltPrice should be more than zero for the calculation.
"""
require(dexHandler.maltMarketPrice()>0, "Price should be more than zero");
"""
The text was updated successfully, but these errors were encountered: