-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Non-Fungible Token State Verification (for exchanges) #1180
Comments
Why do we need array of StateHashHolder? Wouldn't one be enough? Extending hash functionality can be achieved by creating new StateHashHolder which uses previous one. |
@OrdonTeam There are many unrelated contracts that might keep state of a single token. Let's take CryptoKitties as an example: as a user when buying a kitty, you may be interested in any combination of:
Each of these states is kept in separate contracts and hashes of their state will likely be calculated inside such contracts in future (or can be done by deploying separate contract as shown above), so there is a need for exchange platforms to uniformly verify for all contracts users care about if state matches. |
👍 I didn't get that as a buyer I'm choosing in which |
Neat! Defining state holders & the oracles around them will be an interesting problem, but I like this approach for condensing that information into an on-chain-checkable value. |
Wyvern already has something similar built-in (search for https://github.com/ProjectWyvern/wyvern-protocol/blob/master/build/whitepaper.pdf https://github.com/ProjectWyvern/wyvern-ethereum/blob/master/contracts/exchange/ExchangeCore.sol Would like to see examples using this. |
@mg6maciej love this idea. I just had a conversation with @mudgen and this topic came up! We definitely need exchanges, wallet and dapps to be able to treat common token types as equals, provided their on-chain representations meet a certain level of criteria. Thanks for posting and starting the conversation! 😃 |
I think this standard is important functionality and I like what @mg6maciej has suggested here. I implemented the |
There has been no activity on this issue for two months. It will be closed in a week if no further activity occurs. If you would like to move this EIP forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review. |
This issue was closed due to inactivity. If you are still pursuing it, feel free to reopen it and respond to any feedback or request a review in a comment. |
Motivation
This is to start a discussion on secure exchange of NFTs, as there are potential problems with front running, where seller can change state of token (and lower its value) before buy transaction is added to blockchain.
Details & Implementation
While what we really own is a unique number known as tokenId in a namespace of certain contract, often it's something else that makes us want to own that number. Many tokens have state we look at when buying them, be it a number of won/lost battles by a bot, how many children a token currently has or if a kitty owns some awesome hats or balloons.
Such state can easily change between order fill transaction is sent to miners and mined, so for the benefit of users buying these numbers, it would be good to allow them to specify state they care about and fail order fill tx if their desired state is changed. This is particularly useful for protocols that do not escrow tokens like 0x or wyvern.
As this state can often live outside of the original NFT contract, I propose the following interface:
The composed hash that is checked against would be a XOR of all hashes:
This is compatible with currently deployed NFTs, as they could implement
StateHashHolder
via separate contract.Here is how it could be implemented for CryptoKitties "virginity":
Do you see any other use-cases apart from when exchanging NFTs?
The text was updated successfully, but these errors were encountered: