Add utility functions mulDivF and mulDivC, which allow to safely compute x * y / z (revert only if the actual result is larger than 256 bits).
In internal function LiquidityProtection.protectedAmountPlusFee, use function mulDivF, instead of function reducedRatio (which yields an approximated result).
Add utility function productRatio, which allows to compute (x * y) / (z * z) with high precision; we can later consider using it in order to improve the accuracy in internal function LiquidityProtection.compensationAmount
mulDivF
andmulDivC
, which allow to safely computex * y / z
(revert only if the actual result is larger than 256 bits).LiquidityProtection.protectedAmountPlusFee
, use functionmulDivF
, instead of functionreducedRatio
(which yields an approximated result).productRatio
, which allows to compute(x * y) / (z * z)
with high precision; we can later consider using it in order to improve the accuracy in internal functionLiquidityProtection.compensationAmount