-
Notifications
You must be signed in to change notification settings - Fork 229
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
Bridge contracts to support non-fungible tokens (ERC721) #46
Comments
The mirroring method described by @akolotov at #46 to bridge an ERC721 non-fungible token (NFT) allows owners to maximize utility and safely harbor assets on one of two blockchain networks. With additional definition, this can extend to harboring assets on one of two or more blockchain networks, and become the standard vehicle for NFT liquidity. This document discusses and documents the protocol for its deployment. Following is a modified version of Alexander's definition of Mirroring, defined as Stateful Binary Bridge Mirroring: Stateful Binary Bridge Mirroring is the complete transition of a token from one chain to another through State Transformation. The token on one side of a Binary Bridge ( a bridge with exactly two end-points) is locked for all operations (token data and token ownership cannot be changed) and a mirrored or identical token is created (minted) on the chain at the opposite side of that binary bridge. The situation is repeated if the token is bridged to any new blockchain other than the blockchain of origin, meaning the token is always locked for all operation on the egress blockchain and a new, identical or mirrored token is created (minted) on the ingress blockchain, allowing the Token to travel freely between blockchains as its owner may desire. Visually:
When a token is sent from any blockchain to a blockchain of origin (a blockchain with a locked or "frozen" instance of the token in play) the token shall be burned (destroyed) on the Egress blockchain and "revived" (unlocked) on the Ingress blockchain, where it will inherit any state differences from the token in play. In this manner, An ERC721 token (or any token using the Stateful Binary Bridge protocol) must exist on exactly one blockchain, can exist in a frozen state on all ERC721 compliant blockchains other than the blockchain carrying the Stateful (active) token, and has potential to exist on all chains not currently home to the Stateful token or a frozen instance of the token. Any Ingress blockchain carrying a frozen instance of a token is indistinguishable from and therefore considered to be the blockchain of origin. The Stateful Binary Bridge protocol requires the Ingress blockchain to signal the Egress blockchain as to the state of the Token in play on its blockchain. There are exactly two potentially valid responses: Origin - a frozen instance of the token in play exists on the Egress blockchain, represented as "0" - or Ready - the potential exists to carry the token in play, represented as "1." The response signals the Egress blockchain upon successful crossing to either burn the on-chain token in play or else freeze the token until such time where it is activated as an Ingress blockchain with the identical token in play. Once burned, an instance of that token no longer exists on the Egress blockchain and it again has potential to carry that token, like all compatible blockchains. Stateful Binary Mirroring is a Protocol Definition for Practical ERC721 Bridging, may be implemented as an ERC721 specific or broad-protocol bridge, and can fill a significant demand in the Ethereum ecosystem. Jim O'Regan, posted to #46 June 25, 2018 |
Here is draft of NFT POA Bridge proposals: Thesis:
Scenario #1: transfer NFT from Home to Foreign
Scenario #2: withdraw NFT from Foreign to Home
|
Is there any progress on this? We would love to use it. |
Hi @marekkirejczyk! Thanks for interesting in the feature. The main idea was to implement Arbitrary Message Bridging (#73) first as so the NFT bridging feature could be implemented with usage of this technology. The AMB was started implementing (#77) but was postponed a bit due to other HP activities. |
ERC721-to-ERC721 on top of AMBWe will have an ERC721 on the Foreign network that will be bridged to the Home network using AMB. The approach to interact with AMB bridge will be similar to how ERC677-to-ERC677 works #267 Every ERC721 will have its unique way to define their metadata attached to the tokens id, so the implementation of the contracts should be generic leaving only some methods related to getting/setting the serialization of the metadata to be defined for the desired ERC721 that wants to be bridged. For our implementation, we can define an ERC721 that extends this OpenZeppelin implementation. We can use the method function mintWithTokenURI(address to, uint256 tokenId, string memory tokenURI) public onlyOwner returns (bool) {
_mint(to, tokenId);
_setTokenURI(tokenId, tokenURI);
return true;
} Transfer from Foreign to Home
Transfer from Home to ForeignThe opposite direction works similar but the Token Manager on the Home side burns the token and the Foreign Token Manager will call |
We are preparing the reference implementation of NFT bridge as part of the demo to transfer CryptoKitties tokens. The issue will be closed as soon as the demo is performed. |
The functionality to transfer NFTs between chains was successfully tested and documented. The issue is being closed. |
The next phase of bridging assets between two blockchain network is to transfer non-fungible tokens (NFT). ERC721 could be used as the actual standard of NFTs.
There are few possible approaches to transfer NFTs between networks:
Depending on the approach bridge contracts could be different. So, under this issue is being suggested to choose and discuss particular approach (or suggest a new one) and implement bridge and token contracts as per chosen way.
As soon as the contracts are developed another issue for off-chain part of bridge (https://github.com/poanetwork/poa-bridge or https://github.com/poanetwork/bridge-nodejs/) to introduce corresponding logic should be created.
The text was updated successfully, but these errors were encountered: