Closed elpiel closed 3 years ago
Postgres: Since we are using a u64
to store the UnifiedNum
we can use bigint
(max of 9_223_372_036_854_775_807
) and although we can handle half of what u64::MAX
= 184_467_440_737.09551615
, it should not cause any issues.
Otherwise an error will be raised by the database and caught in Sentry.
https://github.com/AdExNetwork/aips/issues/61
Create a Unified Precision number (
UnifiedNum
) with precision of 8 that will be used for all calculations, except when we are creating the MerkleTree, where we need the actual precision of the token in order of the MerkleTree to be calculated properly.UnifiedNum
(including DB) & floor all the calculationsbigint