Closed FrozenKiwi closed 2 months ago
Demo Account is 9c under-cushioned after 9 deposits
const cushion = await shockAbsorber.getCushion(address); cushion.fiatPrincipal.toNumber()
Conversion is calculated:
(coin * int(price) / 1e12);
to return: 17499
17499
However, in floating point, it becomes 17499.99980264426
Probable solution: add (5 * 1e6) to conversion on-chain
Fixed in prodtest
Fixed in prod
Demo Account is 9c under-cushioned after 9 deposits
Conversion is calculated:
to return:
17499
However, in floating point, it becomes 17499.99980264426
Probable solution: add (5 * 1e6) to conversion on-chain