1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

GITBOOK-413: Added Contracts main page

This commit is contained in:
Ana Loznianu 2023-06-05 18:35:59 +00:00 committed by gitbook-bot
parent 7fd6471a5b
commit 59af9810d6
No known key found for this signature in database
GPG Key ID: 07D2180C7B12D0FF
20 changed files with 120 additions and 35 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

View File

@ -31,17 +31,18 @@
* [Liquidity Pools \[deprecated\]](user-guides/remove-liquidity-using-etherscan.md) * [Liquidity Pools \[deprecated\]](user-guides/remove-liquidity-using-etherscan.md)
* [👨💻 Developers](developers/README.md) * [👨💻 Developers](developers/README.md)
* [Architecture Overview](developers/architecture.md) * [Architecture Overview](developers/architecture.md)
* [Data NFTs and Datatokens](developers/datanft-and-datatoken/README.md)
* [Data NFTs](developers/datanft-and-datatoken/data-nfts.md)
* [Datatokens](developers/datanft-and-datatoken/datatokens.md)
* [Metadata](developers/datanft-and-datatoken/metadata.md)
* [Datatoken Templates](developers/datanft-and-datatoken/datatoken-templates.md)
* [Access Control Tools](developers/datanft-and-datatoken/access-control-tools.md)
* [Revenue](developers/datanft-and-datatoken/revenue.md)
* [Fractional Ownership](developers/datanft-and-datatoken/fractional-ownership.md)
* [Contracts](developers/contracts/README.md) * [Contracts](developers/contracts/README.md)
* [Data NFTs](developers/contracts/data-nfts.md)
* [Datatokens](developers/contracts/datatokens.md)
* [Data NFTs and Datatokens](developers/contracts/datanft-and-datatoken.md)
* [Community monetization](developers/contracts/community-monetization.md)
* [Metadata](developers/contracts/metadata.md)
* [Datatoken Templates](developers/contracts/datatoken-templates.md)
* [Access Control Tools](developers/contracts/access-control-tools.md)
* [Revenue](developers/contracts/revenue.md)
* [Roles](developers/contracts/roles.md) * [Roles](developers/contracts/roles.md)
* [Fees](developers/fees.md) * [Fees](developers/fees.md)
* [Fractional Ownership](developers/contracts/fractional-ownership.md)
* [Asset Pricing](developers/asset-pricing.md) * [Asset Pricing](developers/asset-pricing.md)
* [Identifiers & Metadata](developers/Identifiers-Metadata.md) * [Identifiers & Metadata](developers/Identifiers-Metadata.md)
* [DDO Specification](developers/ddo-specification.md) * [DDO Specification](developers/ddo-specification.md)

View File

