diff --git a/content/concepts/asset-pricing.md b/content/concepts/asset-pricing.md new file mode 100644 index 00000000..82246d6a --- /dev/null +++ b/content/concepts/asset-pricing.md @@ -0,0 +1,55 @@ +--- +title: Asset pricing +description: Choose the revenue model during asset publishing +--- + +Ocean Protocol offers 3 types of pricing options for asset monetization. The publisher can choose a pricing model which best suits their needs while publishing an asset. The pricing model selected cannot be changed once the asset is published. + +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](/concepts/datanft-and-datatoken). + +## Fixed pricing + +With the fixed price model, publishers set the price for the data in OCEAN. Ocean Market creates a datatoken in the background with a value equal to the dataset price in OCEAN so that buyers do not have to know about the datatoken. Buyers pay the amount specified in OCEAN for access. The publisher can update the price of the dataset later anytime. + +A [FixedRateExchange](https://github.com/oceanprotocol/contracts/blob/v4main/contracts/pools/fixedRate/FixedRateExchange.sol) smart contract stores the information about the price of the assets published using this model. + +Publishers can choose this fixed pricing model when they do not want Automated Market Maker(AMM) pools to decide the price discovery. If the publisher has already analyzed and estimated the worth of the dataset and is ready to sell an asset at a constant price, this is the suitable pricing model. + +The image below shows how to set the fixed pricing of an asset in the Ocean's Marketplace. Here, the price of the asset is set to 10 Ocean tokens. + +![fixed-asset-pricing](images/fixed-asset-pricing.png 'Fixed asset pricing using Marketplace') + +## Dynamic pricing + +With the dynamic pricing model, the market defines the price with a mechanism derived from Decentralized Finance (DeFi): liquidity pools. While the publisher sets a base price for the token in OCEAN, the market will organically discover the right price for the data. This can be extremely handy when the value of the data is not known. + +The Ocean Market helps create an Automated Market Maker(AMM) pool of Datatoken and Ocean tokens in dynamic pricing for each asset. *AMM* enables unstoppable, decentralized trading of assets in the liquidity pool. + +AMM uses a constant product formula to price tokens, which states: **x * y = k** + where **x** and **y** represents the quantity of the two different tokens in the pool and **k** is a constant. + +A *liquidity pool* is a reserve of tokens locked in the smart contract for market making. A buyer or a seller of an asset exchanges token **x** for token **y** or vice versa. AMM calculates the exchange ratio between the tokens based on the mathematical formula above. + +Ocean Protocol facilitates the creation of Datatoken/OCEAN liquidity pool with [Balancer smart contracts](https://github.com/oceanprotocol/contracts/tree/v4main/contracts/pools/balancer). The publisher needs to only approve a blockchain transaction that creates an AMM while publishing the asset. Thus, Ocean Market hides the complexities of deploying an AMM pool. + +While publishing an asset with dynamic pricing, the publisher decides the initial ratio of Datatokens and Ocean tokens in the pool, thus setting the initial price of an asset. The price of an asset is later dependent on the pool's liquidity and the price impact of trade in the pool. + +Publishers can set the pricing model of an asset to Dynamic pricing if they want the market to decide the asset price and thus enable auto price discovery. + +The image below shows how to set the Dynamic pricing of an asset in the Ocean's Marketplace. Here, the asset price is initially set to 50 Ocean tokens. + +![dynamic-asset-pricing](images/dynamic-asset-pricing.png 'Dynamic asset pricing using Marketplace') + +Ocean Protocol also allows publishers to set the pricing using ocean.js and ocean.py library. + +## Free pricing + +With the free pricing model, the buyers can access an asset without requiring them to pay for it except for the transaction fees. + +With this pricing model, datatokens are allocated to the [dispenser](https://github.com/oceanprotocol/contracts/blob/v4main/contracts/pools/dispenser/Dispenser.sol) smart contract, which dispenses data tokens to users for free whenever they are accessing an asset. + +Free pricing is suitable for individuals and organizations working in the public domain and want their datasets to be freely available. Publishers can also choose this model if they publish assets with licenses that require them to make them freely available. + +The image below shows how to set free access to an asset in the Ocean's Marketplace. + +![free-asset-pricing](images/free-asset-pricing.png 'Free asset pricing using Marketplace') diff --git a/content/concepts/did-ddo.md b/content/concepts/did-ddo.md index ef1d97b9..7a467dc4 100644 --- a/content/concepts/did-ddo.md +++ b/content/concepts/did-ddo.md @@ -132,7 +132,7 @@ An asset of type `algorithm` has additional attributes under `metadata.algorithm | ------------------------ | ------------------------------------------- | -------- | ------------------------------------------------------------------------------------------ | | **`language`** | `string` | | Language used to implement the software. | | **`version`** | `string` | | Version of the software preferably in [SemVer](https://semver.org) notation. E.g. `1.0.0`. | -| **`consumerParameters`** | [Consumer Parameters](#consumer-parameters) | | An object the defines required consumer input before running the algorithm | +| **`consumerParameters`** | [Consumer Parameters](#consumer-parameters) | | An object that defines required consumer input before running the algorithm | | **`container`** | `container` | **✓** | Object describing the Docker container image. See below | The `container` object has the following attributes defining the Docker image for running the algorithm: @@ -212,7 +212,7 @@ Type of objects supported : Description Example -'url' +url Static URL. Contains url and HTTP method @@ -238,7 +238,7 @@ First class integrations supported in the future : Example -"ipfs"IPFS files +ipfsIPFS files ```json @@ -252,10 +252,10 @@ First class integrations supported in the future : -"filecoin"Filecoin storage  -"arwave"Arwave  -"storj"Storj  -"sql"Sql connection, dataset is generated by a query  +filecoinFilecoin storage  +arwaveArwave  +storjStorj  +sqlSql connection, dataset is generated by a query  A service can contain multiple files, using multiple storage types. @@ -444,11 +444,12 @@ Example: #### Consumer Parameters -Sometimes, you may need some input before downloading a dataset or running an algorithm. +Sometimes, the asset needs additional input data before downloading a dataset or running an algorithm. Examples: -- You want to know the desired sampling interval of data in your dataset, before the user is going to download it. Your dataset URL is `https://example.com/mydata`. So you will define a field called `sampling`, ask the user to enter a value and then this parameter is going to be added to the URL of your dataset as query parameters: `https://example.com/mydata?sampling=10` -- Before running an algorithm, you need to know how many iterations should it perform. You define a field called `iterations`, ask the user to enter a value and this parameter is stored in a specific location in your Computer-to-Data pod for the algorithm to read and use that value. +- The publisher needs to know the sampling interval before the buyer downloads it. Suppose the dataset URL is `https://example.com/mydata`. The publisher defines a field called `sampling` and asks the buyer to enter a value. This parameter is then added to the URL of the published dataset as query parameters: `https://example.com/mydata?sampling=10`. + +- An algorithm that needs to know the number of iterations it should perform. In this case, the algorithm publisher defines a field called `iterations`. The buyer needs to enter a value for the `iterations` parameter. Later, this value is stored in a specific location in the Computer-to-Data pod for the algorithm to read and use it. It's an array of elements, each element object defines a field. An element looks like: diff --git a/content/concepts/fees.md b/content/concepts/fees.md index 528a7044..37a8fb70 100644 --- a/content/concepts/fees.md +++ b/content/concepts/fees.md @@ -47,7 +47,7 @@ These are the fees that are applied whenever a user consumes an asset: Ocean's smart contracts collect **Ocean Community fees** during swap and order operations. These fees are reinvested in community projects via OceanDAO and other initiatives. -For swaps involving approved base tokens like OCEAN and H2O, the Ocean Community swap fee is 0.1%. For swaps involving other base tokens, the Ocean Community swap fee is 0.2%. The Ocean Community order fee is 0.3 DT per order operation. +For swaps involving approved base tokens like OCEAN and H2O, the Ocean Community swap fee is 0.1%. For swaps involving other base tokens, the Ocean Community swap fee is 0.2%. The Ocean Community order fee is 0.03 DT per order operation. These fees can be updated by the Ocean Protocol Foundation. diff --git a/content/concepts/images/dynamic-asset-pricing.png b/content/concepts/images/dynamic-asset-pricing.png new file mode 100644 index 00000000..156114e3 Binary files /dev/null and b/content/concepts/images/dynamic-asset-pricing.png differ diff --git a/content/concepts/images/fixed-asset-pricing.png b/content/concepts/images/fixed-asset-pricing.png new file mode 100644 index 00000000..cc55112a Binary files /dev/null and b/content/concepts/images/fixed-asset-pricing.png differ diff --git a/content/concepts/images/free-asset-pricing.png b/content/concepts/images/free-asset-pricing.png new file mode 100644 index 00000000..8876bc31 Binary files /dev/null and b/content/concepts/images/free-asset-pricing.png differ diff --git a/content/tutorials/amazon-s3-for-provider.md b/content/tutorials/amazon-s3-for-provider.md deleted file mode 100644 index 94c9caa3..00000000 --- a/content/tutorials/amazon-s3-for-provider.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Set Up Amazon S3 Storage -description: Tutorial about how to set up Amazon S3 storage for use with Ocean Protocol. ---- -*Note: This needs updating for Ocean V3.* - -To enable Provider to use files stored in Amazon S3 (i.e. files with an URL containing `s3://`), you must: - -1. have an Amazon AWS user account (IAM account) with permission to read those files from S3, and -1. set the AWS credentials on the machine where Provider is running to those of the AWS user in question. Instructions are given below. -1. Note that you don't have to set any Provider-specific configuration settings, e.g. in the `[osmosis]` section of the Provider config file or in some special Provider environment variables. - -Under the hood, Provider uses [boto3](https://aws.amazon.com/sdk-for-python/) (the Python library for interacting with AWS) to interact with AWS and boto3 has a whole process for determining AWS credentials. The easiest way to set the AWS credentials on the machine where Provider is running is to install the [AWS CLI](https://aws.amazon.com/cli/) and then use the `aws configure` command. - -For more details, see [the boto3 user guide about credentials](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html). diff --git a/content/tutorials/asset-hosting.md b/content/tutorials/asset-hosting.md new file mode 100644 index 00000000..283642ed --- /dev/null +++ b/content/tutorials/asset-hosting.md @@ -0,0 +1,151 @@ +--- +title: Publish assets using hosting services +description: Tutorial to publish assets using hosting services like Google Drive and Azure. +--- + +## Overview + +To publish assets on the Ocean Marketplace, publishers must provide a link(an URL) to the file. It is up to the asset publisher to decide where to host the asset. For example, a publisher can store the content on their Google Drive, AWS server, private cloud server, or other third-party hosting services. Through publishing, the URL of the asset is encrypted and stored as a part of DDO on the blockchain. Buyers don't have access directly to the URL, but they interact with the Provider, which decrypts the URL and acts as a proxy to serve the asset. The DDO only stores the location of the file, which is accessed on-demand by the Provider. Implementing a security policy that allows only the Provider to access the URL and blocks requests from other unauthorized actors is recommended. One of the possible ways to achieve this is to allow only the Provider's IP address to access the URL. But, not all hosting services provide this feature. So, the publishers must consider the security features while choosing a hosting service. + +On Ocean Marketplace, a publisher must provide the link to the asset during publish step. Once the asset is published, this link cannot be changed. So, it is essential that the publisher correctly sets this field (shown in the below image). + +![Publish - File URL field](./images/marketplace/publish/marketplace-publish-file-field.png) + +## Hosting services + +Publishers can choose any hosting service of their choice. The below section explains how to use commonly used hosting services with Ocean Marketplace. + +### Google Drive + +Google Drive allows users to share files/folders with various access policies. Publishers must set the access policy such that anyone with the link can download the file when using Ocean Marketplace with Ocean Protocol's default [Provider](https://v4.provider.rinkeby.oceanprotocol.com). + +#### Step 1 - Get link + +Open https://drive.google.com and upload the file you want to publish on the Ocean Marketplace. +Right-click on the uploaded file and click the `Share` option. Set the file access policy correctly and click the `Copy link` button. + +The file URL will be of the form `https://drive.google.com/file/d//view?usp=sharing`, where the `` is the unique alphanumeric string. Verify if the URL is correct by entering it in a browser and check if the file is downloaded. + +![Google Drive link](./images/marketplace/publish/publish-google-drive.png) + +#### Step 2 - Create a downloadable link + +If you paste the copied URL into the browser, it will load an HTML page. Directly pasting the link on the publish page will publish the HTML page instead of a downloadable file URL. So, let's make a downloadable file URL. + +Note the `` from step 1 and create a URL as below. + +`https://drive.google.com/uc?export=download&id=` + +#### Step 3 - Publish the asset using the generated link + +After creating a downloadable file URL, fill the `File*` field with the downloadable URL created in step 2. + +![Publish - Google Drive file](./images/marketplace/publish/publish-google-drive-2.png) + +_Note: Google Drive allows only shared files to be downloaded, as shown in the above steps. The above method does not work with the shared folder. As a workaround, publishers can upload a zip of a folder and upload it as a file._ + +--- + +### Azure storage + +Azure provides various options to host data and multiple configuration possibilities. Publishers are required to do their research and decide what would be the right choice. The below steps provide one of the possible ways to host data using Azure storage and publish it on Ocean Marketplace. + +#### Prerequisite + +Create an account on [Azure](https://azure.microsoft.com/en-us/). Users might also be asked to provide payment details and billing addresses that are out of this tutorial's scope. + +#### Step 1 - Create a storage account + +##### Go to Azure portal + +Go to the Azure portal: https://portal.azure.com/#home and select `Storage accounts` as shown below. + +![Create a storage account - 1](/images/marketplace/publish/azure-1.png) + +##### Create a new storage account + +![Create a storage account - 2](/images/marketplace/publish/azure-2.png) + +##### Fill in the details + +![Add details](/images/marketplace/publish/azure-3.png) + +##### Storage account created + +![Storage account created](/images/marketplace/publish/azure-4.png) + +#### Step 2 - Create a blob container + +![Create a blob container](/images/marketplace/publish/azure-5.png) + +#### Step 3 - Upload a file + +![Upload a file](/images/marketplace/publish/azure-6.png) + +#### Step 4 - Share the file + +##### Select the file to be published and click Generate SAS + +![Click generate SAS](/images/marketplace/publish/azure-7.png) + +##### Configure the SAS details and click `Generate SAS token and URL` + +![Generate link to file](/images/marketplace/publish/azure-8.png) + +##### Copy the generated link + +![Copy the link](/images/marketplace/publish/azure-9.png) + +#### Step 5 - Publish the asset using the generated link + +Now, copy and paste the link in the Publish page in the Ocean Marketplace. + +![Publish the file as an asset](/images/marketplace/publish/azure-10.png) + +### OneDrive + +Create an account on [Microsoft](https://www.microsoft.com/en-us/microsoft-365/onedrive/online-cloud-storage). + +#### Step 1 - Upload a file + +Go to [OneDrive](https://onedrive.live.com/) and upload the file to be published. + +![Upload a file](/images/marketplace/publish/one-drive-1.png) + +#### Step 2 - Get link + +After the file is uploaded, right click on the file and click `Embed`, and copy the link. + +![Get an embeddable link](/images/marketplace/publish/one-drive-2.png) + +Copy the highlighted content as shown in the below image: + +![Copy the iframe](/images/marketplace/publish/one-drive-3.png) + +The copied content has the following format: + +```html + +``` + +#### Step 3 - Generate downloadable link + +Copy the content from `src` field from the `iframe`. The link has the following format: +`https://onedrive.live.com/embed?cid=&resid=%&authkey=` + +Replace the `https://onedrive.live.com/embed` with `https://onedrive.live.com/download` from the above URL. + +The downloadable file URL has the following format: +`https://onedrive.live.com/download?cid=&resid=%&authkey=` + +Enter the URL in the browser and verify if the file is downloaded correctly. + +#### Step 4 - Publish the asset using the generated link + +Copy and paste the link in the Publish page in the Ocean Marketplace. + +![Publish the file as an asset](/images/marketplace/publish/one-drive-4.png) diff --git a/content/tutorials/azure-for-provider.md b/content/tutorials/azure-for-provider.md deleted file mode 100644 index fef6efaf..00000000 --- a/content/tutorials/azure-for-provider.md +++ /dev/null @@ -1,177 +0,0 @@ ---- -title: Set Up Azure Storage -description: Tutorial about how to set up Azure storage for use with Ocean. ---- - -_Note: This needs updating for Ocean V3._ - -This tutorial is for publishers who want to get started using Azure to store some of their data assets. (Some data assets could also be stored in other places.) - -Publishers must run [Provider](https://github.com/oceanprotocol/provider) to mediate consumer access to data assets stored in Azure Storage. Provider needs the following Azure credentials from the publisher: - -- `AZURE_ACCOUNT_NAME`: Azure Storage Account Name (for storing files) -- `AZURE_ACCOUNT_KEY`: Azure Storage Account key -- `AZURE_RESOURCE_GROUP`: Azure resource group -- `AZURE_LOCATION`: Azure Region -- `AZURE_CLIENT_ID`: Azure Application ID -- `AZURE_CLIENT_SECRET`: Azure Application Secret -- `AZURE_TENANT_ID`: Azure Tenant ID -- `AZURE_SUBSCRIPTION_ID`: Azure Subscription ID - -If you go through this tutorial, then you will get all the Azure credentials listed above. - -If you already have data assets stored in Azure, then you might already have, or be able to get, the above information. You could use this tutorial to get a sense of where to look (but don't create anything new). - -To give the above Azure credentials to Provider, you either put them in a Provider config file or in environment variables with the above names. Environment variables should be used if you're running Provider inside a container. If you want to use the config file option, see [Provider README](https://github.com/oceanprotocol/provider). - -If you're using [Barge](https://github.com/oceanprotocol/barge) to run Provider and other Ocean Protocol components, then the above Azure credentials should go in the file `barge/provider.env`. (That file gets used to set environment variables.) - -This tutorial uses the [Microsoft Azure Portal](https://azure.microsoft.com/en-us/features/azure-portal/), but [there are many other ways to interact with Azure](https://docs.microsoft.com/en-us/azure/#pivot=sdkstools). - -**Note: Azure is constantly changing. For that reason, we give try to give links to official Azure documentation, since it _should_ stay up-to-date.** - -## Sign in to Azure Portal - -If you don't already have an Azure account, then you will have to create one. Go to the [Microsoft Azure website](https://azure.microsoft.com) and follow the links. - -Once you have an Azure account, go to [https://portal.azure.com/](https://portal.azure.com/) and sign in. - -## Get Your Subscription ID - -The [Azure docs say](https://docs.microsoft.com/en-us/azure/guides/developer/azure-developer-guide), "A subscription is a logical grouping of Azure services that is linked to an Azure account. A single Azure account can contain multiple subscriptions." - -If you see **Subscriptions** in the left sidebar of Azure Portal, then click that. If you don't see it, just type "Subscriptinos" into the search bar at the top, then click on **Subscriptions** under the SERVICES heading. - -You should see a list of one or more subscriptions. Click on the one you want to use for Azure storage. Remember to use that one for the rest of this tutorial (whenever you are asked for a subscription name). - -Copy the `Subscription ID`. That's what Provider calls `AZURE_SUBSCRIPTION_ID`. You now have one of the Azure credentials! - -```text -# Example AZURE_SUBSCRIPTION_ID (Azure Subscription ID) -479284be-0104-421a-8488-1aeac0caecaa -``` - -## Create an Azure Active Directory (AD) Application - -See the Azure docs page: - -[How to: Use the portal to create an Azure AD application and service principal that can access resources](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) - -The first step there is to **Create an Azure Active Directory application**. Do that. - -The app `Name` and `Sign-on URL` can be totally made up. The URL doesn't need to be real. - -Once the app is created, copy the `Application ID`: that's what Provider calls the `AZURE_CLIENT_ID`. It should look something like this: - -```text -# Example AZURE_CLIENT_ID (Application ID) -5d25ee8a-da2c-4e6f-8fba-09b6dd091038 -``` - -## Get Authentication Key for Your AD Application - -On [the same Azure docs page](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal), find the section titled **Get application ID and authentication key** or similar. You already have your application ID, but you still need generate an authentication key by following the instructions in that section. - -You can make up whatever you like for the key's `Description`. - -Once the application key is generated, copy its value: that's what Provider calls the `AZURE_CLIENT_SECRET`. It should look something like this: - -```text -# Example AZURE_CLIENT_SECRET (Application key) -RVJ1H5gYOmnMitikmM5ehszqmgrY5BFkoalnjfWMuDM -``` - -## Get Tenant ID - -On [the same Azure docs page](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal), find the section titled **Get tenant ID** or similar. Follow the instructions. - -The tenant ID is what Provider calls `AZURE_TENANT_ID`. - -```text -# Example AZURE_TENANT_ID (tenant ID, Directory ID) -2a4a3887-4e2e-4a31-8006-6e2b5877640e -``` - -## Create a Resource Group for Your Data Storage - -See the Azure docs page: - -[Manage Azure resources through portal](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-portal) - -That page says how to create a new empty resource group. Do that. -You can make up whatever name you like, but it's good practice to avoid special characters and to include: - -- some words to indicate what it's for, e.g. `Storage` -- your name -- the month and year it was created, e.g. `Nov2018` - -to help you and others manage it. The Resource group name is what Provider calls the `AZURE_RESOURCE_GROUP` and the Resource group location is what Provider calls the `AZURE_LOCATION`. Here are examples of both: - -```text -# Example AZURE_RESOURCE_GROUP (Resource group name) -StorageCreatedNov2018ByTroy -``` - -```text -# Example AZURE_LOCATION (Resource group location) -West Europe -``` - -## Give Your AD Application Access to Your Resource Group - -Inside your new resource group: - -- click **Access control (IAM)** -- click **+ Add role assignment** -- In the `Role` field, select `Contributor`. See the note below. -- Assign access to `Azure AD user, group, or service principal` -- In the `Select` field, begin entering the name of your AD application (created earlier). When it appears in the list, click on it there. It should now be listed as one of the "Selected members". -- Click **Save** - -Note: You might want to give your application fewer permissions than what a `Contributor` role gets. The Azure docs have [a list of all the built-in roles for Azure resources](https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles). - -## Create a Storage Account - -Follow the instructions in the Azure docs page: - -[Create a storage account](https://docs.microsoft.com/en-us/azure/storage/common/storage-quickstart-create-account?tabs=portal) - -except you should use the _existing_ resource group you created earlier, i.e. don't create a new one. - -The Storage account name you choose is what Provider calls the `AZURE_ACCOUNT_NAME`. - -```text -# Example AZURE_ACCOUNT_NAME (Storage account name) -troystorageaccount1 -``` - -Use the same `Location` as your resource group. -The other fields can be left with their default values unless you want to change them. - -Wait for it to say, "Your deployment is complete." - -## Get a Storage Account Access Key - -See the Azure docs page: - -[Manage storage account settings in the Azure portal](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-manage) - -Go to the subsection about access keys and follow the instructions to view your new storage account's credentials. -Copy the value of one of the keys (e.g. key1, not the connection string). That's what Provider calls `AZURE_ACCOUNT_KEY`. - -```text -# Example AZURE_ACCOUNT_KEY (Storage account access key) -93uKDkbjfnSUNPKw2tpe0LOM+3Wk+OSkNmgwhzjvzDw1d3sKVhMRTC5ikvN0r3zsx8eQrmT9Wgjz22iLPu3aGw== -``` - -You now have all the Azure credentials Provider needs. See the instructions near the top of this page about how to give those Azure credentials to Provider. - -## Store Some Data in Azure Storage - -You now have a storage account, but you don't have any data stored under it yet. To get some data stored in [Azure Storage](https://docs.microsoft.com/en-us/azure/storage/common/storage-introduction), the easiest option is to use [Azure Storage Explorer](https://azure.microsoft.com/en-us/features/storage-explorer/), a free desktop app that works on Windows, macOS and Linux. - -[Get Azure Storage Explorer](https://azure.microsoft.com/en-us/features/storage-explorer/). - -Azure Storage can store blobs, files, queues and tables. To work with Ocean Network, you should store your files in [Azure Blob storage (also called object storage)](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction), not Azure Files. - -Besides Azure Storage Explorer, there are [many other Azure Storage APIs, libraries and tools](https://docs.microsoft.com/en-us/azure/storage/common/storage-introduction#storage-apis-libraries-and-tools). diff --git a/content/tutorials/compute-to-data-minikube.md b/content/tutorials/compute-to-data-minikube.md index 9d926382..948401df 100644 --- a/content/tutorials/compute-to-data-minikube.md +++ b/content/tutorials/compute-to-data-minikube.md @@ -33,6 +33,10 @@ minikube config set kubernetes-version v1.16.0 minikube start --cni=calico --driver=docker --container-runtime=docker ``` +Depending on the number of available CPUs, RAM, and the required resources for running the job, consider adding options `--cpu`, `--memory`, and `--disk-size` to avoid runtime issues. + +For other options to run minikube refer to this [link](https://minikube.sigs.k8s.io/docs/commands/start/) + ## Install kubectl ```bash diff --git a/content/tutorials/images/marketplace/Staking-2.png b/content/tutorials/images/marketplace/Staking-2.png index 224ec838..d1588ee4 100644 Binary files a/content/tutorials/images/marketplace/Staking-2.png and b/content/tutorials/images/marketplace/Staking-2.png differ diff --git a/content/tutorials/images/marketplace/Staking-3.png b/content/tutorials/images/marketplace/Staking-3.png index d1588ee4..70f2b5ae 100644 Binary files a/content/tutorials/images/marketplace/Staking-3.png and b/content/tutorials/images/marketplace/Staking-3.png differ diff --git a/content/tutorials/images/marketplace/Staking-4.png b/content/tutorials/images/marketplace/Staking-4.png index 70f2b5ae..afda5988 100644 Binary files a/content/tutorials/images/marketplace/Staking-4.png and b/content/tutorials/images/marketplace/Staking-4.png differ diff --git a/content/tutorials/images/marketplace/Staking-5.png b/content/tutorials/images/marketplace/Staking-5.png index afda5988..fb6dd578 100644 Binary files a/content/tutorials/images/marketplace/Staking-5.png and b/content/tutorials/images/marketplace/Staking-5.png differ diff --git a/content/tutorials/images/marketplace/Staking-6.png b/content/tutorials/images/marketplace/Staking-6.png index fb6dd578..9c87caef 100644 Binary files a/content/tutorials/images/marketplace/Staking-6.png and b/content/tutorials/images/marketplace/Staking-6.png differ diff --git a/content/tutorials/images/marketplace/Staking-7.png b/content/tutorials/images/marketplace/Staking-7.png deleted file mode 100644 index 9c87caef..00000000 Binary files a/content/tutorials/images/marketplace/Staking-7.png and /dev/null differ diff --git a/content/tutorials/images/marketplace/Swap-1.png b/content/tutorials/images/marketplace/Swap-1.png index 7abd88b1..e6f24f08 100644 Binary files a/content/tutorials/images/marketplace/Swap-1.png and b/content/tutorials/images/marketplace/Swap-1.png differ diff --git a/content/tutorials/images/marketplace/Swap-2.png b/content/tutorials/images/marketplace/Swap-2.png index e6f24f08..79608dfd 100644 Binary files a/content/tutorials/images/marketplace/Swap-2.png and b/content/tutorials/images/marketplace/Swap-2.png differ diff --git a/content/tutorials/images/marketplace/Swap-3.png b/content/tutorials/images/marketplace/Swap-3.png index 79608dfd..9888497a 100644 Binary files a/content/tutorials/images/marketplace/Swap-3.png and b/content/tutorials/images/marketplace/Swap-3.png differ diff --git a/content/tutorials/images/marketplace/Swap-4.png b/content/tutorials/images/marketplace/Swap-4.png index 9888497a..f7445b06 100644 Binary files a/content/tutorials/images/marketplace/Swap-4.png and b/content/tutorials/images/marketplace/Swap-4.png differ diff --git a/content/tutorials/images/marketplace/Swap-5.png b/content/tutorials/images/marketplace/Swap-5.png index f7445b06..e3bcef4f 100644 Binary files a/content/tutorials/images/marketplace/Swap-5.png and b/content/tutorials/images/marketplace/Swap-5.png differ diff --git a/content/tutorials/images/marketplace/Swap-6.png b/content/tutorials/images/marketplace/Swap-6.png deleted file mode 100644 index e3bcef4f..00000000 Binary files a/content/tutorials/images/marketplace/Swap-6.png and /dev/null differ diff --git a/content/tutorials/images/marketplace/publish/azure-1.png b/content/tutorials/images/marketplace/publish/azure-1.png new file mode 100644 index 00000000..fa00009a Binary files /dev/null and b/content/tutorials/images/marketplace/publish/azure-1.png differ diff --git a/content/tutorials/images/marketplace/publish/azure-10.png b/content/tutorials/images/marketplace/publish/azure-10.png new file mode 100644 index 00000000..36cf04aa Binary files /dev/null and b/content/tutorials/images/marketplace/publish/azure-10.png differ diff --git a/content/tutorials/images/marketplace/publish/azure-2.png b/content/tutorials/images/marketplace/publish/azure-2.png new file mode 100644 index 00000000..511ff199 Binary files /dev/null and b/content/tutorials/images/marketplace/publish/azure-2.png differ diff --git a/content/tutorials/images/marketplace/publish/azure-3.png b/content/tutorials/images/marketplace/publish/azure-3.png new file mode 100644 index 00000000..4cf63916 Binary files /dev/null and b/content/tutorials/images/marketplace/publish/azure-3.png differ diff --git a/content/tutorials/images/marketplace/publish/azure-4.png b/content/tutorials/images/marketplace/publish/azure-4.png new file mode 100644 index 00000000..2b074641 Binary files /dev/null and b/content/tutorials/images/marketplace/publish/azure-4.png differ diff --git a/content/tutorials/images/marketplace/publish/azure-5.png b/content/tutorials/images/marketplace/publish/azure-5.png new file mode 100644 index 00000000..c07525e5 Binary files /dev/null and b/content/tutorials/images/marketplace/publish/azure-5.png differ diff --git a/content/tutorials/images/marketplace/publish/azure-6.png b/content/tutorials/images/marketplace/publish/azure-6.png new file mode 100644 index 00000000..4c576189 Binary files /dev/null and b/content/tutorials/images/marketplace/publish/azure-6.png differ diff --git a/content/tutorials/images/marketplace/publish/azure-7.png b/content/tutorials/images/marketplace/publish/azure-7.png new file mode 100644 index 00000000..000dc780 Binary files /dev/null and b/content/tutorials/images/marketplace/publish/azure-7.png differ diff --git a/content/tutorials/images/marketplace/publish/azure-8.png b/content/tutorials/images/marketplace/publish/azure-8.png new file mode 100644 index 00000000..d424ccae Binary files /dev/null and b/content/tutorials/images/marketplace/publish/azure-8.png differ diff --git a/content/tutorials/images/marketplace/publish/azure-9.png b/content/tutorials/images/marketplace/publish/azure-9.png new file mode 100644 index 00000000..f46b3c23 Binary files /dev/null and b/content/tutorials/images/marketplace/publish/azure-9.png differ diff --git a/content/tutorials/images/marketplace/publish/marketplace-publish-file-field.png b/content/tutorials/images/marketplace/publish/marketplace-publish-file-field.png new file mode 100644 index 00000000..706aba2d Binary files /dev/null and b/content/tutorials/images/marketplace/publish/marketplace-publish-file-field.png differ diff --git a/content/tutorials/images/marketplace/publish/one-drive-1.png b/content/tutorials/images/marketplace/publish/one-drive-1.png new file mode 100644 index 00000000..00910484 Binary files /dev/null and b/content/tutorials/images/marketplace/publish/one-drive-1.png differ diff --git a/content/tutorials/images/marketplace/publish/one-drive-2.png b/content/tutorials/images/marketplace/publish/one-drive-2.png new file mode 100644 index 00000000..7334561d Binary files /dev/null and b/content/tutorials/images/marketplace/publish/one-drive-2.png differ diff --git a/content/tutorials/images/marketplace/publish/one-drive-3.png b/content/tutorials/images/marketplace/publish/one-drive-3.png new file mode 100644 index 00000000..73c4f043 Binary files /dev/null and b/content/tutorials/images/marketplace/publish/one-drive-3.png differ diff --git a/content/tutorials/images/marketplace/publish/one-drive-4.png b/content/tutorials/images/marketplace/publish/one-drive-4.png new file mode 100644 index 00000000..61c964e1 Binary files /dev/null and b/content/tutorials/images/marketplace/publish/one-drive-4.png differ diff --git a/content/tutorials/images/marketplace/publish/publish-google-drive-2.png b/content/tutorials/images/marketplace/publish/publish-google-drive-2.png new file mode 100644 index 00000000..9b126c47 Binary files /dev/null and b/content/tutorials/images/marketplace/publish/publish-google-drive-2.png differ diff --git a/content/tutorials/images/marketplace/publish/publish-google-drive.png b/content/tutorials/images/marketplace/publish/publish-google-drive.png new file mode 100644 index 00000000..f472a96f Binary files /dev/null and b/content/tutorials/images/marketplace/publish/publish-google-drive.png differ diff --git a/content/tutorials/marketplace-add-liquidity.md b/content/tutorials/marketplace-add-liquidity.md index b5d635ca..d2571342 100644 --- a/content/tutorials/marketplace-add-liquidity.md +++ b/content/tutorials/marketplace-add-liquidity.md @@ -25,28 +25,22 @@ After finding the dataset, select **`POOL`** tab and click on **`ADD LIQUIDITY`* ![staking part-1](images/marketplace/Staking-1.png 'POOL tab') -### Step 2 - Associated risks - -Read carefully the risks associated with this operation. - -![staking part-2](images/marketplace/Staking-2.png 'Associated risks') - -### Step 3 - Liquidity amount +### Step 2 - Liquidity amount Enter the amount of OCEAN tokens you want to add. The expected amount of pool shares and percentages for the provided amount will be displayed. -![staking part-3](images/marketplace/Staking-3.png 'Add liquidity amount') +![staking part-2](images/marketplace/Staking-2.png 'Add liquidity amount') -### Step 4 - Transaction: Access to OCEAN tokens +### Step 3 - Transaction: Access to OCEAN tokens -![staking part-4](images/marketplace/Staking-4.png 'Transaction: Approve spend limit') +![staking part-3](images/marketplace/Staking-3.png 'Transaction: Approve spend limit') -### Step 5 - Click supply +### Step 4 - Click supply -![staking part-5](images/marketplace/Staking-5.png 'SUPPLY liquidity') +![staking part-4](images/marketplace/Staking-4.png 'SUPPLY liquidity') -### Step 6 - Transaction: Add liquidty +### Step 5 - Transaction: Add liquidty -![staking part-6](images/marketplace/Staking-6.png 'Transaction: Add liquidity') +![staking part-5](images/marketplace/Staking-5.png 'Transaction: Add liquidity') -![staking part-7](images/marketplace/Staking-7.png 'View transaction') +![staking part-6](images/marketplace/Staking-6.png 'View transaction') diff --git a/content/tutorials/marketplace-publish-data-asset.md b/content/tutorials/marketplace-publish-data-asset.md index 3abf7dd8..b1f3989c 100644 --- a/content/tutorials/marketplace-publish-data-asset.md +++ b/content/tutorials/marketplace-publish-data-asset.md @@ -96,6 +96,9 @@ With the _fixed pricing_ schema, the publisher sets the price that buyers will p With the _free pricing_ schema, the publisher provides an asset that is free to be downloaded by anyone. With the _dynamic pricing_ schema, the publisher sets the asset price and creates a datatoken liquidity pool with an initial amount of OCEAN tokens. + +For more information on the pricing models, please refer this [document](/concepts/asset-pricing/). + The publisher can also change the **Swap Fee** of the liquidity pool. For a deep dive into the fee structure, please refer to this [document](/concepts/fees/). diff --git a/content/tutorials/marketplace-swap.md b/content/tutorials/marketplace-swap.md index f528176f..0bcb5ade 100644 --- a/content/tutorials/marketplace-swap.md +++ b/content/tutorials/marketplace-swap.md @@ -19,28 +19,22 @@ description: Tutorial to swap datatokens for OCEAN tokens using Ocean Market After finding the dataset, select the **`TRADE`** tab. -### Step 2 - Associated risks - -Read carefully the risks associated with this operation. - -![swap part-1](images/marketplace/Swap-1.png 'Associated risks') - -### Step 3 - Trade amount +### Step 2 - Trade amount Enter the amount of OCEAN tokens to swap. The datatokens amount to receive is displayed with the swap fees information. The reverse operation(swap datatokens to OCEAN tokens) is also available on the trade tab. -![swap part-2](images/marketplace/Swap-2.png 'Amount of OCEANs to swap') +![swap part-1](images/marketplace/Swap-1.png 'Amount of OCEANs to swap') -### Step 4 - Transaction: Access to OCEAN token(s) +### Step 3 - Transaction: Access to OCEAN token(s) -![swap part-3](images/marketplace/Swap-3.png 'Transaction: Approve spend limit') +![swap part-2](images/marketplace/Swap-2.png 'Transaction: Approve spend limit') -### Step 5 - Click swap +### Step 4 - Click swap -![swap part-4](images/marketplace/Swap-4.png 'Swap tokens') +![swap part-3](images/marketplace/Swap-3.png 'Swap tokens') -### Step 6 - Transaction: Swap tokens +### Step 5 - Transaction: Swap tokens -![swap part-5](images/marketplace/Swap-5.png 'Transaction: Swap tokens') +![swap part-4](images/marketplace/Swap-4.png 'Transaction: Swap tokens') -![swap part-6](images/marketplace/Swap-6.png 'View transaction') +![swap part-5](images/marketplace/Swap-5.png 'View transaction') diff --git a/content/tutorials/on-premise-for-provider.md b/content/tutorials/on-premise-for-provider.md deleted file mode 100644 index e78dbc40..00000000 --- a/content/tutorials/on-premise-for-provider.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Set Up On-Premise Storage -description: Tutorial about how to set up on-premise storage for use with Ocean. ---- - -_Note: This needs updating for Ocean V3._ - -To enable Provider to use files stored in on-premise storage (i.e. files with an URL not containing `core.windows.net` or `s3://`), there is _nothing to do, other than make sure Provider can resolve the URLs_. In particular, you don't have to set any Provider-specific configuration settings, e.g. in the `[osmosis]` section of the Provider config file or in some special Provider environment variables. - -Local and private network URLs are fine so long as they can be resolved by Provider. Potential examples include `http://localhost/helicopter_data.xls`, `http://192.168.12.34/almond_sales_2012.csv` and `http://10.12.34.56/duck_photos.zip`. diff --git a/data/sidebars/concepts.yml b/data/sidebars/concepts.yml index 03e3e362..b9305908 100644 --- a/data/sidebars/concepts.yml +++ b/data/sidebars/concepts.yml @@ -17,6 +17,8 @@ items: - title: Fees link: /concepts/fees/ + - title: Asset pricing + link: /concepts/asset-pricing/ - group: Compute-to-Data items: diff --git a/data/sidebars/tutorials.yml b/data/sidebars/tutorials.yml index a653c0da..17a78aee 100644 --- a/data/sidebars/tutorials.yml +++ b/data/sidebars/tutorials.yml @@ -18,6 +18,8 @@ link: /tutorials/marketplace-introduction/ - title: Publish link: /tutorials/marketplace-publish-data-asset/ + - title: Asset hosting + link: /tutorials/asset-hosting/ - title: Download link: /tutorials/marketplace-download-data-asset/ - title: Swap @@ -50,15 +52,6 @@ - title: Setting up docker registry link: /tutorials/compute-to-data-docker-registry/ -- group: Storage Setup - items: - - title: Set Up Azure Storage - link: /tutorials/azure-for-provider/ - - title: Set Up Amazon S3 Storage - link: /tutorials/amazon-s3-for-provider/ - - title: Set Up On-Premise Storage - link: /tutorials/on-premise-for-provider/ - - group: Fine-Grained Permissions items: - title: Overview diff --git a/package-lock.json b/package-lock.json index 3a3008da..4b6ec1ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5793,17 +5793,23 @@ "integrity": "sha512-1uIESzroqpaTzt9uX48HO+6gfnKu3RwvWdCcWSrX4csMInJfCo1yvKPNXCwXFRpJqRW25tiASb6No0YH57PXqg==" }, "axios": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", - "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", "requires": { - "follow-redirects": "^1.14.8" + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" }, "dependencies": { - "follow-redirects": { - "version": "1.14.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", - "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==" + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } } } }, @@ -9014,9 +9020,9 @@ } }, "dotenv": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.0.tgz", - "integrity": "sha512-qD9WU0MPM4SWLPJy/r2Be+2WgQj8plChsyrCNQzW/0WjvcJQiKQJ9mH3ZgB3fxbUUxgc/11ZJ0Fi5KiimWGz2Q==", + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.1.tgz", + "integrity": "sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ==", "dev": true }, "download": { diff --git a/package.json b/package.json index 94efc27c..a541387a 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "dependencies": { "@oceanprotocol/art": "^3.2.0", - "axios": "^0.26.1", + "axios": "^0.27.2", "classnames": "^2.3.1", "gatsby": "^2.32.13", "gatsby-image": "^3.11.0", @@ -66,7 +66,7 @@ }, "devDependencies": { "@svgr/webpack": "^5.5.0", - "dotenv": "^16.0.0", + "dotenv": "^16.0.1", "eslint": "^7.32.0", "eslint-config-oceanprotocol": "^1.5.0", "eslint-config-prettier": "^8.5.0", diff --git a/src/pages/404.jsx b/src/pages/404.jsx index 967e230d..8eb0b92a 100755 --- a/src/pages/404.jsx +++ b/src/pages/404.jsx @@ -19,6 +19,8 @@ const tag = 'ocean' export default class NotFoundPage extends Component { state = { gif: '' } + browser = typeof window !== 'undefined' && window + static propTypes = { location: PropTypes.object } @@ -45,27 +47,31 @@ export default class NotFoundPage extends Component { render() { return ( <> - - - -
-

Page not found.

-

- You just hit a route that doesn't exist... the sadness. - Check your url, go back to the homepage, or - check out some {tag} gifs, entirely your choice. -

+ {this.browser && ( + <> + + + +
+

Page not found.

+

+ You just hit a route that doesn't exist... the sadness. + Check your url, go back to the homepage, + or check out some {tag} gifs, entirely your choice. +

-
-
-
+
+ +
+
+
+
+ + )} ) }