From 37125600a511c2b41893e8a16da920a0eb4fc9b6 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 9 Nov 2021 09:41:05 +0000 Subject: [PATCH] consolidate & rewrite NFT docs --- content/concepts/nft.md | 37 +++++++++++++++++++++++-------------- content/concepts/roles.md | 25 ------------------------- data/sidebars/concepts.yml | 4 +--- 3 files changed, 24 insertions(+), 42 deletions(-) delete mode 100644 content/concepts/roles.md diff --git a/content/concepts/nft.md b/content/concepts/nft.md index 56afa38a..0cea874a 100644 --- a/content/concepts/nft.md +++ b/content/concepts/nft.md @@ -1,40 +1,49 @@ --- -title: v4 NFT introduction -description: The page describes NFT, IP and sub-licensing using Ocean Protocol's contracts, and use case. +title: Data NFTs +description: Ocean Protocol uses ERC721 NFTs to represent the intellectual property (IP) of published datasets or algorithms, and to further sub-license access to it with user roles or ERC20 data tokens. --- -## NFTS - -A non-fungible token stored on the blockchain represents a unique asset. NFTs can represent images, videos, digital art, or any piece of information. NFTs can be traded and allow transfer of ownership and copyright. [EIP-721](https://eips.ethereum.org/EIPS/eip-721) defines an interface for handling NFTs on Ethereum blockchain. The creator of the NFT can deploy a new contract on Ethereum or any Blockchain supporting NFT related interface and also, transfer the ownership through the transaction(s). +A non-fungible token stored on the blockchain represents a unique asset. NFTs can represent images, videos, digital art, or any piece of information. NFTs can be traded and allow transfer of ownership and copyright. [EIP-721](https://eips.ethereum.org/EIPS/eip-721) defines an interface for handling NFTs on Ethereum blockchain. The creator of the NFT can deploy a new contract on Ethereum or any Blockchain supporting NFT related interface and also, transfer the ownership through transfer transactions. ## Terminology - **Base IP** means the artifact being copyrighted. Represented by the {ERC721 address, tokenId} from the publish transactions. - - **Base IP holder** means the holder of the Base IP. Represented as the the actor that did the initial "publish" action. - - **Sub-licensee** is the holder of the sub-license. Represented as the entity that controls address ERC721.\_owners[tokenId=x]. - - **To Publish**: Claim copyright or exclusive base license - - **To Sub-license**:Transfer one (of many) sub-licenses to new licensee: ERC20.transfer(to=licensee, value=1.0) -## Supporting NFT using Ocean Protocol +## Supporting NFTs using Ocean Protocol -Ocean Protocol defines [ERC721Factory](https://github.com/oceanprotocol/contracts/blob/v4main/contracts/ERC721Factory.sol) contract, allowing **Base IP holders** to create their ERC721 contract instances on any supported networks. The deployed contract stores Metadata, ownership, sub-license information, permissions. The creator of the contract can also create and mint ERC20 token instances for sub-licensing the **Base IP**. +Ocean Protocol defines the [ERC721Factory](https://github.com/oceanprotocol/contracts/blob/v4main/contracts/ERC721Factory.sol) contract, allowing **Base IP holders** to create their ERC721 contract instances on any supported networks. The deployed contract stores Metadata, ownership, sub-license information, permissions. The creator of the contract can also create and mint ERC20 token instances for sub-licensing the **Base IP**. -## Sub licensing the Base IP +## Sub-licensing the Base IP ERC721 tokens are non-fungible, thus cannot be used for automatic price discovery like ERC20 tokens. ERC721 and ERC20 combined together can be used for sub-licensing. Ocean Protocol's [ERC721Template](https://github.com/oceanprotocol/contracts/blob/v4main/contracts/templates/ERC721Template.sol) solves this problem by using ERC721 for tokenizing the **Base IP** and tokenizing sub-licenses by using ERC20. Thus, sub-licenses can be traded on any AMM as the underlying contract is ERC20 compliant. +## Roles + +[ERC721Template](https://github.com/oceanprotocol/contracts/blob/v4Hardhat/contracts/templates/ERC721Template.sol) contract defines following roles: + +### NFT Owner + +- NFT Owner is the publisher. I.e. Owner is a public address which transacted with `ERC721Factory` contract and deployed a new `ERC721` contract. +- NFT Owner can assign managers while deploying the contract. +- NFT Owner is also added to the Managers. +- NFT Owner can add/remove Managers. +- Clean all permissions + +### Manager + +- A public address with a `Magner` role can update the metadata +- Can deploy new ERC20 contract which is associtated with the `ERC721` contract. ## Use case 1 - + Alice is the creator of a painting and wants to make sure that the ownership of her artwork is uniquely determined. She performs the **Publish** action. She creates an ERC721 token which represents the ownership of the physical asset. Here, **Base IP** is Alice's artwork. **Base IP holder** is Alice. Now, Alice wants to transfer the ownership of her Artwork to Bob. So, Alice makes Bob's address as owner of the token in the discussion by sending a Blockchain transaction. ![Image 1](images/use-case-1.PNG) - ## Use case 2 Alice is the author of a book. Alice wants to hold the copyright of her work but, allows others to read her book. So, She creates 2 versions of her book namely: digital copy, physical copy. She assigns Bob as one of the holder of digital edition of the book. Here, **Base IP** is the book. **Base IP holder** is Alice and Bob is **Sub-licensee** for a digital edition of the book. Alice tokenizes her work by performing **Publish** action i.e _ERC721.safeMint(to=aliceWalletAddress, tokenid=1)_. Alice also creates sub-licenses of her book by creating two ERC20 tokens and transfers the digital copy token to Bob's wallet. diff --git a/content/concepts/roles.md b/content/concepts/roles.md deleted file mode 100644 index dfe547cb..00000000 --- a/content/concepts/roles.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: v4 roles and permissions -description: The page describes the roles and permissions present in ERC721Template contract. ---- - -## Roles - -[ERC721Template](https://github.com/oceanprotocol/contracts/blob/v4Hardhat/contracts/templates/ERC721Template.sol) contract defines following roles: - -- NFT Owner -- Manager - -## NFT Owner - -- NFT Owner is the publisher. I.e. Owner is a public address which transacted with `ERC721Factory` contract and deployed a new `ERC721` contract. - -- NFT Owner can assign managers while deploying the contract. -- NFT Owner is also added to the Managers. -- NFT Owner can add/remove Managers. -- Clean all permissions - -## Manager - -- A public address with a `Magner` role can update the metadata -- Can deploy new ERC20 contract which is associtated with the `ERC721` contract. diff --git a/data/sidebars/concepts.yml b/data/sidebars/concepts.yml index 0edff29b..c90edef4 100644 --- a/data/sidebars/concepts.yml +++ b/data/sidebars/concepts.yml @@ -6,10 +6,8 @@ link: /concepts/quickstart/ - title: Architecture Overview link: /concepts/architecture/ - - title: NFTs + - title: Data NFTs link: /concepts/nft/ - - title: Roles - link: /concepts/roles/ - title: Supported Networks link: /concepts/networks/ - title: Deployments