@ -17,7 +17,7 @@ But hold on tight, because we have even more in store for you! With Ocean Protoc
<figure><img src="../.gitbook/assets/developers.png" alt=""><figcaption><p>Ocean Protocol Explorer</p></figcaption></figure> <figure><img src="../.gitbook/assets/developers.png" alt=""><figcaption><p>Ocean Protocol Explorer</p></figcaption></figure>
At the core of the Ocean Protocol, you'll find a constellation of [smart contracts](contracts/) that bring extraordinary capabilities to every data asset. Here's where the magic happens! Every asset gets its own cool and unique [**ERC721 data NFT**](datanft-and-datatoken/#what-is-a-data-nft), along with one (or more) [**ERC20 datatokens**](datanft-and-datatoken/). It's like giving your data its very own superhero cape! 🦸‍♂️ At the core of the Ocean Protocol, you'll find a constellation of [smart contracts](contracts/) that bring extraordinary capabilities to every data asset. Here's where the magic happens! Every asset gets its own cool and unique [**ERC721 data NFT**](contracts/datanft-and-datatoken.md#what-is-a-data-nft), along with one (or more) [**ERC20 datatokens**](contracts/datanft-and-datatoken.md). It's like giving your data its very own superhero cape! 🦸‍♂️
These [smart contracts](contracts/) form the backbone of Ocean Protocol, empowering data assets with unparalleled value and enabling seamless integration with the wider blockchain ecosystem. Through the [contracts](contracts/), data becomes not only valuable but also tradable, allowing you to unleash the true potential of your data treasures. These [smart contracts](contracts/) form the backbone of Ocean Protocol, empowering data assets with unparalleled value and enabling seamless integration with the wider blockchain ecosystem. Through the [contracts](contracts/), data becomes not only valuable but also tradable, allowing you to unleash the true potential of your data treasures.

View File

@ -13,7 +13,7 @@ Ocean Protocol offers you flexible and customizable pricing options to monetize
These models are designed to cater to your specific needs and ensure a smooth experience for data consumers. These models are designed to cater to your specific needs and ensure a smooth experience for data consumers.
The price of an asset is determined by the number of Ocean tokens a buyer must pay to access the asset. When users pay the right amount of Ocean tokens, they get a _datatoken_ in their wallets, a tokenized representation of the access right stored on the blockchain. To read more about datatoken and data NFT click [here](datanft-and-datatoken/). The price of an asset is determined by the number of Ocean tokens a buyer must pay to access the asset. When users pay the right amount of Ocean tokens, they get a _datatoken_ in their wallets, a tokenized representation of the access right stored on the blockchain. To read more about datatoken and data NFT click [here](contracts/datanft-and-datatoken.md).
### Fixed pricing ### Fixed pricing

View File

@ -17,20 +17,20 @@ Here's how Provider works. First, it ensures that the Consumer has sent the appr
Here's the actors/components: Here's the actors/components:
- Consumers - The end users who need to use some computing services offered by the same Publisher as the data Publisher. * Consumers - The end users who need to use some computing services offered by the same Publisher as the data Publisher.
- Operator-Service - Micro-service that is handling the compute requests. * Operator-Service - Micro-service that is handling the compute requests.
- Operator-Engine - The computing systems where the compute will be executed. * Operator-Engine - The computing systems where the compute will be executed.
- Kubernetes - a K8 cluster * Kubernetes - a K8 cluster
Before the flow can begin, these pre-conditions must be met: Before the flow can begin, these pre-conditions must be met:
- The Asset DDO has a `compute` service. * The Asset DDO has a `compute` service.
- The Asset DDO compute service must permit algorithms to run on it. * The Asset DDO compute service must permit algorithms to run on it.
- The Asset DDO must specify an Ocean Provider endpoint exposed by the Publisher. * The Asset DDO must specify an Ocean Provider endpoint exposed by the Publisher.
### Access Control using Ocean Provider ### Access Control using Ocean Provider
As with [the `access` service](../datanft-and-datatoken/access-control-tools.md), the `compute` service requires the **Ocean Provider** as a component handled by Publishers. Ocean Provider is in charge of interacting with users and managing the basics of a Publisher's infrastructure to integrate this infrastructure into Ocean Protocol. The direct interaction with the infrastructure where the data resides happens through this component only. As with [the `access` service](../contracts/access-control-tools.md), the `compute` service requires the **Ocean Provider** as a component handled by Publishers. Ocean Provider is in charge of interacting with users and managing the basics of a Publisher's infrastructure to integrate this infrastructure into Ocean Protocol. The direct interaction with the infrastructure where the data resides happens through this component only.
Ocean Provider includes the credentials to interact with the infrastructure (initially in cloud providers, but it could be on-premise). Ocean Provider includes the credentials to interact with the infrastructure (initially in cloud providers, but it could be on-premise).
@ -42,19 +42,19 @@ The **Operator Service** is a micro-service in charge of managing the workflow e
The main responsibilities are: The main responsibilities are:
- Expose an HTTP API allowing for the execution of data access and compute endpoints. * Expose an HTTP API allowing for the execution of data access and compute endpoints.
- Interact with the infrastructure (cloud/on-premise) using the Publisher's credentials. * Interact with the infrastructure (cloud/on-premise) using the Publisher's credentials.
- Start/stop/execute computing instances with the algorithms provided by users. * Start/stop/execute computing instances with the algorithms provided by users.
- Retrieve the logs generated during executions. * Retrieve the logs generated during executions.
Typically the Operator Service is integrated from Ocean Provider, but can be called independently of it. Typically the Operator Service is integrated from Ocean Provider, but can be called independently of it.
The Operator Service is in charge of establishing the communication with the K8s cluster, allowing it to: The Operator Service is in charge of establishing the communication with the K8s cluster, allowing it to:
- Register new compute jobs * Register new compute jobs
- List the current compute jobs * List the current compute jobs
- Get a detailed result for a given job * Get a detailed result for a given job
- Stop a running job * Stop a running job
The Operator Service doesn't provide any storage capability, all the state is stored directly in the K8s cluster. The Operator Service doesn't provide any storage capability, all the state is stored directly in the K8s cluster.
@ -64,11 +64,11 @@ The **Operator Engine** is in charge of orchestrating the compute infrastructure
The Operator Engine is in charge of retrieving all the workflows registered in a K8s cluster, allowing to: The Operator Engine is in charge of retrieving all the workflows registered in a K8s cluster, allowing to:
- Orchestrate the flow of the execution * Orchestrate the flow of the execution
- Start the configuration pod in charge of download the workflow dependencies (datasets and algorithms) * Start the configuration pod in charge of download the workflow dependencies (datasets and algorithms)
- Start the pod including the algorithm to execute * Start the pod including the algorithm to execute
- Start the publishing pod that publish the new assets created in the Ocean Protocol network. * Start the publishing pod that publish the new assets created in the Ocean Protocol network.
- The Operator Engine doesn't provide any storage capability, all the state is stored directly in the K8s cluster. * The Operator Engine doesn't provide any storage capability, all the state is stored directly in the K8s cluster.
#### Pod: Configuration #### Pod: Configuration

View File

@ -1,2 +1,51 @@
---
description: Empowering the Decentralised Data Economy
---
# Contracts # Contracts
The [V4 release](https://blog.oceanprotocol.com/ocean-v4-overview-1ccd4a7ce150) of Ocean Protocol introduces a comprehensive and enhanced suite of s[mart contracts](https://github.com/oceanprotocol/contracts/tree/main/contracts) that serve as the backbone of the decentralized data economy. These contracts facilitate secure, transparent, and efficient interactions among data providers, consumers, and ecosystem participants. With the introduction of V4 contracts, Ocean Protocol propels itself forward, delivering substantial functionality, scalability, and flexibility advancements.
The V4 smart contracts have been deployed across multiple [networks](../../discover/networks/) and are readily accessible through the GitHub [repository](https://github.com/oceanprotocol/contracts/tree/main/contracts). The V4 introduces significant enhancements that encompass the following key **features**:
### [**Data NFTs**](data-nfts.md) **for Enhanced Data IP Management**
In Ocean V3, the publication of a dataset involved deploying an ERC20 "datatoken" contract along with relevant metadata. This process allowed the dataset publisher to claim copyright or exclusive rights to the underlying Intellectual Property (IP). Upon obtaining 1.0 ERC20 datatokens for a particular dataset, users were granted a license to consume that dataset, utilizing the Ocean infrastructure by spending the obtained datatokens.
However, Ocean V3 faced limitations in terms of flexibility. It lacked support for different licenses associated with the same base IP, such as 1-day versus 1-month access, and the transferability of the base IP was not possible. Additionally, the ERC20 datatoken template was hardcoded, restricting customization options.
Ocean V4 effectively tackles these challenges by adopting **ERC721** **tokens** to explicitly represent the **base IP** as "data NFTs" (Non-Fungible Tokens). [**Data NFT**](data-nfts.md) owners can now deploy ERC20 "datatoken" contracts specific to their data NFTs, with each datatoken contract offering its own distinct licensing terms.
By utilizing ERC721 tokens, Ocean V4 grants data creators greater flexibility and control over licensing arrangements. The introduction of data NFTs allows for the representation of base IP and the creation of customized ERC20 datatoken contracts tailored to individual licensing requirements.&#x20;
<figure><img src="../../.gitbook/assets/v4-contracts.png" alt=""><figcaption><p>Ocean Protocol V4 Smart Contracts</p></figcaption></figure>
### [**Community monetization**](community-monetization.md), to help the community create sustainable businesses.
Ocean V4 brings forth enhanced opportunities for marketplace operators, creating a conducive environment for the emergence of a thriving market of **third-party Providers**.
With Ocean V4, marketplace operators can unlock additional benefits. Firstly, the V4 smart contracts empower marketplace operators to collect fees not only during **data consumption** but also through **fixed-rate exchanges**. This expanded revenue model allows operators to derive more value from the ecosystem. Moreover, in Ocean V4, the marketplace operator has the authority to determine the fee value, providing them with **increased control** over their pricing strategies.
In addition to empowering marketplace operators, Ocean V4 facilitates the participation of third-party [Providers](../provider/) who can offer compute services in exchange for a fee. This paves the way for the development of a diverse marketplace of Providers. This model supports both centralized trusted providers, where data publishers and consumers have established trust relationships, as well as trustless providers that leverage decentralization or other privacy-preserving mechanisms.
By enabling a marketplace of [Providers](../provider/), Ocean V4 fosters competition, innovation, and choice. It creates an ecosystem where various providers can offer their compute services, catering to the diverse needs of data publishers and consumers. Whether based on trust or privacy-preserving mechanisms, this expansion in provider options enhances the overall functionality and accessibility of the Ocean Protocol ecosystem.\
Key features of the V4 smart contracts:
* Base IP is now represented by a data [NFT](data-nfts.md), from which a data publisher can create multiple ERC20s [datatokens](datatokens.md) representing different types of access for the same dataset 🎨
* Interoperability with the NFT ecosystem (and DeFi & DAO tools) 🔄
* Allows new data [NFT & datatoken templates](datatoken-templates.md), for flexibility and future-proofing 📝
* Besides base data IP, you can use data NFTs to **implement comments & ratings, verifiable claims, identity credentials, and social media posts**. They can point to parent data NFTs, enabling the nesting of comments on comments, or replies to tweets. All on-chain, GDPR-compliant, easily searched, with js & py drivers 🤯
* Introduce an advanced [Fee](../fees.md) structure both for Marketplace and Provider runners 💰
* [Roles](roles.md) Administration: there are now multiple roles for a more flexible administration both at [NFT](data-nfts.md) and [ERC20](datatokens.md) levels 👥
* When the NFT is transferred, it auto-updates all permissions, e.g. who receives payment, or who can mint derivative ERC20 datatokens 🔄
* Key-value store in the NFT contract: NFT contract can be used to store custom key-value pairs (ERC725Y standard) enabling applications like soulbound tokens and Sybil protection approaches 🗃️
* Multiple NFT template support: the Factory can deploy different types of NFT templates 🖼️
* Multiple datatoken template support: the Factory can deploy different types of [datatoken templates](datatoken-templates.md) 📦
In the forthcoming pages, you will discover comprehensive information about the key features. If you have any inquiries or find anything missing, feel free to contact the core team on [Discord](https://discord.com/invite/TnXjkR5) 💬

View File

@ -1,6 +1,6 @@
# Access Control Tools # Access Control Tools
Data NFTs are based on [ERC721](https://eips.ethereum.org/EIPS/eip-721) standard. The publisher can use Marketplace or client libraries to deploy a new data NFT contract. To save gas fees, it uses [ERC1167](https://eips.ethereum.org/EIPS/eip-1167) proxy approach on the **ERC721 template**. Publisher can then assign manager role to other Ethereum addresses who can deploy new datatoken contracts and even mint them. Each datatoken contract is associated with one data NFT contract. Click [here](./) to further read about data NFTs and datatokens. Data NFTs are based on [ERC721](https://eips.ethereum.org/EIPS/eip-721) standard. The publisher can use Marketplace or client libraries to deploy a new data NFT contract. To save gas fees, it uses [ERC1167](https://eips.ethereum.org/EIPS/eip-1167) proxy approach on the **ERC721 template**. Publisher can then assign manager role to other Ethereum addresses who can deploy new datatoken contracts and even mint them. Each datatoken contract is associated with one data NFT contract. Click [here](datanft-and-datatoken.md) to further read about data NFTs and datatokens.
ERC721 data NFTs represent holding copyright/base IP of a data asset, and ERC20 datatokens represent licenses to access the asset by downloading the content or running Compute-to-Data jobs. ERC721 data NFTs represent holding copyright/base IP of a data asset, and ERC20 datatokens represent licenses to access the asset by downloading the content or running Compute-to-Data jobs.

View File

@ -0,0 +1,21 @@
# Community monetization
**Ocean V4 provides more upside for marketplace operators, and makes space for a market of third-party Providers.**
Ocean V3 smart contracts enabled marketplace operators to collect a fee in just one place: consume. The value was hardcoded to 0.1% which was a good start, but it limited the upside.
Ocean V4 provides more upside for marketplace operators. First, **V4 smart contracts enable marketplace operators to collect a fee not only in consume, but also in fixed-rate exchange**. Second, the marketplace operator sets the fee value.
Furthermore, **Ocean V4 enables third-party Providers to provide compute, for a fee**. This enables a marketplace of Providers to emerge. This will work for centralized trusted providers (that the data publisher and consume must trust), but also trustless providers (via decentralization or other privacy-preserving mechanisms).
Were always looking to give back to the Ocean community and collecting fees is an important part of that. As mentioned above, the Ocean Protocol Foundation retains the ability to implement community fees on both data consumption and datatoken swaps. The tokens that we receive will either be burned or invested in the community via projects that they are building. These investments will take place either through Ocean DAO, Ocean Shipyard, or Ocean Ventures.
Additionally, we will also be placing an additional 0.1% fee on projects that arent using either the Ocean token or H2O. We want to support marketplaces that use other tokens but we also recognise that they dont bring the same wider benefit to the Ocean community, so we feel this small additional fee is proportionate. This fee is set at the contract level so you can be sure that it wont increase in future.
Our intentions with all of these updates are to ensure that your project is able to become self-sufficient and profitable in the long run (if thats your aim). We love projects that are built on top of Ocean and we want to ensure that you are able to generate enough income to keep your project running well into the future.
With this in mind, we have aimed to deliver improvements for you irrespective of the type of project you are running:
* If youre selling data you can benefit from Data NFTs. This means you can sell your IP (or part of it) and benefit from all the new roles when managing your project with others.
* If youre running your own data marketplace you now have so many more options on how to raise revenue and charge your customers. And the fees can still apply if the asset is bought in a marketplace other than your own!
* For the first time, you can now also create profit for yourself by running your own provider. This also means that you can charge for compute resources

View File

@ -1,6 +1,6 @@
# Publish # Publish
This tutorial guides you through the process of creating your own data NFT and a datatoken using Ocean libraries. To know more about data NFTs and datatokens please refer [this page](../datanft-and-datatoken/). Ocean Protocol supports different pricing schemes which can be set while publishing an asset. Please refer [this page](../asset-pricing.md) for more details on pricing schemes. This tutorial guides you through the process of creating your own data NFT and a datatoken using Ocean libraries. To know more about data NFTs and datatokens please refer [this page](../contracts/datanft-and-datatoken.md). Ocean Protocol supports different pricing schemes which can be set while publishing an asset. Please refer [this page](../asset-pricing.md) for more details on pricing schemes.
#### Prerequisites #### Prerequisites

View File

@ -39,7 +39,7 @@ You've now published an Ocean asset!
### Appendix ### Appendix
For more information regarding: Data NFT & Datatokens interfaces and how they are implemented in Solidity, we suggest to follow up this [article](../datanft-and-datatoken/) and [contracts repo](https://github.com/oceanprotocol/contracts) from GitHub. For more information regarding: Data NFT & Datatokens interfaces and how they are implemented in Solidity, we suggest to follow up this [article](../contracts/datanft-and-datatoken.md) and [contracts repo](https://github.com/oceanprotocol/contracts) from GitHub.
As you may want to explore more the DDO specs, structure & meaning, we invite you to consult [DDO Specification](../ddo-specification.md) section. As you may want to explore more the DDO specs, structure & meaning, we invite you to consult [DDO Specification](../ddo-specification.md) section.

View File

@ -4,7 +4,7 @@ description: 'Discover the World of NFTs: Retrieving a List of Data NFTs'
# Get data NFTs # Get data NFTs
If you are already familiarized with the concept of NFTs, you're off to a great start. However, if you require a refresher, we recommend visiting the [data NFTs and datatokens page](../datanft-and-datatoken/) for a quick overview.&#x20; If you are already familiarized with the concept of NFTs, you're off to a great start. However, if you require a refresher, we recommend visiting the [data NFTs and datatokens page](../contracts/datanft-and-datatoken.md) for a quick overview.&#x20;
Now, let us delve into the realm of utilizing the subgraph to extract a list of data NFTs that have been published using the Ocean contracts. By employing GraphQL queries, we can seamlessly retrieve the desired information from the subgraph. You'll see how simple it is :sunglasses: Now, let us delve into the realm of utilizing the subgraph to extract a list of data NFTs that have been published using the Ocean contracts. By employing GraphQL queries, we can seamlessly retrieve the desired information from the subgraph. You'll see how simple it is :sunglasses:

View File

@ -90,6 +90,20 @@ Since datatokens are ERC20, and live on Ethereum mainnet, there's a whole ecosys
<details> <details>
<summary><a href="https://medium.com/p/477b3decad51#7922"><mark style="color:orange;">Run Your Own Provider</mark></a><br><br>You have the option to generate revenue by running your own <a href="../developers/provider/">provider</a>. It has come to our attention that many of you have not pursued this opportunity, primarily due to the lack of compelling incentives.</summary>
If you're not familiar with it, the Ocean [Provider](../developers/provider/) serves as the proxy service responsible for encrypting/decrypting data and streaming it to the consumer. It also verifies user access privileges for specific data assets or services. It plays a vital role in the Ocean architecture.
Fees are now paid to the individual or organization running the provider when a user downloads a data asset. The download fees are set based on the cost per MB, and there is also a provider fee for compute jobs, which is priced per minute.
Both the download and compute fees can be set to any absolute amount, and you have the flexibility to choose the token in which you want to receive these fees. They do not have to be in the same currency used in the marketplace. For instance, the provider fee could be a fixed rate of 5 USDT per 1000 MB of data downloaded, and this fee will remain fixed in USDT even if the marketplace uses a different currency.
Furthermore, provider fees are not restricted to data consumption; they can also be utilized to charge for compute resources. For example, a provider can charge a fixed fee of 15 DAI to reserve compute resources for one hour. This presents an advantage for both the user and the provider host. Users can now reserve the appropriate amount of computing resources according to their requirements. For provider hosts, this creates an additional income opportunity.
</details>
<details>
<summary><mark style="color:purple;">Earn Rewards</mark><br><br>The <a href="../rewards/df-background.md">Data Farming</a> initiative is a key feature of Ocean Protocol that empowers participants to earn <a href="../rewards/">rewards</a> while contributing to a decentralized data economy. By staking Ocean tokens and actively participating in data markets, users play a vital role in enhancing the availability and accessibility of valuable data assets</summary> <summary><mark style="color:purple;">Earn Rewards</mark><br><br>The <a href="../rewards/df-background.md">Data Farming</a> initiative is a key feature of Ocean Protocol that empowers participants to earn <a href="../rewards/">rewards</a> while contributing to a decentralized data economy. By staking Ocean tokens and actively participating in data markets, users play a vital role in enhancing the availability and accessibility of valuable data assets</summary>
Through the Data Farming initiative, you are incentivized to lock Ocean tokens for [veOcean](../rewards/veocean.md). By staking your tokens, you not only support the growth and sustainability of the ecosystem but also earn a share of the generated incentives💰. The Data Farming initiative offers participants a unique opportunity to earn [rewards](../rewards/) while making a meaningful impact in the data marketplace. Through the Data Farming initiative, you are incentivized to lock Ocean tokens for [veOcean](../rewards/veocean.md). By staking your tokens, you not only support the growth and sustainability of the ecosystem but also earn a share of the generated incentives💰. The Data Farming initiative offers participants a unique opportunity to earn [rewards](../rewards/) while making a meaningful impact in the data marketplace.