tokamak-network / dashboard.tokamak.network

dashboard.tokamak.network
https://dashboard.tokamak.network
0 stars 0 forks source link

Use wei decimal instead of using ray decimal #83

Open shingonu opened 4 years ago

shingonu commented 4 years ago

Staked TON is WTON. WTON decimal is 27 not 18 (TON decimal is 18). So when user deposit TON, TON have to be swapped to WTON. If user withdraw WTON, WTON have to be swapped to TON.

Two tokens have different decimals. Issue is that when swapping(WTON -> TON) happened, small number can be discarded. So I think we should use only wei decimals.

image

shingonu commented 4 years ago

1154.620482089233694677643730828 -> 1154.620482089233694677