🚧WIP: Scaling different decimal representations
Last updated
Last updated
TokenA is set up with 18 decimals (WAD)
TokenB is set up with 6 decimals
If you want to convert between different representations you have to multiply or divide depending on the difference in decimals count:
B is a WAD
Normalize B by dividing by its decimal places, 10**18
Then scale up by the desired decimals, 10**6
However, when applying in solidity, we have to reverse the order of operations to ensure division is done last.