ABDKMath64 performs multiplication on results of division #151
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Lines of code
https://github.com/code-423n4/2022-04-mimo/blob/main/core/contracts/libraries/ABDKMath64x64.sol#L626
https://github.com/code-423n4/2022-04-mimo/blob/main/core/contracts/libraries/ABDKMath64x64.sol#L629
https://github.com/code-423n4/2022-04-mimo/blob/main/core/contracts/libraries/ABDKMath64x64.sol#L630
Vulnerability details
Impact
Solidity could truncate the results, performing multiplication before division will prevent rounding/truncation in solidity math.
Recommended Mitigation Steps
Consider ordering multiplication first.
The text was updated successfully, but these errors were encountered: