-
I was always confused with CKB's decimals between layer1 and layer2, so I open this discussion to make it clear. Now there're 3 places to display the amount of CKB.
I thought there were two CKB in layer 2, the one used in transfers between users(called CKB), and the other one used to pay the transaction fee(called gCKB). The CKB transferred between users has deciamls 8, which is the same as that of CKB in layer 1, while the gCKB used to pay fee has decimals 18. In this case, when user A deposits 1 CKB(10^8 shannons) from layer 1 to layer 2, 1 CKB(10^8 shannons) will be minted on layer 2, and the record will be displayed as follow,
and user A's balance is then user A transfers 0.5 * 10^8 shannons(0.5 CKB) to others with 100 shannons(100 * 10^-18 pCKB), the record will be displayed as follow
user A's balance turns into This is my understanding of CKB and pCKB before. Today I've learned that there's only one CKB in layer 2, gCKB, which has decimals 18. When 1 CKB(10**8 shannons) in layer 1 is deposited to layer 2, 1 gCKB(10^18 gshannons) will be minted. Then the example mentioned above becomes
user A's balance is
user A's balance is Is the second case correct? @Flouse @gpBlockchain |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
cc @classicalliu, @zeroqn |
Beta Was this translation helpful? Give feedback.
-
Confirmed with @gpBlockchain and @classicalliu that the second case is correct |
Beta Was this translation helpful? Give feedback.
Confirmed with @gpBlockchain and @classicalliu that the second case is correct