-
Notifications
You must be signed in to change notification settings - Fork 20
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
KIP-0031: Fungible token Metadata #63
base: master
Are you sure you want to change the base?
Conversation
I am not sure 100% about circulating supply, it might be easier/better to have a trusted ecosystem project run a daily or weekly update service for this but max supply is definitely good to capture. Worth a wider discussion at the very minimum. I'd love to hear from wallets, dexs, and other services that pull in token information. |
The idea behind this is to have "Best effort approach". Nothing is mandatory, and based of good faith and interpretation of tokens issuers. It let the responsibility for tokens to report the information themselves. Several cases could happen:
=> But in all cases, it's at least better than nothing. Note that this is not incompatible with third party scripts, that could provide this information too, and spot scammers. Anyway 3rd party projects may have some limitations for exacting data if they are not aware of the internals of the token. Think for example about $BRO, whose the "non-circulating" supply is kept on a special account... and a dumb script won't be aware of that. |
I believe that's fine as we are talking best case for circulating supply and something is better than nothing. I would however like to consider removing the color field, as I don't feel like it adds anything. |
Hi, in general this KIP has received positive internal feedback from the Kadena team. I'll re-post some of the feedback one of the team members gave that summarizes the main points:
Some additional feedback and notes:
Logistical planning (open for discussion):
|
I have some reservations on this kip \1. if this is a KIP (which I think is too intrusive given that it's a Kadena improvement proposal, not a community standard (on separate note, should we have something that represent community standards? Like KIP-0017, or KIP-0026 draft)), should we make this for coin as well? If we do, how will Practical considerations |
The fungible-v2 already has a Note: Decimals in Kadena have a different meaning and usage than in ERC-20.
Smoothly, as soon chainweb preserves general backward compatibility for Smart Contracts.
Yes.
Yes
Yes it is... That's why the proposed interface is called
Yes, I can add this in the KIP Markdown document, but I'm not sure that the right place for such guidance is in the Standard itself.. Maybe in an annexed document ?
In this case there are 2 possibilities: either:
As I wrote above: IMO no.
Nothing mandatory. But IMO this is not necessary, as the coin contract should be kept at a minimum... And the coin contract is already well known by all wallets and Dapp..
Yes
Of course Important note: The philosophy of this KIP is not to enforce a mandatory upgrade... From a “technical” point of-view, |
I don't know... It depends on the internal policy of Kadena.
IMO No. The coin contract should be kept at a minimum... And the coin contract is already well known by all wallets and Dapp..
ERC-20 provides only 2 optional fields for meta-data:
Because IMO, we should separate two things:
Yes... It's included in
Nothing we can do on a public blockchain. Trademark enforcement is not in the scope of a blockchain. It's up to the user to enter trusted tokens modules refs in his wallet.. Or it's up to the wallet's maintainers to list safe tokens.
It's up to the token issuer to decide wether the token has a main-chain, and what is the main-chain. For dynamically minted token (eg token related to a bridge), this will be the chain where tokens are minted: the "chain who knows the supply information"
The idea behind |
- Data Overhead: Data only needs to be written to a single chain's contract (e.g. register on one of the first 20 chains) An interface seems to be to unpredictable, a simple 2-step dApp (e.g kadena tools) without added cost, with a copy paste guide into your contract main chain, (for dynamic supplies) at step 2 would be sufficient. However, aside from the potential network requests/duplicated data, I don’t mind either way.
- Supported Chain Ranges: Chains should support configurable ranges, on input, e.g., chains: 0-4, 9-19 (1.) Possible example: Open sig tool/contract:/interface, public registration period per contract (e.g., a month), with a namespace created and contract 'deployed'/signed using keys-all. This would likely require a special form of pre-signature capability to sign for the contract deployment after principal namespace got created, or so.. to make it more feasible and resilient to off-chain manipulation on the signing date, in case some participants don’t show up to sign, @kadena_io
(2.) For this specific case, in combination with a minimal open-source metadata registration tool (HTML, vanilla JS). |
We could refer to the Ethereum (ERC-721) metadata standard. Search in the browser on "metadata". ERC-721 is a standard for non-fungible tokens, but it could be applied to fungiibles. It is also an optional standard. It uses a JSON schema that has most of the metadata properties in a |
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.
Looks thank you @CryptoPascal31. Adding some comments here.
|
||
## Abstract | ||
|
||
Define and implement a new way for tokens creators to export their Meta-Data to Wallets, Frontends, and Other services. |
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.
Define and implement a new way for tokens creators to export their Meta-Data to Wallets, Frontends, and Other services. | |
Define and implement a new way for tokens creators to export their Metadata to Wallets, Frontends, and Other services. |
|
||
## Rationale | ||
|
||
While `fungible-v2` provides technical functions to allow "technical on-chain" interoperability between tokens, meta-data and information about fungible tokens are missing. |
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.
While `fungible-v2` provides technical functions to allow "technical on-chain" interoperability between tokens, meta-data and information about fungible tokens are missing. | |
While `fungible-v2` provides technical functions to allow "technical on-chain" interoperability between tokens, metadata and information about fungible tokens are missing. |
|
||
Moreover, token issuers have no clean and defined way to inform wallets when some changes happen with their token (Rebrand, new issuance, ...) | ||
|
||
And finally, since Kadena is multichains, wallets need to be informed on how to use the token, regarding chains deployment: |
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.
And finally, since Kadena is multichains, wallets need to be informed on how to use the token, regarding chains deployment: | |
And finally, since Kadena is consists of multiple chains, wallets need to be informed on how to use the token, regarding chain deployment: |
- Some tokens may not be available on all chains. | ||
- Some tokens may have a single issuance chain where supply is accounted | ||
|
||
The proposal is **to create an optional interface that can be implemented by token modules** to automatically inform third parties about their meta-data, and displayable information to users. Wallets, frontends, ... are expected to make local calls to the `kip.fungible-meta` implemented functions. |
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 proposal is **to create an optional interface that can be implemented by token modules** to automatically inform third parties about their meta-data, and displayable information to users. Wallets, frontends, ... are expected to make local calls to the `kip.fungible-meta` implemented functions. | |
The proposal is **to create an optional interface that can be implemented by token modules** to automatically inform third parties about token metadata and displayable information to users. Wallets, frontends, ... are expected to make local calls to the `kip.fungible-meta` implemented functions. |
- Usually, minting / burning / emission happens on a single chain. | ||
- **But other chains are not aware**: they just receive X-chain transfers. | ||
|
||
As a consequence, it's highly probable that supply information won't be accurate on most chains. That's why this KIP proposes the concept of **main-chain** => The module itself informs the client where an accurate value of supply amounts can be found. |
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.
Supply will be accurate on individual chains if there as a chain-level supply noted in the interface for a token's metadata, just not a "total supply" across all the network. I think here, we need to separate the idea of what is autonomous metadata, as in facts that a ledger can keep about itself, vs dependent metadata - facts that require some kind of oracle to contribute. A main chain being an example of this oracle, but not the only valid kind out there.
Return general information about a token: | ||
- `symbol` *string*: Token Ticker symbol. Usually a short name in uppercase. | ||
- `name` *string*: Token name. Usually a relative short name composed of 1 or 2 words. | ||
- `description` *string*: Longer description of the token. Not mandatory |
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.
proposing a maxchar cap on this to avoid spamability
- `color` *string*: A CSSv4 compatible color (https://www.w3.org/TR/css-color-4/#typedef-color). Not mandatory. Can be used by wallets or frontends for some graphical displays (charts ...) | ||
- `socials` *[object:{kip.fungible-social-schema}]*: A list of tuples (`type` *string*, `url` *string*). The list of allowed types (non limitative): "discord", "twitter", "website", "telegram", "reddit", "github" | ||
|
||
**Note:** All optional fields must use an empty string if the information is not provided. |
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.
which ones are optional? Is this the same as "not mandatory"? Why are socials
mandatory?
##### (main-chain) | ||
-> *string* | ||
|
||
Return the main chain (if any) of the token. Usually, it's the issuance chain. This chain is expected to have the most reliable information about total and circulating supply. All compliant wallets should request this chain before displaying supply information to the user. |
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.
Now, considering what I wrote above, is this something that implementors are expected to update with market data on a day to day? What's the good faith expectation here?
|
||
Return the total circulating supply. If unknown, 0.0 can be returned. This information might be relevant only on the main chain. | ||
|
||
**Important note:** All those functions implementations must be "Read-Only pure". They are not allowed to write data or have any side effects. |
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.
I think that the level of relevance here is why i'm advocating not having main-chain
here, and letting individual ledgers track their own burns and creates without attempting a Kadena-wide supply.
The goal of this KIP is
This KIP is an early draft. I'm not sure that all needs are covered.
Reviews, pros, cons, comments, improvements, and suggestions are welcome and desired
GH Formatted Markdown document link:
https://github.com/CryptoPascal31/KIPs/blob/kip-031/kip-0031.md
GH formatted interface code:
https://github.com/CryptoPascal31/KIPs/blob/kip-031/kip-0031/fungible-meta-v1.pact
And example:
https://github.com/CryptoPascal31/KIPs/blob/kip-031/kip-0031/example-token.pact
EDIT: Added 3 new paragraph to address questions