Skip to content

NEP: Extended Token Standard#122

Closed
steven1227 wants to merge 3 commits intoneo-project:masterfrom
steven1227:master
Closed

NEP: Extended Token Standard#122
steven1227 wants to merge 3 commits intoneo-project:masterfrom
steven1227:master

Conversation

@steven1227
Copy link
Member

Here this NEP defines an extended token standard for the Neo Smart Economy. The extended standard interface for contracts that manage multiple types of tokens including Non-Fungible tokens and Fungible tokens. This Standard can help the developer to manage different kind of tokens much easier. It can also reduce the transaction fee by grouping those tokens together.

@erikzhang
Copy link
Member

Don't modify README.mediawiki when creating PR.

@steven1227 steven1227 force-pushed the master branch 2 times, most recently from c405a83 to 97651ca Compare May 25, 2020 07:32
@erikzhang
Copy link
Member

erikzhang commented May 25, 2020

And don't assign NEP number by yourself. The NEP editor (that is, me) will assign the NEP number when the proposal is accepted.

@steven1227
Copy link
Member Author

And don't assign NEP number by yourself.

OK. Will change it soon

@steven1227 steven1227 changed the title add nep-17 draft ( Extended Token Standard) NEP: Extended Token Standard May 25, 2020
Mint an <code>amount</code> of Fungible Token to an address.

The user who invoke this function MUST be the creator of this type of Fungible Token . If not, this method SHOULD throw an exception.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By type you mean the hash of the contract, @steven1227?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here type is the unique mark of one kind NFT/FT. In this standard, the hash of this contract is just the address of this contract, has no use inside the contract. Each kind of NFT/FT in this standard will be created by the creator with an assigned type. The type can be used to clarify which NFT/FT a token belongs, and also used to distinguish if it is an NFT or FT by using bit masking on this type

Copy link
Member

@vncoelho vncoelho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice proposal @steven1227, this is important for gaming and other applications. Good move!
I believe there is space for discussions and even additional functionalities. Let's move it forward.

@steven1227
Copy link
Member Author

The word mortgage maybe inappropriate. Let us change it to collateral

@steven1227
Copy link
Member Author

The reason why the neo ecosystem is needing the new extended token standard is to combine the FT and NFT together in one system and decrease the expense of multiple times transfer transaction invocation. The other regulation this the collateral of the NFT. In most cases, the NFT should have value inside and the NEO token used as collateral makes it naturally has the value in the neo ecosystem.

Below is the explanation of NEP-5 token (sorry for my terrible drawing skill).
WechatIMG1

The NEO-5 token standard is great when the user wants to have some initial token offering and makes the basic type of smart economic available on the neo ecosystem. However, those tokens are fungible tokens which means there is still a scenario that we need to define digital items with identical ownership. Here comes the NEP-11 proposal which is the NFT standard in the neo ecosystem:

WechatIMG22

The purpose of the NEP-11 standard is to make the NFT available in the neo ecosystem. The NFT standard is different from NFT in the other blockchain is that the NEP-11 make the NFT is divisible.
This makes the NFT power it is kind of making the NFT also can be fungible when there is a specific case. However, this makes the developer such as Dapp/Wallets/Explorers difficult to the developer and maintain.

WechatIMG33

In addition, it also makes the transaction of some scenarios very expensive. Imaging in one game, you have a big car, then inside the car, each equipment is an NFT such as tire, exhaust pipe. So for such a case, you have to create a number of NFT contracts as per type. When the user exchanges the car to another account, you have two make two different transactions. It increases the fee of the transaction.

Here is the new design of the token standard that includes both the FT and NFT. The creator can first create a type of token. It can be FT or NFT. Once the token type is defined, the user can mint the related token. In such a way, one contract can manage the unlimited type of FT/NFT, and user can batch transfer both the NF and NFT in one transaction. The standard is compatible with the NEP-11 which is also managing each NFT as indivisible and can make the divisible ones as a fungible token.

WechatIMG4

Finally, here when minting the NFT, the user has to use at least one NEO as collateral. This is required for making the NFT has backing value. The backing valued NFT tokens represents unique digital or physical assets.
WechatIMG5

@edgedlt
Copy link

