Skip to content

Conversation

@witterlee
Copy link
Contributor

The IC developer community is welcome to participate in the discussion of Token standards and build a community consensus Token standard

@lurenyi558
Copy link

加入

@lurenyi558
Copy link

加入 学习

@witterlee
Copy link
Contributor Author

witterlee commented Mar 5, 2022

Feasible consensus path:

  1. Major Features consensus
  2. Secondary Features consensus
  3. Optional Features consensus
  4. Definition consensus of key elements
  5. Candid interface consensus

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.

@lshoo
Copy link

lshoo commented Mar 16, 2022

Great!

@neeboo
Copy link

neeboo commented Mar 16, 2022

Feasible consensus path:

  1. Major Features consensus
  2. Secondary Features consensus
  3. Optional Features consensus
  4. Definition consensus of key elements
  5. Candid interface consensus

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.

LGTM

@8X8X
Copy link

8X8X commented Mar 17, 2022

申请加入,我们是RGstudio, 现在在做一个thanat0s-Dao的nft项目

@DavidM-D
Copy link

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

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?

Copy link
Contributor Author

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

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

Copy link
Contributor Author

@witterlee witterlee Mar 30, 2022

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

Copy link

@DavidM-D DavidM-D Mar 30, 2022

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.

Copy link
Contributor Author

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?

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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.

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

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.

Copy link
Contributor Author

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

Copy link

@DavidM-D DavidM-D Mar 30, 2022

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.

Copy link
Contributor Author

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>

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.

Copy link
Contributor Author

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

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.

Copy link
Contributor Author

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.

@witterlee
Copy link
Contributor Author

It's great to see that you're reading this proposal carefully, and I appreciate your comments.
I think the community consensus on the token standard is more important than a specific code implementation. So I hope that when talking about these consensuses, we should try to avoid talking about a particular code implementation so that we can focus on [whether the top-level design of the standard makes sense].

I'd like to get a feeling about what you think this solves that DIP20 doesn't solve. They seem pretty similar.

@DavidM-D
Copy link

But DIP20 is a token standard rather than a specific implementation?

@witterlee
Copy link
Contributor Author

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
@witterlee
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants