mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
GITBOOK-267: change request with no subject merged in GitBook
This commit is contained in:
parent
f6685edba4
commit
52c2fec94c
BIN
.gitbook/assets/DDO Flow.jpg
Normal file
BIN
.gitbook/assets/DDO Flow.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 163 KiB |
@ -27,7 +27,7 @@
|
||||
* [How to Data Farm](user-guides/how-to-data-farm.md)
|
||||
* [Claim OCEAN Rewards](user-guides/claim-ocean-rewards.md)
|
||||
* [Liquidity Pools \[deprecated\]](user-guides/remove-liquidity-using-etherscan.md)
|
||||
* [👨💻 👨💻 Developers](developers/README.md)
|
||||
* [👨💻 👨💻 👨💻 Developers](developers/README.md)
|
||||
* [Architecture Overview](developers/architecture.md)
|
||||
* [Data NFTs and Datatokens](developers/datanft-and-datatoken.md)
|
||||
* [Roles](developers/roles.md)
|
||||
@ -41,6 +41,7 @@
|
||||
* [Forking Ocean Market](developers/build-a-marketplace/forking-ocean-market.md)
|
||||
* [Customising a Market](developers/build-a-marketplace/customising-your-market.md)
|
||||
* [Deploying a Market](developers/build-a-marketplace/deploying-market.md)
|
||||
* [Contracts](developers/contracts.md)
|
||||
* [Subgraph](developers/subgraph/README.md)
|
||||
* [Get data NFTs](developers/using-ocean-subgraph/list-data-nfts.md)
|
||||
* [Get data NFT information](developers/using-ocean-subgraph/get-data-nft-information.md)
|
||||
@ -50,7 +51,6 @@
|
||||
* [Get veOcean stats](developers/subgraph/get-veocean-stats.md)
|
||||
* [Ocean.py](developers/ocean.py/README.md)
|
||||
* [Intro](developers/ocean.py/intro.md)
|
||||
* [Installation](developers/ocean.py/installation.md)
|
||||
* [Ocean Libraries](developers/ocean-libraries/README.md)
|
||||
* [Configuration](developers/using-ocean-libraries/configuration.md)
|
||||
* [Creating a data NFT](developers/using-ocean-libraries/creating-datanft.md)
|
||||
|
@ -57,28 +57,4 @@ The DDO is stored on-chain as part of the NFT contract and stored in encrypted f
|
||||
|
||||
Here is the flow:
|
||||
|
||||
![DDO flow](../.gitbook/assets/architecture/ddo-flow.png)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>UML source</summary>
|
||||
|
||||
```
|
||||
title DDO flow
|
||||
|
||||
User(Ocean library) -> User(Ocean library): Prepare DDO
|
||||
User(Ocean library) -> Provider: encrypt DDO
|
||||
Provider -> User(Ocean library): encryptedDDO
|
||||
User(Ocean library) -> ERC721 contract: publish encryptedDDO
|
||||
Aquarius <-> ERC721 contract: monitors ERC721 contract and gets MetdadataCreated Event (contains encryptedDDO)
|
||||
Aquarius -> ERC721 contract: calls getMetaData()
|
||||
Aquarius -> Provider: decrypt encryptedDDO, signed request using Aquarius's private key
|
||||
Provider -> ERC721 contract: checks state using getMetaData()
|
||||
Provider -> Provider: depending on metadataState (expired,retired) and aquarius address, validates the request
|
||||
Provider -> Aquarius: DDO
|
||||
Aquarius -> Aquarius : validate DDO
|
||||
Aquarius -> Aquarius : cache DDO
|
||||
Aquarius -> Aquarius : enhance cached DDO in response with additional infos like events & stats
|
||||
```
|
||||
|
||||
</details>
|
||||
<figure><img src="../.gitbook/assets/DDO Flow.jpg" alt=""><figcaption><p>DDO Flow</p></figcaption></figure>
|
||||
|
2
developers/contracts.md
Normal file
2
developers/contracts.md
Normal file
@ -0,0 +1,2 @@
|
||||
# Contracts
|
||||
|
BIN
developers/ocean.py/images/outline-1.jpg
Normal file
BIN
developers/ocean.py/images/outline-1.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
@ -26,7 +26,7 @@ Create an ERC721 data NFT for each service, and ERC20 datatoken for access (1.0
|
||||
|
||||
And here is an outline video which describes the concepts better.
|
||||
|
||||
[![Watch the video](../../.gitbook/assets/ocean.py/outline-1.jpg)](https://youtu.be/8uZC6PC9PBM)
|
||||
[![Watch the video](images/outline-1.jpg)](https://youtu.be/8uZC6PC9PBM)
|
||||
|
||||
|
||||
## ocean.py Quickstart 🚀
|
||||
|
@ -6,24 +6,18 @@ Please note that if a signature parameter exists, it will take precedence over t
|
||||
|
||||
### Create Auth Token
|
||||
|
||||
#### GET /api/services/createAuthToken
|
||||
**Endpoint:** `GET /api/services/createAuthToken`
|
||||
|
||||
Allows the user to create an auth token.
|
||||
**Description:** Allows the user to create an authentication token that can be used to authenticate requests to the provider API, instead of signing each request. The generated auth token can be used until its expiration in all supported requests.
|
||||
|
||||
Parameters
|
||||
**Parameters:**
|
||||
|
||||
```
|
||||
address: String object containing consumer's address (optional)
|
||||
nonce: Integer, Nonce (required)
|
||||
signature: String object containg user signature (signed message)
|
||||
The signature is based on hashing the following parameters:
|
||||
address + nonce
|
||||
expiration: valid future UTC timestamp (required)
|
||||
```
|
||||
* `address`: The Ethereum address of the consumer (Optional).
|
||||
* `nonce`: A unique identifier for this request, to prevent replay attacks (Required).
|
||||
* `signature`: A digital signature proving ownership of the `address`. The signature should be generated by signing the hashed concatenation of the `address` and `nonce` parameters (Required).
|
||||
* `expiration`: A valid future UTC timestamp representing when the auth token will expire (Required).
|
||||
|
||||
Returns: Created auth token.
|
||||
|
||||
Example:
|
||||
**Curl Example:**
|
||||
|
||||
```
|
||||
GET /api/services/createAuthToken?address=<your_address>&&nonce=<your_nonce>&&expiration=<expiration>&signature=<your_signature>
|
||||
@ -37,6 +31,21 @@ Response:
|
||||
{"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NjAwNTMxMjksImFkZHJlc3MiOiIweEE3OGRlYjJGYTc5NDYzOTQ1QzI0Nzk5MTA3NUUyYTBlOThCYTdBMDkifQ.QaRqYeSYxZpnFayzPmUkj8TORHHJ_vRY-GL88ZBFM0o"}
|
||||
```
|
||||
|
||||
#### Javascript Example:
|
||||
|
||||
```runkit nodeVersion="18.x.x"
|
||||
const axios = require('axios');
|
||||
const address = "0x7e2a2FA2a064F693f0a55C5639476d913Ff12D05"
|
||||
const nonce = 1
|
||||
const signature
|
||||
const url = `https://provider.oceanprotocol.com/api/services/createAuthToken?address=${address}&nonce=${nonce}&expiration=<expiration>&signature=<your_signature>`;
|
||||
axios.get(url).then(response => {
|
||||
console.log(response.data);
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
```
|
||||
|
||||
#### Delete Auth Token
|
||||
|
||||
#### DELETE /api/services/deleteAuthToken
|
||||
|
@ -1,18 +1,24 @@
|
||||
---
|
||||
description: An introduction to Data Farming and Ocean Protocol incentive mechanisms
|
||||
description: An intro to Ocean Protocol's 'Data Farming' incentive mechanisms
|
||||
---
|
||||
|
||||
# Data Farming 101
|
||||
|
||||
Data Farming (DF) incentivizes sustainable and perpetual growth of Data Consume Volume (DCV) inside the Ocean ecosystem.
|
||||
### What is Data Farming?
|
||||
|
||||
DFing is similar to 'liquidity mining' apart of leading yield farming mechanisms in DeFi, but tuned for Data Consumption Volume (DCV).
|
||||
Data Farming (DF) is Ocean Protocol's **incentive system for curating high quality assets on the Ocean Market.** Participants vote on the Ocean Market assets that they believe are high quality and likely to sell. If they are right, then these Data Farmers **get a portion of the Ocean Market sales of the assets** they voted on!
|
||||
|
||||
Data Consume Volume (DCV) is a metric placed to represent the total $ amount spent on purchases of data assets, fees on executing transactions, sharing data, and more. So, the more data consumed, the more rewards are distributed.
|
||||
(If you are familiar with 'liquidity mining', then you will find that Data Farming is similar but tuned instead for the curation of high quality assets on the Ocean Market.)
|
||||
|
||||
Data Farming rewards OCEAN to liquidity providers (stakers) in two different ways: active and passive rewards. The two reward functions produce variable APYs, contingent user criteria and chosen eligiblity, plus data consume volume (DCV). 
|
||||
### What is DCV?
|
||||
|
||||
How Data farming differentiates from yield farming is that Data Farming incentivizes a sustainable supply of polished and high-demand data assets into the protocol. 
|
||||
**Data Consume Volume (DCV)** is a metric for the total $ amount spent on purchases of Ocean Market assets, transaction fees, and more. The more that Ocean Market assets are consumed (i.e. purchased), then the more OCEAN rewards are distributed.
|
||||
|
||||
OCEAN rewards go to Data Farmers in two different ways: **passive** rewards and **active** rewards. The two reward functions produce different variable APYs.
|
||||
|
||||
### How is Data Farming different from Yield Farming?
|
||||
|
||||
Data Farming is similar to Yield Farming because both generate yield for investors. However, Data Farming differs from conventional Yield Farming because it specifically incentivizes the consumption and curation of high-demand Ocean Market assets. 
|
||||
|
||||
Unlike yield farming in DeFi, data farming has real intrinsic utility for all stakeholders: Liquidity providers (LPs) earn additional tokens, the protocol receives sustainable liquidity, and the users can trust the protocol's secured data assets. It's a win-win situation for all parties involved.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user