edgedlt commented May 29, 2020

This is likely a good direction to move. Ethereum has shown some success in this regard with ERC-1155, with Enjin also moving in the direction of backing each item with another token (ENJ in their case) in order to "imbue" the NFT with value.

I think this is a very interesting proposal, especially if it possible to melt/burn the asset to retrieve the collateral. Say if a game goes offline and NFTs would become worthless; this means that the user can always get something back out of it.

One important change would be to use GAS for collateral instead of NEO. Indivisibility means that NEO does not have the required granularity for this use case, and we should not be locking the governance token into random NFTs, we should be encouraging NEO holders to use their NEO to vote.

@nimmortal
Copy link

Hello guys!
We at blockchaincuties have implemented something similar to the proposed standard.
However, we got issues with methods like tokensOf, because it can be too expensive to read the whole storage. From my point of view, contract interface looks good, but need more technical details how to implement batchTransfer and other things to make it cost efficient.

@imyourm8
Copy link

imyourm8 commented Jun 4, 2020

As i understand type is part of the token id?

@imyourm8
Copy link

imyourm8 commented Jun 4, 2020

Hello guys!
We at blockchaincuties have implemented something similar to the proposed standard.
However, we got issues with methods like tokensOf, because it can be too expensive to read the whole storage. From my point of view, contract interface looks good, but need more technical details how to implement batchTransfer and other things to make it cost efficient.

Yes, that's why enumeration should be done through the events.

@steven1227
Copy link
Member Author

This is likely a good direction to move. Ethereum has shown some success in this regard with ERC-1155, with Enjin also moving in the direction of backing each item with another token (ENJ in their case) in order to "imbue" the NFT with value.

I think this is a very interesting proposal, especially if it possible to melt/burn the asset to retrieve the collateral. Say if a game goes offline and NFTs would become worthless; this means that the user can always get something back out of it.

One important change would be to use GAS for collateral instead of NEO. Indivisibility means that NEO does not have the required granularity for this use case, and we should not be locking the governance token into random NFTs, we should be encouraging NEO holders to use their NEO to vote.

Good point, may be we can use GAS instead and maybe set a minimum GAS fee requirement?

@steven1227
Copy link
Member Author

Hello guys!
We at blockchaincuties have implemented something similar to the proposed standard.
However, we got issues with methods like tokensOf, because it can be too expensive to read the whole storage. From my point of view, contract interface looks good, but need more technical details how to implement batchTransfer and other things to make it cost efficient.

Thanks, BlockchainCuties. Yes, we understand the expensive fee situation in Neo2. However, in Neo3, the fee is adjusted. For the detailed implementation, I (or anyone) can make one when the Neo3 testnet is launching.

@steven1227
Copy link
Member Author

As i understand type is part of the token id?

The tokenId is specific for each NFT and no matter which type of NFT it is. The type is an id to distinguish the different types of tokens are. They are different meaning and usage

@steven1227
Copy link
Member Author

This is likely a good direction to move. Ethereum has shown some success in this regard with ERC-1155, with Enjin also moving in the direction of backing each item with another token (ENJ in their case) in order to "imbue" the NFT with value.
I think this is a very interesting proposal, especially if it possible to melt/burn the asset to retrieve the collateral. Say if a game goes offline and NFTs would become worthless; this means that the user can always get something back out of it.
One important change would be to use GAS for collateral instead of NEO. Indivisibility means that NEO does not have the required granularity for this use case, and we should not be locking the governance token into random NFTs, we should be encouraging NEO holders to use their NEO to vote.

Good point, may be we can use GAS instead and maybe set a minimum GAS fee requirement?

@edgedlt Recently after discussion with other people who are interested in this proposal, how about use NEP5 token as collateral? In this way, contract can define some specific method that enable user can only stake specific NEP5 token. Then, the NEO/GAS can be also used by using CNEO/CGAS

@edgedlt
Copy link

edgedlt commented Sep 2, 2020

NEP-5 sounds good to me. It will also work nicely with NEO/GAS when we migrate the standard to Neo3.

@erikzhang
Copy link
Member

@neo-project/everyone Please check https://github.com/erikzhang/neo-asset-combiner

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