[trail of bits audit] #1 Loss of precision may allow an attacker to get funds for free
This commit is contained in:
@@ -14,6 +14,7 @@ import {DODOMath} from "../lib/DODOMath.sol";
|
||||
import {Types} from "../lib/Types.sol";
|
||||
import {Storage} from "./Storage.sol";
|
||||
|
||||
|
||||
/**
|
||||
* @title Pricing
|
||||
* @author DODO Breeder
|
||||
@@ -84,7 +85,7 @@ contract Pricing is Storage {
|
||||
uint256 Q2 = DODOMath._SolveQuadraticFunctionForTrade(
|
||||
targetQuoteAmount,
|
||||
quoteBalance,
|
||||
DecimalMath.mul(i, amount),
|
||||
DecimalMath.mulCeil(i, amount),
|
||||
true,
|
||||
_K_
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user