-
Notifications
You must be signed in to change notification settings - Fork 7
CBP-2: fungible token standard #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Witter <[email protected]>
|
加入 |
|
加入 学习 |
|
Feasible consensus path:
For each consensus, we will hold a community meeting to form a consensus. When the consensus of the community meeting is reached, an on-chain consensus will be formed through NNS proposal to solidify the consensus result. |
|
Great! |
LGTM |
|
申请加入,我们是RGstudio, 现在在做一个thanat0s-Dao的nft项目 |
|
I'd like to get a feeling about what you think this solves that DIP20 doesn't solve. They seem pretty similar. |
CBPs/cbp-0002.md
Outdated
|
|
||
| - Question: Which identity to use as a token standard user? | ||
|
|
||
| - Consideration: Dfinity's II is an implementation of DID, and II is based on Principal ID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't II look like a Principal ID to canisters?
Should a token standard care too much about what kind of client is communicating with it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Principal & AccountId somehow makes sense can be confusing, but as a token standard, choosing to support only Principal is the easiest, but being AccountID compatible will keep users from passively choosing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah, AccountIDs aren't great. Hash(PrincipalID, SubAccount) is equivalent to AccountID.
I think (PrincipalID, SubAccount) may make more sense, or just drop the SubAccounts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here my idea is different, I think IC official team design AccountID is in privacy protection considerations; (PrincipalID, SubAccount) lead to different sub-accounts, will expose Principal. but AccountID, can play a privacy protection role, so the token standard should not choose to reduce in privacy protection level, which is why I think it is necessary to support AccountID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, it's mainly to allow privacy for canisters holding balances because obviously an individual can generate an unlimited number of private keys trivially for privacy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, but I think most people are lazy, and also creating more private keys can be prone to loss or forgetting, if a Principal can serve the purpose of protecting privacy is a better and simpler way
|
|
||
| 6. No black hole address | ||
|
|
||
| - Question: If there is a need to destroy Token, how to deal with it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something I liked about the ICP design was there was a constant finite number of tokens.
This meant we could use fixed length numbers since overflow was impossible and we could test this invariant.
Having a mint/black hole address solves this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Supporting mint/burn is clear and straightforward for meeting such a need, but not every token needs an interface like mint/burn, so mint/burn should not be in the standard. Tokens that need them implement them themselves
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ICP is a specific token and therefore can be defined in a targeted manner. However, as a token standard, different token issuers need to be considered, with different requirements for the numbers
Something I liked about the ICP design was there was a constant finite number of tokens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair point
CBPs/cbp-0002.md
Outdated
|
|
||
| - Question: What Is Nonce In Ethereum? every transaction has a nonce. The nonce is the number of transactions sent from a given address. Each time you send a transaction, the nonce increases by 1. There are rules about what transactions are valid, and the nonce is used to enforce some of these rules. Does Dfinity's token standard need to incorporate a nonce mechanism? | ||
|
|
||
| - Consideration:If the nonce mechanism is supported, it can prevent users from repeatedly submitting transactions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The IC already prevents the same message being sent twice, using a nonce in the message.
This nonce is there to allow stable transaction IDs to be generated offline for the benefit of exchanges.
If you want these tokens to be one day tradable on an exchange you probably want to keep the nonce.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IC's nonce does not give developers a way to use the nonce in order for developers to avoid sending the same transaction, which is important. Of course, if IC had a clear way to support developers using nonce, there would be no need for nonce to be in the token standard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sorry I should be more clear.
Every ingress message sent to the IC has a nonce generated to ensure that a transaction can't be resent.
In addition there is a second nonce which is included in the block.
The exchanges enforce an invariant that each transaction must have a statically derivable globally unique request ID. This second nonce helps ensure that each transaction is globally unique.
This is also why we have the created_at field in ICP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for your patience, I think this approach makes sense, using create_at as the second nonce would be simpler and I believe developers would like this approach more. I will adjust the proposal according to your suggestion
|
|
||
| **Information self-describing** | ||
|
|
||
| Etherscan, MyEthereumWallet, Imtoken, TokenPocket, Dapp all have more information requirements for ERC20, such as Logo, introduction, white paper, social media, official website, contact information, etc. Each of them that needs this information needs to be maintained independently, so information appears Inconsistent. It is necessary to solve this problem through the design of <strong>[Dfinity Fungible Token Standard]</strong> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if you match the Rosetta block fetching interface, you should get the ic.rocks token explorer working for you for free.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is something I am not in a hurry to implement. Because I think the token standard is more important community consensus, when the community consensus is reached, support resetta is easy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I'm not suggesting supporting Rosetta in the standard. But having a block fetching interface like ICP allows CEXes to use the token and more importantly allows you to have backups of the transaction logs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, and I think this issue can be put to the interface consensus stage to discuss and make the decision, which does make sense.
|
It's great to see that you're reading this proposal carefully, and I appreciate your comments.
|
|
But DIP20 is a token standard rather than a specific implementation? |
|
If we think of it that way, then DFT, IS20,DRC20, and EXT are all token standards. So let's talk about what the standard itself should look like, it will make us more focused |
1. Improvement content 2. Removing notify support 3. Replace nonce with timestamp
|
Hi, @DavidM-D, thank you for participating in the discussion, your discussion has provided meaningful suggestions for Token standard evolution. I have improved the proposal content |
The IC developer community is welcome to participate in the discussion of Token standards and build a community consensus Token standard