Merge branch 'main' into feature/fix_c2d_with_envs
@ -132,3 +132,9 @@ redirects:
|
||||
rewards/user-guides/how-to-volumedf: data-farming/README.md
|
||||
data-farming/challengedf: data-farming/README.md
|
||||
data-farming/challengedf-guide: data-farming/README.md
|
||||
predictoor/pdr-intro: predictoor/README.md
|
||||
predictoor/pdr-architecture: predictoor/README.md
|
||||
predictoor/pdr-earn: predictoor/README.md
|
||||
predictoor/pdr-parameters: predictoor/README.md
|
||||
predictoor/pdr-faq: predictoor/README.md
|
||||
predictoor/pdr-resources: predictoor/README.md
|
Before Width: | Height: | Size: 2.4 MiB After Width: | Height: | Size: 2.4 MiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 387 KiB |
Before Width: | Height: | Size: 370 KiB |
Before Width: | Height: | Size: 184 KiB |
Before Width: | Height: | Size: 358 KiB |
Before Width: | Height: | Size: 167 KiB |
Before Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 165 KiB |
Before Width: | Height: | Size: 127 KiB |
Before Width: | Height: | Size: 251 KiB |
Before Width: | Height: | Size: 182 KiB |
Before Width: | Height: | Size: 506 KiB |
Before Width: | Height: | Size: 277 KiB |
Before Width: | Height: | Size: 158 KiB |
Before Width: | Height: | Size: 72 KiB |
BIN
.gitbook/assets/hosting/uploader-ui-connect.png
Normal file
After Width: | Height: | Size: 585 KiB |
BIN
.gitbook/assets/hosting/uploader-ui-copy-ID.png
Normal file
After Width: | Height: | Size: 203 KiB |
BIN
.gitbook/assets/hosting/uploader-ui-get-ddo-link.png
Normal file
After Width: | Height: | Size: 186 KiB |
BIN
.gitbook/assets/hosting/uploader-ui-get-quote.png
Normal file
After Width: | Height: | Size: 176 KiB |
BIN
.gitbook/assets/hosting/uploader-ui-market-publish.png
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
.gitbook/assets/hosting/uploader-ui-network.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
.gitbook/assets/hosting/uploader-ui-upload.png
Normal file
After Width: | Height: | Size: 205 KiB |
BIN
.gitbook/assets/hosting/uploader-ui-wait.png
Normal file
After Width: | Height: | Size: 200 KiB |
Before Width: | Height: | Size: 802 KiB |
Before Width: | Height: | Size: 260 KiB |
Before Width: | Height: | Size: 356 KiB |
Before Width: | Height: | Size: 210 KiB |
Before Width: | Height: | Size: 206 KiB |
Before Width: | Height: | Size: 171 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 376 KiB |
Before Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 108 KiB |
BIN
.gitbook/assets/uploader/Diagrams_Retrieve_file_flow.png
Normal file
After Width: | Height: | Size: 104 KiB |
BIN
.gitbook/assets/uploader/Diagrams_Upload_file_flow.png
Normal file
After Width: | Height: | Size: 134 KiB |
BIN
.gitbook/assets/uploader/uploader_screen_1.png
Normal file
After Width: | Height: | Size: 562 KiB |
BIN
.gitbook/assets/uploader/uploader_screen_10.png
Normal file
After Width: | Height: | Size: 294 KiB |
BIN
.gitbook/assets/uploader/uploader_screen_11.png
Normal file
After Width: | Height: | Size: 202 KiB |
BIN
.gitbook/assets/uploader/uploader_screen_12.png
Normal file
After Width: | Height: | Size: 208 KiB |
BIN
.gitbook/assets/uploader/uploader_screen_13.png
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
.gitbook/assets/uploader/uploader_screen_14.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
.gitbook/assets/uploader/uploader_screen_15.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
.gitbook/assets/uploader/uploader_screen_2.png
Normal file
After Width: | Height: | Size: 585 KiB |
BIN
.gitbook/assets/uploader/uploader_screen_3.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
.gitbook/assets/uploader/uploader_screen_4.png
Normal file
After Width: | Height: | Size: 176 KiB |
BIN
.gitbook/assets/uploader/uploader_screen_5.png
Normal file
After Width: | Height: | Size: 205 KiB |
BIN
.gitbook/assets/uploader/uploader_screen_6.png
Normal file
After Width: | Height: | Size: 200 KiB |
BIN
.gitbook/assets/uploader/uploader_screen_7.png
Normal file
After Width: | Height: | Size: 186 KiB |
BIN
.gitbook/assets/uploader/uploader_screen_8.png
Normal file
After Width: | Height: | Size: 202 KiB |
BIN
.gitbook/assets/uploader/uploader_screen_9.png
Normal file
After Width: | Height: | Size: 128 KiB |
12
README.md
@ -1,12 +1,8 @@
|
||||
---
|
||||
description: Help for wherever you are on your Ocean Protocol journey.
|
||||
cover: .gitbook/assets/cover/docs_banner.png
|
||||
coverY: 0
|
||||
layout: landing
|
||||
---
|
||||
|
||||
# 👋 Welcome
|
||||
|
||||
<table data-view="cards">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -59,14 +55,6 @@ layout: landing
|
||||
<td><a href="predictoor/">predictoor</a></td>
|
||||
<td><a href=".gitbook/assets/cover/predictoor_card.jpg">predictoor_card.jpg</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="data-farming/">data farming</a></td>
|
||||
<td>Earn OCEAN rewards by locking OCEAN, curating data, and predicting.</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><a href="data-farming/">data farming</a></td>
|
||||
<td><a href=".gitbook/assets/cover/data_farming_card.png">data_farming_card.png</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="infrastructure/">infrastructure</a></td>
|
||||
<td>For software architects and developers - deploy your own components in Ocean Protocol ecosystem.</td>
|
||||
|
45
SUMMARY.md
@ -1,6 +1,5 @@
|
||||
# Table of contents
|
||||
|
||||
- [👋 Welcome](README.md)
|
||||
- [Ocean docs](README.md)
|
||||
- [🌊 Discover Ocean](discover/README.md)
|
||||
- [Why Ocean?](discover/why-ocean.md)
|
||||
- [What is Ocean?](discover/what-is-ocean.md)
|
||||
@ -14,15 +13,9 @@
|
||||
- [Basic concepts](user-guides/basic-concepts.md)
|
||||
- [Using Wallets](user-guides/wallets/README.md)
|
||||
- [Set Up MetaMask](user-guides/wallets/metamask-setup.md)
|
||||
- [Manage Your OCEAN](user-guides/wallets-and-ocean.md)
|
||||
- [Using Ocean Market](user-guides/using-ocean-market.md)
|
||||
- [Publish Data NFTs](user-guides/publish-data-nfts.md)
|
||||
- [Buy NFT Data](user-guides/buy-data-nfts.md)
|
||||
- [Compute-to-Data in Ocean Market](user-guides/compute-to-data/README.md)
|
||||
- [Make a Boss C2D Algorithm](user-guides/compute-to-data/make-a-boss-c2d-algorithm.md)
|
||||
- [Publish a C2D Algorithm NFT](user-guides/compute-to-data/publish-a-c2d-algorithm-nft.md)
|
||||
- [Publish a C2D Data NFT](user-guides/compute-to-data/publish-a-c2d-data-nft.md)
|
||||
- [Host Assets](user-guides/asset-hosting/README.md)
|
||||
- [Manage Your OCEAN](user-guides/wallets/wallets-and-ocean.md)
|
||||
- [Data Storage](user-guides/asset-hosting/README.md)
|
||||
- [Uploader](user-guides/asset-hosting/uploader.md)
|
||||
- [Arweave](user-guides/asset-hosting/arweave.md)
|
||||
- [AWS](user-guides/asset-hosting/aws.md)
|
||||
- [Azure Cloud](user-guides/asset-hosting/azure-cloud.md)
|
||||
@ -51,10 +44,6 @@
|
||||
- [Get API Keys for Blockchain Access](developers/get-api-keys-for-blockchain-access.md)
|
||||
- [Barge](developers/barge/README.md)
|
||||
- [Local Setup](developers/barge/local-setup-ganache.md)
|
||||
- [Build a Marketplace](developers/build-a-marketplace/README.md)
|
||||
- [Forking Ocean Market](developers/build-a-marketplace/forking-ocean-market.md)
|
||||
- [Customising a Market](developers/build-a-marketplace/customising-your-market.md)
|
||||
- [Build and host your Data Marketplace](developers/build-a-marketplace/deploying-market.md)
|
||||
- [Subgraph](developers/subgraph/README.md)
|
||||
- [Get data NFTs](developers/subgraph/list-data-nfts.md)
|
||||
- [Get data NFT information](developers/subgraph/get-data-nft-information.md)
|
||||
@ -93,6 +82,10 @@
|
||||
- [Encryption / Decryption](developers/provider/encryption-decryption.md)
|
||||
- [Compute Endpoints](developers/provider/compute-endpoints.md)
|
||||
- [Authentication Endpoints](developers/provider/authentication-endpoints.md)
|
||||
- [Uploader](developers/uploader/README.md)
|
||||
- [Uploader.js](developers/uploader/uploader-js.md)
|
||||
- [Uploader UI](developers/uploader/uploader-ui.md)
|
||||
- [Uploader UI to Market](developers/uploader/uploader-ui-marketplace.md)
|
||||
- [Developer FAQ](developers/dev-faq.md)
|
||||
- [📊 Data Scientists](data-scientists/README.md)
|
||||
- [Ocean.py](data-scientists/ocean.py/README.md)
|
||||
@ -111,30 +104,8 @@
|
||||
- [Data Value-Creation Loop](data-scientists/the-data-value-creation-loop.md)
|
||||
- [What data is valuable?](data-scientists/data-engineers.md)
|
||||
* [👀 Predictoor](predictoor/README.md)
|
||||
* [Introduction](predictoor/pdr-intro.md)
|
||||
* [Architecture](predictoor/pdr-architecture.md)
|
||||
* [How to Earn](predictoor/pdr-earn.md)
|
||||
* [Parameters](predictoor/pdr-parameters.md)
|
||||
* [Pdr FAQ](predictoor/pdr-faq.md)
|
||||
* [Pdr Resources](predictoor/pdr-resources.md)
|
||||
* [💰 Data Farming](data-farming/README.md)
|
||||
* [Passive DF (and veOCEAN)](data-farming/passivedf.md)
|
||||
* [Guide to Passive DF](data-farming/passivedf-guide.md)
|
||||
* [Liquid Staking](data-farming/liquid-staking.md)
|
||||
* [Volume DF](data-farming/volumedf.md)
|
||||
* [Guide to Volume DF](data-farming/volumedf-guide.md)
|
||||
* [Delegation in Volume DF](data-farming/delegate.md)
|
||||
* [Predictoor DF](data-farming/predictoordf.md)
|
||||
* [Guide to Predictoor DF](data-farming/predictoordf-guide.md)
|
||||
* [Claim Rewards](data-farming/claim-rewards.md)
|
||||
* [Reward Schedule](data-farming/reward-schedule.md)
|
||||
* [APYs](data-farming/apys.md)
|
||||
* [Estimated APY vs Time](data-farming/apys-plot.md)
|
||||
* [Guide to Estimating APY](data-farming/apys-guide.md)
|
||||
* [FAQ](data-farming/faq.md)
|
||||
* [🔨 Infrastructure](infrastructure/README.md)
|
||||
* [Set Up a Server](infrastructure/setup-server.md)
|
||||
* [Deploy a Marketplace](infrastructure/deploying-marketplace.md)
|
||||
* [Deploy Aquarius](infrastructure/deploying-aquarius.md)
|
||||
* [Deploy Provider](infrastructure/deploying-provider.md)
|
||||
* [Deploy Ocean Subgraph](infrastructure/deploying-ocean-subgraph.md)
|
||||
|
@ -1,61 +0,0 @@
|
||||
---
|
||||
description: Earn OCEAN rewards by locking OCEAN, curating data, and making predictions.
|
||||
cover: ../.gitbook/assets/cover/data_farming_banner.png
|
||||
coverY: 0
|
||||
---
|
||||
|
||||
# What is Data Farming?
|
||||
|
||||
**Data Farming (DF) is Ocean's incentive program.** It rewards OCEAN to participants who lock OCEAN into veOCEAN, curate data, or make predictions -- all in the name of driving **data consume volume** (DCV). DF is a bit like DeFi liquidity mining, but tuned for DCV.
|
||||
|
||||
**[The DF webapp](https://df.oceandao.org)** is where users perform most DF actions.
|
||||
|
||||
There is currently 150,000 OCEAN / week available for DF rewards.
|
||||
|
||||
## DF Streams & Budgets
|
||||
|
||||
DF is organized into two streams: Passive DF and Active DF. Each has 50% of the DF budget. Passive DF allows for passive earning potential. Active DF requires more engagement; it has several substreams, each with its own activity.
|
||||
|
||||
Here are all streams & substreams. The links lead to dedicated pages.
|
||||
|
||||
1. **[Passive DF](passivedf.md).** 75,000 OCEAN per week. Lock OCEAN for **veOCEAN**; rewards are pro-rata to veOCEAN holdings.
|
||||
1. **Active DF.** 75,000 OCEAN per week. It has these substreams:
|
||||
1. **[Volume DF](volumedf.md).** Allocate veOCEAN towards data assets with high DCV, ie "curate data". Rewards are a function of DCV and veOCEAN stake.
|
||||
1. **[Predictoor DF](predictoordf.md).** Run prediction bots to earn continuously.
|
||||
|
||||
All streams and substreams repeat **weekly** that start on Thursdays 00:00 at UTC and end on Wed at 23:59 UTC.
|
||||
|
||||
**[Claiming rewards](claim-rewards.md)**. You can claim rewards each Thursday, or wait and claim many weeks' of rewards at once.
|
||||
|
||||
Active DF's substreams can -- and do -- evolve over time. It's chronicled [here](https://blog.oceanprotocol.com/ocean-data-farming-series-c7922f1d0e45).
|
||||
|
||||
## Reward Schedule & APYs
|
||||
|
||||
**[Reward Schedule](reward-schedule.md)**. The 150,000 OCEAN / week currently available for DF rewards will increase over time to over 1.1M OCEAN / week.
|
||||
|
||||
**[Yields](apys.md)**. Historically, APYs are 5-15%. APYs vary week to week. APY depends on total OCEAN staked, duration of OCEAN lock, DCV, what DF streams you participate in, and other factors.
|
||||
|
||||
## Networks
|
||||
|
||||
OCEAN rewards for all DF streams & substreams are on Ethereum mainnet. One exception: rewards for Predictoor DF are on Oasis Sapphire.
|
||||
|
||||
Users engage in different networks, depending on the DF stream:
|
||||
- Passive DF: veOCEAN is deployed on Ethereum mainet. Users lock OCEAN for veOCEAN on Ethereum mainnet
|
||||
- Volume DF: users can allocate veOCEAN to data assets on Etherum mainnet, Polygon, BSC, Moonriver, Energy Web Chain, or Sapphire.
|
||||
- Predictoor DF: users submit predictions on Sapphire.
|
||||
|
||||
The [networks docs](../discover/networks/README.md) have more info about networks.
|
||||
|
||||
## Further resources
|
||||
|
||||
- The **[DF FAQ](faq.md)** answers more questions.
|
||||
- Main DF github repos: [df-py (backend)](https://github.com/oceanprotocol/df-py), [df-web (frontend)](https://github.com/oceanprotocol/df-web)
|
||||
- The [Ocean Data Farming Series](https://blog.oceanprotocol.com/ocean-data-farming-series-c7922f1d0e45) blog has a chronological account of all Data Farming activities since its inception. It links to related blog posts.
|
||||
|
||||
|
||||
----
|
||||
|
||||
_Next: [Passive DF (and veOCEAN)](passivedf.md)_
|
||||
|
||||
_Back: [Docs main](../README.md)_
|
||||
|
@ -1,76 +0,0 @@
|
||||
---
|
||||
description: >-
|
||||
From emissions, estimate APYs
|
||||
---
|
||||
|
||||
<figure><img src="../.gitbook/assets/gif/mafs.gif" alt=""><figcaption><p>K.I.S.S.</p></figcaption></figure>
|
||||
|
||||
# Guide to Estimating APYs
|
||||
|
||||
Recall that APY is Annual Percentage Yield, and WPY is Weekly Percentage Yield.
|
||||
|
||||
**This page provides guidance to estimate APYs.**
|
||||
|
||||
### Estimating APY from WPYs
|
||||
|
||||
Here are a couple ways to estimate APY from WPYs: _with_ compounding, and without.
|
||||
|
||||
**APY with compounding.**
|
||||
- If you were to take OCEAN rewards for given week and immediately put them back into Data Farming, then your rewards will **compound** every week.
|
||||
- Then, `APY = (1.0 + WPY for week 1) * (1.0 + WPY for week 2) * ... * (1.0 WPY for week 52) - 1.0.
|
||||
- Assuming equal WPY per week, `APY = (1.0 + WPY)^52 - 1.0`. Use 52.25 not 52.0 if you wish.
|
||||
- For WPY of 0.005, then `APY = (1.0 + 0.005)^52 - 1.0 = 0.296 = 29.6%`.
|
||||
- This assumes zero gas fees. That's reasonable given that staking & claiming are one-time transactions.
|
||||
|
||||
**APY without compounding.**
|
||||
- If you don't do compounding, then `APY = (WPY for week 1) + (WPY for week 2) + ... + (WPY for week 52)`.
|
||||
- Assuming equal WPY per week, `APY = WPY * 52`.
|
||||
- For WPY of 0.05, then `APY = 0.005 * 52 = 0.260 = 26.0%`.
|
||||
- This assumes zero gas fees. This works if you have a large amount of veOCEAN, and therefore large weekly OCEAN rewards, compared to gas fees. If that's not the case, so that gas fees don't destroy your profits, then you should (a) compound less often (b) use gas when it's cheapest, [see here](https://www.useweb3.xyz/gas).
|
||||
|
||||
### Estimating Passive DF APYs
|
||||
|
||||
The [Passive DF page](https://df.oceandao.org/passive-df) estimates profit & APY for you, as you explore different values of # OCEAN, lock time, and number of compounds. It accounts for gas costs.
|
||||
|
||||
You'll find that if # OCEAN is too small or lock time is too short, profit and APY will be <0 because gas fees will overwhelm rewards. Conversely, higher OCEAN locked and longer lock times will make APY larger.
|
||||
|
||||
### Estimating Volume DF APYs
|
||||
|
||||
APY from Volume DF is a bit more complicated and depend on many factors that are currently hard to predict accurately. It is unlikely for the user to get a practical result, which is why we don't offer a tool to estimate this value right now.
|
||||
|
||||
You can easily expand the spreadsheet above to support a basic, naive calculations for Volume DF Rewards such as adding a fixed-rate.
|
||||
|
||||
To help solve this challenge, [we built a dashboard](https://df.oceandao.org/volume-df) that shows historical and ongoing summaries of APY, Data Consume Volume, and veOCEAN allocations per-round.
|
||||
|
||||
<figure><img src="../.gitbook/assets/data-farming/curate-datasets.png" alt=""><figcaption><p>Curate like a Pro.</p></figcaption></figure>
|
||||
|
||||
Finally, you can [review df-web code](https://github.com/oceanprotocol/df-web/blob/main/src/utils/rewards.js) to understand how the APYs on the UI are calculated.
|
||||
|
||||
### Estimating Predictoor DF APYs
|
||||
|
||||
**Predictoor and staking.** Staking is a fundamental component of Predictoor: when someone makes a prediction, they must have an OCEAN stake amount accompanying that prediction.
|
||||
|
||||
Amount of stake increases potential gain and potential loss. For a given prediction, the more one stakes, the more they earn if they're right; and the more they lose if wrong. Earnings if right are also a function of Predictoor data feed sales revenue.
|
||||
|
||||
Predictoor has staking independent of Data Farming. Therefore, yield comes even without DF. Then, _Predictoor DF_ acts as _extra_ sales revenue for Predictoor data feeds; and yield with Predictoor DF is even higher.
|
||||
|
||||
**Yield for predictoors.** We can apply the yield formula for each prediction:
|
||||
|
||||
`yield = (start amount + gained amount) / (start amount) - 1.0`
|
||||
|
||||
Where in Predictoor and Predictoor DF, values are:
|
||||
- `start amount` = OCEAN staked in prediction
|
||||
- `gained amount` = `revenue * stake / (all users stake) - fee` if correct, `stake` if incorrect
|
||||
|
||||
**Be careful!** Yield can be negative if one's stake far exceeds revenue, even with a highly accurate model. But, if one has right-sized stakes and an accurate model, then yield can be quite healthy.
|
||||
|
||||
**Rapid compounding.** In other DF streams, rewards come weekly; so compounding is weekly. In Predictoor and Predictoor DF, a predictoor's revenue (rewards) come every epoch (every 5min or 1h). Therefore compounding in Predictoor could be _very_ fast, for much healthier yields yet.
|
||||
|
||||
**Estimation fidelity.** Since Predictoor is so young, we don't have detailed estimates of Predictoor APYs yet. We're excited to see where this takes us:)
|
||||
|
||||
|
||||
----
|
||||
|
||||
_Next: [FAQ](faq.md)_
|
||||
|
||||
_Back: [APYs](apys.md)_
|
@ -1,35 +0,0 @@
|
||||
---
|
||||
description: >-
|
||||
Modeling APYs
|
||||
---
|
||||
|
||||
<figure><img src="../.gitbook/assets/gif/making-money-is-fun.gif" alt=""><figcaption><p></p></figcaption></figure>
|
||||
|
||||
# Estimated APY vs Time
|
||||
|
||||
The plot below shows estimated APY over time. It brings together data from the [OCEAN reward schedule](reward-schedule.md) and estimates of **amount staked (yellow line** in plot).
|
||||
|
||||
**Green is total APY** from passive and active rewards. **Passive rewards (black)** provides a great baseline with upside in **active rewards (green)**. For example, in DF29 wash consume became unprofitable and led to a drop in DCV and therefore active rewards.
|
||||
|
||||
<figure><img src="../.gitbook/assets/data-farming/example_apys.png" alt="" width="563"><figcaption><p><em>Green: estimated APYs (passive + active). Black: estimated APYs (just passive). Yellow: estimated staking</em> </p></figcaption></figure>
|
||||
|
||||
**It's an estimate.**
|
||||
- That's ok! As the great statistician G.E. Box said, "All models are wrong, some are useful".
|
||||
- APYs are an estimate because they depend on both DF rewards and OCEAN locked. Both of those are estimates, as follows.
|
||||
- For simplicity, the model assumes that Active DF rewards are solely composed of Volume DF using the whole Active DF budget [1].
|
||||
- OCEAN locked and lock time is not known for future weeks; it must be estimated [2].
|
||||
|
||||
**OCEAN lock time greatly affects APY.**
|
||||
- The numbers above assume that all locked OCEAN is **locked for 4 years**, so that 1 OCEAN → 1 veOCEAN.
|
||||
- But APY could be much worse or more if you lock for shorter durations. Divide by 4 if you lock for 1 year. [3] elaborates.
|
||||
|
||||
**Raw model.** All the plots are calculated from [this Google Sheet](https://docs.google.com/spreadsheets/d/1F4o7PbV45yW1aPWOJ2rwZEKkgJXbIk5Yq7tj8749drc/edit#gid=1051477754).
|
||||
|
||||
|
||||
# Notes
|
||||
|
||||
[1] For better accuracy, one would need to account for Predictoor DF. However, this gets more complex because Predictoor DF is highly dependent on prediction accuracy.
|
||||
|
||||
[2] We modeled OCEAN locked by observing linear growth from DF week 5 (when OCEAN locking was introduced) to week 28: OCEAN locked grew from 7.89M OCEAN to 34.98M OCEAN respectively, or 1.177M more OCEAN locked per week. The true values of OCEAN locked was last updated on DF week 29. For more accuracy, that could be updated to the values since then.
|
||||
|
||||
[3] Here are approximate bounds: If you lock for 4 years, and everyone else locks for 2, then multiply expected APY by 2. If you lock for 4 years and others for 1, then multiply by 4. Conversely, if you lock for 2 years and everyone else for 4, then divide your expected APY by 2. If you lock for 1 year and others for 4, then divide by 4. The numbers assume that you’re actively allocating veOCEAN allocation towards high-DCV data assets. For passive locking or low-DCV data assets, divide APY by 2 (approximate).
|
@ -1,55 +0,0 @@
|
||||
---
|
||||
description: >-
|
||||
From emissions, estimate APYs
|
||||
---
|
||||
|
||||
# APYs
|
||||
|
||||
<figure><img src="../.gitbook/assets/gif/many-penguins.gif" alt=""><figcaption><p>Multiply, and multiply again. And again.</p></figcaption></figure>
|
||||
|
||||
**This page** is about APYs. There's also [estimates of APY vs time](apys-plot.md) and [a guide to estimating APYs](apys-guide.md).
|
||||
|
||||
# About APYs
|
||||
|
||||
### Source of Rewards
|
||||
|
||||
Rewards are earned by users that participate in one or more Data Farming streams. Passive DF allows passive holding of veOCEAN; Active DF streams require more work from the user.
|
||||
|
||||
Historically, annual percentage yields (APYs) are 5-15%. See for yourself: in [DF app](https://df.oceandao.org/activerewards) and scroll down to "Data Farming History".
|
||||
|
||||
You can do your own APY estimations. In Passive DF, APY is highly dependent on the locked amount *and* duration of lock. In other DF streams, there are other factors.
|
||||
|
||||
### Definition of Yield, WPY, APY
|
||||
|
||||
A **yield** is the relative gain in value compared to the amount you started with, minus costs. Specifically:
|
||||
|
||||
`yield = (start amount + gained amount - costs) / (start amount) - 1.0`
|
||||
|
||||
For example, if you start with 1000 OCEAN, have 6 OCEAN gross revenue, and 1 OCEAN costs (net 5 OCEAN):
|
||||
|
||||
`yield = (1000 + 6 - 1) / (1000) - 1.0 = 0.005`
|
||||
|
||||
We can express yield as a percentage simply by multiplying by 100 (%). For example, yield of `0.005` in percentage is `0.005 * 100% = 0.5%`.
|
||||
|
||||
The yield for one week is **Weekly Percentage Yield**, or **WPY**. For example, if you started with 1000 OCEAN and netted 5 OCEAN from DF, in one week, then your WPY = 0.005 = 0.5%.
|
||||
|
||||
The yield for one year is **Annual Percentage Yield**, or **APY**. APY can be estimated from WPYs. Assuming no compounding, `APY = WPY*52`.
|
||||
|
||||
### Costs
|
||||
|
||||
Costs should not be under-estimated. Eg if you're only doing Passive DF, and you lock a small amount of OCEAN for a short time, costs may exceed your gross income.
|
||||
|
||||
**Costs include:**
|
||||
- Gas fees for transactions (txs) on the various chains. Eg veOCEAN, passive DF rewards, and Volume DF rewards are on Ethereum mainnet. Predictoor DF is on Sapphire mainnet.
|
||||
- Txs include: locking OCEAN, claiming passive rewards, claiming active rewards, and withdrawing rewards.
|
||||
- To compound returns, these txs need to be repeated. The ideal frequency to compound rate is whatever maximizes your yield - which depends on how much OCEAN you've locked, tx fees, etc.
|
||||
- Cost of compute hardware to run Predictoors, e.g. on cloud services
|
||||
|
||||
The **[guide to estimate APYs](apys-guide.md)** drills deeper into estimating APYs.
|
||||
|
||||
|
||||
----
|
||||
|
||||
_Next: [APYs Guide](apys-guide.md)_
|
||||
|
||||
_Back: [Reward Schedule](reward-schedule.md)_
|
@ -1,41 +0,0 @@
|
||||
---
|
||||
description: Unbox your OCEAN rewards
|
||||
---
|
||||
|
||||
# Claim Rewards in DF
|
||||
|
||||
<figure><img src="../.gitbook/assets/gif/underwater-treasure.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**This page describes how to claim DF rewards.** (Predictoor DF is an exception, [see here](predictoordf-guide.md).)
|
||||
|
||||
To claim rewards, go to DF webapp's **[Rewards page](https://df.oceandao.org/rewards)** and click "Claim OCEAN rewards" button.
|
||||
|
||||
Detailed instructions are below.
|
||||
|
||||
### Step 1 - Navigate to the Data Farming Rewards page
|
||||
|
||||
Go to [https://df.oceandao.org/](https://df.oceandao.org), and click the Rewards [link](https://df.oceandao.org/rewards) at the top of the page.
|
||||
|
||||
<figure><img src="../.gitbook/assets/data-farming/Rewards-Tab.png" alt=""><figcaption><p>Click the Rewards link at the top of the page</p></figcaption></figure>
|
||||
|
||||
### Step 2 - Click the pink 'Claim # OCEAN' buttons 🛎️
|
||||
|
||||
At the bottom of the 'Passive Rewards' and 'Active Rewards' panels are the 'Claim # OCEAN' buttons that appear pink and clickable on Thursdays.
|
||||
|
||||
This is where you click to claim your rewards! Easy peasy. You will need to approve the transactions with your wallet.
|
||||
|
||||
<figure><img src="../.gitbook/assets/data-farming/claim-rewards.png" alt=""><figcaption><p>Click the pink Claim # Ocean buttons</p></figcaption></figure>
|
||||
|
||||
### First time claiming?
|
||||
|
||||
You will need to wait at least one week, but not more than two weeks to claim your rewards for the first time. Check back on Thursday!
|
||||
|
||||
### Forgot to claim?
|
||||
|
||||
If you forget to claim your OCEAN rewards, then do not worry because they continue to accumulate! It's all fine. You can claim them anytime after Thursday. 😃
|
||||
|
||||
----
|
||||
|
||||
_Next: [Reward Schedule](reward-schedule.md)_
|
||||
|
||||
_Back: [Predictoor DF Guide](predictoordf-guide.md)_
|
@ -1,50 +0,0 @@
|
||||
---
|
||||
description: >-
|
||||
Give another wallet power to allocate veOCEAN
|
||||
---
|
||||
|
||||
# Delegation in Volume DF
|
||||
|
||||
<figure><img src="../.gitbook/assets/gif/underwater-buddy-peewee.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
## About Delegation
|
||||
|
||||
Delegation is a tool for Volume DF.
|
||||
|
||||
**[Here's the delegation page](https://df.oceandao.org/delegate) in the DF webapp.**
|
||||
|
||||
## Why Delegate?
|
||||
|
||||
Consider these challenges:
|
||||
- Your veOCEAN is on a hardware wallet and you want a "hot" software wallet to auto-delegate based on data consume volume, to increase APY
|
||||
- You have >1 wallets and it's a pain to switch among them for delegating
|
||||
|
||||
Delegation solves that. "To delegate" means "to transfer veOCEAN Allocation Power to another wallet address" for a limited period.
|
||||
|
||||
When you delegate, you delegate 100% of your veOCEAN Allocation power.
|
||||
|
||||
{% hint style="info" %}
|
||||
If you delegate 100% of your Allocation Power, your allocations will not count until the delegation expires. The delegation expiration date is the same as your veOCEAN Lock End Date at the time of delegation. If necessary, you can extend your Lock End Date before delegating. You can also cancel your delegation at any time 💪.
|
||||
|
||||
Once delegated, rewards will be sent to the wallet address you delegated to. Then, the delegation receiver is in charge of your active rewards and is responsible for returning those back to you should you choose to do so.
|
||||
|
||||
{% endhint %}
|
||||
|
||||
|
||||
### Steps to Delegate
|
||||
|
||||
Follow these steps to delegate your veOCEAN:
|
||||
|
||||
1. Go to the [Data Farming dApp](https://df.oceandao.org).
|
||||
2. Navigate to the [Delegate page](https://df.oceandao.org/delegate).
|
||||
3. In the 'Receiver wallet address' field, enter the wallet address you wish to delegate to
|
||||
4. Click the 'Delegate' button, and sign the transaction with your wallet.
|
||||
5. (Optional) Cancel the delegation to regain your allocation power before the delegation expires.
|
||||
|
||||
### What if someone delegates to you?
|
||||
|
||||
If you receive veOCEAN allocation power from other wallets, then you will receive their active rewards.
|
||||
|
||||
You _cannot_ re-delegate this veOCEAN further downstream. 
|
||||
|
||||
<figure><img src="../.gitbook/assets/data-farming/veOCEAN-Delegation.png" alt=""><figcaption></figcaption></figure>
|
@ -1,295 +0,0 @@
|
||||
---
|
||||
title: Data Farming FAQ
|
||||
description: Frequently Asked Questions about Data Farming
|
||||
---
|
||||
## Data Farming FAQ
|
||||
|
||||
### Staking and Risk
|
||||
|
||||
<details>
|
||||
|
||||
<summary>What does "staking" mean in an Ocean context?</summary>
|
||||
|
||||
Its precise meaning depends on the DF stream.
|
||||
|
||||
- Passive DF: stake OCEAN = lock OCEAN into veOCEAN
|
||||
- Volume DF: stake OCEAN on asset = allocate veOCEAN towards an asset
|
||||
- Challenge DF: (there is no staking)
|
||||
- Predictoor DF: put OCEAN into a prediction transaction
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Are there any risks associated with DF?</summary>
|
||||
|
||||
As with any system, inherent risks exist. We try to minimize them, as follows.
|
||||
|
||||
- Passive DF: uses veCRV contracts which have been battle-tested in high volume since 2020.
|
||||
- Volume DF: doesn't change veOCEAN behavior. Rather, separate contracts "see" the veOCEAN staked to compute amount of rewards.
|
||||
- Challenge DF: no funds at risk
|
||||
- Predictoor DF: you stake a small amount of OCEAN in each epoch (eg every 5min). If issues arise, you can get out quickly.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Is there any impermanent loss (IL) in my staking?</summary>
|
||||
|
||||
No. IL is typically associated with providing liquidity to decentralized exchange or pools. There are no pools involved in any of the DF streams [1].
|
||||
</details>
|
||||
|
||||
|
||||
### Rewards Payout
|
||||
|
||||
<details>
|
||||
|
||||
<summary>What APYs can I expect?</summary>
|
||||
|
||||
Historically, annual percentage yields (APYs) are 5-15%. See [APY docs](apys.md) for details.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>When I claim my OCEAN, do I need to restake them manually, or are they auto-compounded?</summary>
|
||||
|
||||
They are not auto-compounded.
|
||||
|
||||
They can be claimed/redeposited whenever you want. If you don't claim, they just stack up. There is no loss.
|
||||
|
||||
The [APY docs](apys.md) provide formulae on compounding vs. not.
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Are rewards paid out in veOCEAN or OCEAN?</summary>
|
||||
|
||||
All rewards in Data Farming are paid out in OCEAN and can be claimed at the every epoch.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Can the DF rewards change during a given week?</summary>
|
||||
|
||||
No. At the beginning of a new DF round, rules are laid out, either implicitly if no change from the previous round, or explicitly in a blog post if there are new rules.
|
||||
|
||||
Caveat: it’s "no" at least in theory! Sometimes there may be tweaks if there is community consensus or a bug.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>I locked 10,000 OCEAN but only received 0.1 OCEAN as a reward. What gives? </summary>
|
||||
|
||||
If you've locked 10,000 OCEAN for a short period, it's possible to see a near-0% APY.
|
||||
|
||||
To boost your APY, consider locking your OCEAN for a more extended period. It's not only about the amount you lock but also **the duration of the lock that matters most**. Longer lock periods yield more significant results.
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
<details>
|
||||
|
||||
<Summary>I locked my OCEAN for veOCEAN but can't see the rewards. What am I missing?</Summary>
|
||||
|
||||
Please hang in there and stay patient, as it can take almost two weeks to receive your first reward. 😊
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>High gas fields hurt my yield! What is the best time to avoid high gas fees?</summary>
|
||||
|
||||
When gas is cheap. [Here](https://www.useweb3.xyz/gas) is data on gas prices.
|
||||
|
||||
Also, remember that you don't need to claim rewards and re-stake every week. You could do it less frequently to avoid gas fees. (Balance this with the benefits of compounding.)
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Where do I learn more about the OCEAN reward schedule?</summary>
|
||||
|
||||
In its [docs page](reward-schedule.md).
|
||||
</details>
|
||||
|
||||
|
||||
### Passive DF (and veOCEAN)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>How much OCEAN do I need to lock to earn yield?</summary>
|
||||
|
||||
There is no minimum amount. The rewards will depend on the amount you lock.
|
||||
|
||||
You will get passive rewards by default when you lock OCEAN. And you can get Volume DF rewards if you allocate veOCEAN to data assets.
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
<details>
|
||||
|
||||
<summary>If I lock my OCEAN for 6 months and the price of OCEAN goes up during that time, will my staked tokens increase in value as well?</summary>
|
||||
|
||||
Yes. When you stake OCEAN, you'll receive them back at the end of the lock-up period. If the value increases during this time, your OCEAN will appreciate in worth. The same principle applies in reverse if the value decreases
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>What's the amount of veOCEAN one can get for locking 1 OCEAN?</summary>
|
||||
|
||||
1 veOCEAN if you lock for 4 years.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>If I withdraw before the unlock date, what happens to my veOCEAN and rewards?</summary>
|
||||
|
||||
You can't withdraw before the unlock date.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Is there a way to transform veOCEAN to OCEAN gradually over the lock period?</summary>
|
||||
|
||||
No, you can't convert your veOCEAN to OCEAN during the lock period. When the lock period concludes, you gain access to all your locked OCEAN.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Is it possible to only participate in Passive Rewards?</summary>
|
||||
|
||||
Yes.
|
||||
|
||||
And, you participate by default in Passive Rewards when you lock OCEAN.
|
||||
|
||||
But to maximize your rewards, you will also need to engage in the other streams.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Where do I learn more about veOCEAN & Passive DF?</summary>
|
||||
|
||||
In its [docs page](passivedf.md).
|
||||
</details>
|
||||
|
||||
|
||||
### Volume DF
|
||||
|
||||
<details>
|
||||
|
||||
<summary>What data assets are eligible for Volume DF?</summary>
|
||||
|
||||
The data asset may be of any type — data feed, API, file, etc. dataset (for static URIs), algorithm for Compute-to-Data, or any other Datatoken token-gated system. The data asset may be fixed price or free price.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Do I only receive Volume DF rewards if the datasets I've staked on have DCV?</summary>
|
||||
|
||||
Yes, correct.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>How do I analyze projects and decide where to allocate? Do I look at current and past APYs, or is there more to consider? </summary>
|
||||
|
||||
Curators can select datasets to stake on based on previous DCV, publisher reputation, and more.
|
||||
|
||||
You can see DCV stats in the DF webapp's [Volume DF page](https://df.oceandao.org/volume-df).
|
||||
|
||||
Finally, Predictoor data feeds are promising, since they have good baseline volume due to Predictoor DF.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>The datatoken price may change throughout the week. What price is taken in the DCV calculation?</summary>
|
||||
|
||||
The price is taken at the same time as each consume. E.g. if a data asset has three consumes, where the price was 1 OCEAN when the first consume happened, and the price was 10 OCEAN when the other consumes happened, then the total DCV for the asset is 1 + 10 + 10 = 21.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>How long does it take for the system to update round allocations for veOCEAN?</summary>
|
||||
|
||||
Allocations happen instantly.
|
||||
|
||||
However, your voting power is counted progressively throughout the week and requires you to keep your veOCEAn allocated on datasets for it to work.
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Where do I learn more about Volume DF?</summary>
|
||||
|
||||
In its [docs page](volumedf.md).
|
||||
</details>
|
||||
|
||||
### Challenge DF
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Where do I learn more about Challenge DF?</summary>
|
||||
|
||||
In its [docs page](challengedf.md).
|
||||
</details>
|
||||
|
||||
### Predictoor DF
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Where do I learn more about Predictoor DF?</summary>
|
||||
|
||||
In its [docs page](predictoordf.md).
|
||||
</details>
|
||||
|
||||
|
||||
### Parameters & Stats
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Where can I find the veOCEAN and DF contracts?</summary>
|
||||
|
||||
They are deployed on the Ethereum mainnet, alongside other Ocean contract deployments. [Here](https://github.com/oceanprotocol/contracts/blob/main/addresses/address.json) is the full list of contract deployments.
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
<details>
|
||||
|
||||
<summary>What % of OCEAN is currently locked?</summary>
|
||||
|
||||
[autobotocean.com](https://autobotocean.com/veOcean) has those stats, and more.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>What is the official veOCEAN epoch start_time?</summary>
|
||||
|
||||
veFeeDistributor has a start\_time of 1663804800 (Thu Sep 22 2022 00:00:00).
|
||||
|
||||
</details>
|
||||
|
||||
## Notes
|
||||
|
||||
[1] The initial version of Data Farming - in DF Alpha phase (DF1-DF4) - _did_ involve providing liquidity to datatoken pools, and therefore did incur risk of Impermanent Loss (IL). For this reason and others, we moved away from pools, to veOCEAN for the DF/VE Alpha phase and beyond (>=DF5). Therefore there has been no IL risk since then. [Here are details](https://blog.oceanprotocol.com/veocean-is-launching-data-farming-is-resuming-abed779211e3).
|
||||
|
||||
----
|
||||
|
||||
Congrats! You've completed reading Data Farming docs.
|
||||
|
||||
_Next: Jump to [Docs main](../README.md) and click on your interest._
|
||||
|
||||
_Back: [APYs Guide](apys-guide.md)_
|
@ -1,65 +0,0 @@
|
||||
---
|
||||
description:
|
||||
---
|
||||
|
||||
<figure><img src="../.gitbook/assets/gif/love-ice-melting.gif" width=25% alt=""><figcaption><p></p></figcaption></figure>
|
||||
|
||||
|
||||
# Liquid Staking
|
||||
|
||||
This page is about liquid staking of veOCEAN using psdnOCEAN.
|
||||
|
||||
### Background & Motivation
|
||||
|
||||
Once you lock OCEAN, you get veOCEAN.
|
||||
|
||||
Unlike OCEAN, veOCEAN cannot be traded or transferred. This is by design, to reconcile near-term and long-term incentives. Commit to holding OCEAN longer, and you earn more in the near term.
|
||||
|
||||
But what if there _was_ a way to have lots of locked OCEAN, yet get tradeability? That's the idea of "liquid staking". In many ways, it's the best of both worlds.
|
||||
|
||||
### Liquid Staking in Ocean
|
||||
|
||||
**psdnOCEAN is a "liquid staking wrapper" for veOCEAN:**
|
||||
- It holds veOCEAN
|
||||
- And it allows transfers (using ERC20 interface)
|
||||
|
||||
psdnOCEAN is a product by [H2O](https://www.h2odata.xyz//), a team separate from - and collaborating with - the Ocean core team.
|
||||
|
||||
While you can't trade veOCEAN, **you can trade psdnOCEAN.**
|
||||
|
||||
### How to get OCEAN -> psdnOCEAN
|
||||
|
||||
You can lock OCEAN for psdnOCEAN via [the H2O "convert" dapp](https://liquid-staking.h2odata.xyz/convert/ocean).
|
||||
|
||||
|
||||
### How to get psdnOCEAN -> OCEAN
|
||||
|
||||
psdnOCEAN can be traded in exchanges, for both psdnOCEAN -> OCEAN, and vice versa.
|
||||
|
||||
The main exchange option is the [OCEAN-psdnOCEAN Balancer pool](https://app.balancer.fi/#/ethereum/swap?outputCurrency=0x51Fa2efd62ee56a493f24AE963eAce7D0051929E).
|
||||
- [Here are pool details.](https://app.balancer.fi/#/ethereum/pool/0xf8c4cd95c7496cb7c8d97202cf7e5b8da2204c2b00020000000000000000039e).
|
||||
|
||||
⚠️Be careful - if liquidity is low you will experience high slippage.
|
||||
|
||||
### Rewards to psdnOCEAN holders
|
||||
|
||||
Since psdnOCEAN holds veOCEAN, then Passive DF rewards go to that psdnOCEAN-held veOCEAN according to the usual Passive DF rules.
|
||||
|
||||
Over time, psdnOCEAN may also get rewards from other DF streams or protocols too.
|
||||
|
||||
### psdnOCEAN Resources
|
||||
|
||||
[Here's](https://blog.oceanprotocol.com/psdnocean-the-first-liquid-staking-wrapper-by-the-h2o-team-is-now-live-a3330e15fa5c) the original psdnOCEAN announcement.
|
||||
|
||||
psdnOCEAN contract & token info can be found at:
|
||||
- [Etherscan](https://etherscan.io/token/0x51fa2efd62ee56a493f24ae963eace7d0051929e)
|
||||
- [CoinGecko](https://www.coingecko.com/en/coins/poseidon-ocean)
|
||||
- [GeckoTerminal](https://www.geckoterminal.com/eth/pools/0xf8c4cd95c7496cb7c8d97202cf7e5b8da2204c2b)
|
||||
|
||||
|
||||
----
|
||||
|
||||
_Next: [Volume DF](volumedf.md)_
|
||||
|
||||
_Back: [Passive DF Guide](passivedf-guide.md)_
|
||||
|
@ -1,59 +0,0 @@
|
||||
---
|
||||
description: >-
|
||||
Get veOCEAN to use the Data Farming dApp and make yield!
|
||||
---
|
||||
|
||||
# Guide to Passive DF
|
||||
|
||||
<figure><img src="../.gitbook/assets/gif/aquaman-gold.gif" alt="" width="250"><figcaption><p>Get your gold. Get your veOCEAN.</p></figcaption></figure>
|
||||
|
||||
In order to **get yield in DF**, you will need to lock your OCEAN first! When you lock your OCEAN, you get **veOCEAN** and **weekly passive OCEAN rewards** in return. veOCEAN is a token used in Ocean Protocol's Data Farming dApp to **generate even more yield,** called **Volume DF rewards**, for allocating your veOCEAN to your favorite assets and get a portion of their sales!
|
||||
|
||||
### Don't have OCEAN yet? Get those first!
|
||||
|
||||
#### Step 1 - Get OCEAN
|
||||
|
||||
- Acquire OCEAN via a decentralized exchange (DEX) such as Uniswap or a centralized exchange (CEX) such as Binance, Coinbase, etc.
|
||||
|
||||
#### Step 2 - Send to your self-custody wallet
|
||||
|
||||
- Send your OCEAN to a self-custody wallet of yours that supports ERC-20 tokens, like Metamask for example.
|
||||
|
||||
### Where the rubber meets the road 🚗💨
|
||||
|
||||
Not much of a reader? Watch and learn, friend
|
||||
|
||||
{% embed url="https://www.youtube.com/watch?v=zAQlPHkK3og" fullWidth="false" %}
|
||||
Watch and learn, friend
|
||||
{% endembed %}
|
||||
|
||||
#### Step 3 - Go to Ocean Protocol's Data Farming dApp
|
||||
|
||||
- Go to [https://df.oceandao.org/](https://df.oceandao.org/)
|
||||
|
||||
#### Step 4 - Connect Your Wallet + Lock your OCEAN for veOCEAN
|
||||
|
||||
- Click on the purple circles in the interactive demo to walk through the steps for locking your OCEAN for veOCEAN.
|
||||
|
||||
{% embed url="https://app.arcade.software/share/FUSkygksSRsJHwle1zFs" fullWidth="false" %}
|
||||
{% endembed %}
|
||||
|
||||
In this step you will:
|
||||
|
||||
- Enter the amount of OCEAN that you are going to lock up
|
||||
- Select a Lock End Date indicating how many weeks you’re going to lock up your OCEAN. (As the Lock End Date goes farther into the future, your Lock Multiplier increases).
|
||||
- Click on the checkbox to agree to the disclaimer.
|
||||
- Click the pink “Approve # OCEAN” button
|
||||
- Accept the transaction in your wallet.
|
||||
- Click the “Create Lock” button.
|
||||
- Accept the transaction in your wallet.
|
||||
|
||||
Congratulations! You have now locked your OCEAN for veOCEAN and are generating passive yield automatically. You can [claim your passive OCEAN rewards](claim-rewards.md) every Thursday - note that your first time claiming rewards will require at least one week, but not more than 2 weeks of wait!
|
||||
|
||||
|
||||
----
|
||||
|
||||
_Next: [Liquid Staking](liquid-staking.md)_
|
||||
|
||||
_Back: [Passive DF (and veOCEAN)](passivedf.md)_
|
||||
|
@ -1,109 +0,0 @@
|
||||
---
|
||||
description: >-
|
||||
Earn passively by locking veOCEAN for OCEAN
|
||||
---
|
||||
|
||||
# Passive Data Farming (and veOCEAN)
|
||||
|
||||
<figure><img src="../.gitbook/assets/gif/aquaman-fade.gif" alt=""><figcaption><p>I've got veOCEAN, my work is done.</p></figcaption></figure>
|
||||
|
||||
**This page** is about Passive DF, and veOCEAN. There's also a [user guide page](passivedf-guide.md), and a [page for liquid staking](liquid-staking.md).
|
||||
|
||||
# About veOCEAN and Passive DF
|
||||
|
||||
Here, Data Farmers earn OCEAN rewards by locking their OCEAN for veOCEAN for a period of time. That's it! It's low effort, ie passive.
|
||||
|
||||
veOCEAN is non-transferable. You can’t sell it or send it to other addresses.
|
||||
|
||||
**Yield** is gross income minus costs, divided by OCEAN locked up.
|
||||
- **Gross income** comes from passive DF rewards. This in turn depends on how much veOCEAN you hold compared to others. veOCEAN depends on:
|
||||
- how much OCEAN you've locked. More OCEAN -> more rewards.
|
||||
- how long you've locked it for. Longer lock -> more rewards. 4 years for max rewards.
|
||||
- how recently you've refreshed your locked OCEAN. More recent -> more rewards.
|
||||
- **Costs** are gas fees for transactions (txs) on Ethereum mainnet (where veOCEAN runs).
|
||||
- In Passive DF, txs include: locking OCEAN, claiming rewards, and withdrawing rewards.
|
||||
- Costs should not be under-estimated. If you lock a small amount of OCEAN for a short time, costs may exceed your gross income.
|
||||
- To compound returns, these txs need to be repeated. The ideal frequency to compound rate is whatever maximizes your yield - which depends on how much OCEAN you've locked, tx fees, etc.
|
||||
|
||||
**APY** is "Annual Percent Yield". Where the [DF app](https://df.oceandao.org) shows APYs, these values are calculated assuming an initial 4-year lock up period with a weekly schedule of compounding rewards into an updated 4-year lock. This estimate works provided current: number of users, reward emissions, and other reward parameters stay constant while excluding all tx fees. See the [APYs](apys.md) page to understand APYs better.
|
||||
|
||||
The rest of this page has details.
|
||||
|
||||
### veOCEAN Time Locking
|
||||
|
||||
The longer you lock OCEAN for, the more veOCEAN you get. You can lock OCEAN for as short as two weeks, and as long as four years. (On the DF dapp [veOCEAN page](https://df.oceandao.org/veocean), "Lock Multiplier" represents the percentage amount of veOCEAN received per OCEAN locked.)
|
||||
|
||||
| Years | Lock Multiplier | veOCEAN |
|
||||
| ---- | --------------- | ------- |
|
||||
| 1 | 0.25x | 0.25 |
|
||||
| 2 | 0.50x | 0.50 |
|
||||
| 3 | 0.75x | 0.75 |
|
||||
| 4 | 1.00x | 1.00 |
|
||||
|
||||
veOCEAN cannot be transferred or sold.
|
||||
|
||||
At the end of your 4 years, your OCEAN is unlocked. **You will not be able to retrieve your locked OCEAN until the Lock End Date you selected on the dApp!**
|
||||
|
||||
After the Lock End Date, then you can withdraw your principal OCEAN on the [veOCEAN page](https://df.oceandao.org/veocean) on the left side panel.
|
||||
|
||||
### Linear Decay
|
||||
|
||||
Your veOCEAN balance will slowly start declining as soon as you receive it.
|
||||
|
||||
veOCEAN balance decreases linearly over time until the Lock End Date. For example, when your lock time has lapsed by 50%, you will have 50% of your original veOCEAN balance.
|
||||
|
||||
When your lock time ends your veOCEAN balance will hit 0, and your OCEAN can be withdrawn.
|
||||
|
||||
If you lock 1.0 OCEAN for 4 years, you get 1.0 veOCEAN at the start.
|
||||
|
||||
| Years Passed | veOCEAN Left |
|
||||
| ------------ | ------------ |
|
||||
| 1 year | 0.75 |
|
||||
| 2 years | 0.50 |
|
||||
| 3 years | 0.25 |
|
||||
| 4 years | 0.00 |
|
||||
|
||||
You can’t lose your OCEAN through Impermanent Loss (IL). It is merely locked.
|
||||
|
||||
### Replenishing veOCEAN
|
||||
|
||||
To achieve optimal APY, you would want to periodically update your 4-year lock back to 4 years, where there is no veOCEAN decay.
|
||||
|
||||
You can also add more OCEAN to your vault when updating an existing vault.
|
||||
|
||||
### Passive DF Reward Distrubtion
|
||||
|
||||
Passive DF rewards are claimable on the Ethereum mainnet.
|
||||
|
||||
DF rounds are weekly. In line with this, there’s a [`ve`](https://github.com/oceanprotocol/df-py/tree/main/contracts/ve) distribution “epoch” every week. This affects when you can first claim rewards. Specifically, if you lock OCEAN on day x, you’ll be able to claim rewards on the first ve epoch that begins after day x+7.
|
||||
|
||||
Put another way, from the time you lock OCEAN, you must wait at least a week, and up to two weeks, to be able to claim rewards. (This behavior is inherited from veCRV. Here’s the [code](https://github.com/oceanprotocol/df-py/tree/main/contracts/ve)).
|
||||
|
||||
|
||||
### Flow of Value
|
||||
|
||||
The image below illustrates the flow of value. On the left, at time 0, the staker locks their OCEAN into the veOCEAN contract, and receives veOCEAN. In the middle, the staker receives OCEAN rewards every time there’s revenue to the Ocean Protocol Community (top), and also as part of Data Farming rewards (bottom). On the right, when the lock expires (e.g. 4 years) then the staker is able to move their OCEAN around again.
|
||||
|
||||
<figure><img src="../.gitbook/assets/data-farming/flow_of_value.png" alt=""><figcaption><p>Flow of Value</p></figcaption></figure>
|
||||
|
||||
### Background of veOCEAN Idea
|
||||
|
||||
It's been a long-held goal to reconcile near-term and long-term incentives. This is not an easy task.
|
||||
|
||||
Curve Finance's [veCRV](https://curve.readthedocs.io/dao-fees.html) was one of the first to do a great job at this, and have high usage and liquidity. So, [veOCEAN contracts](https://github.com/oceanprotocol/contracts/tree/main/contracts/ve) use veCRV code.
|
||||
|
||||
### veOCEAN Contract Security
|
||||
|
||||
veOCEAN core contracts have zero changes to veCRV code, on purpose: the veCRV contracts have been battle-tested since inception (2020). Nearly 500 million USD is locked across all forks of veCRV, with the leading DeFi protocols adopting this standard. veCRV contracts [have been audited by Trail of Bits and Quantstamp](https://github.com/curvefi/curve-dao-contracts#audits-and-security).
|
||||
|
||||
We have built [a new contract](https://github.com/oceanprotocol/contracts/blob/main/contracts/ve/veAllocate.sol) for users to allocate their veOCEAN towards data assets. These new contracts do not control the veOCEAN core contracts at all. In the event of a breach, the only funds at risk would be the rewards distributed for a single week; and we would be able to redirect future funds to a different contract.
|
||||
|
||||
We have an [ongoing bug bounty via Immunefi](https://immunefi.com/bounty/oceanprotocol/) for Ocean software, including veOCEAN and DF components. If you identify an issue, please report it there and get rewarded.
|
||||
|
||||
|
||||
----
|
||||
|
||||
_Next: [Guide to Passive DF](passivedf-guide.md)_
|
||||
|
||||
_Back: [DF Main](README.md)_
|
||||
|
@ -1,34 +0,0 @@
|
||||
---
|
||||
description: >-
|
||||
How to earn $ via predictoor DF
|
||||
---
|
||||
|
||||
# Guide to Predictoor DF
|
||||
|
||||
<figure><img src="../.gitbook/assets/gif/money-robot.gif" alt=""></figure>
|
||||
|
||||
In Predictoor DF (and Predictoor proper), you run prediction bots to earn continuously. This guide describes how to become eligible for OCEAN rewards and claim them; and the same for Oasis ROSE rewards. And of course first thing you need to do is become a predictoor.
|
||||
|
||||
## How to become a predictoor
|
||||
|
||||
- Play with the dapp: http://predictoor.ai
|
||||
- Then follow [Predictoor usage guide](../predictoor/pdr-earn.md)
|
||||
- Or, go straight to the [quickstart README](https://github.com/oceanprotocol/pdr-backend/blob/main/READMEs/predictoor.md) :) 🏎️
|
||||
|
||||
## On OCEAN Rewards in Predictoor DF
|
||||
|
||||
- **Duration:** ongoing
|
||||
- **To be eligible:** predictoors are automatically eligible 🧘
|
||||
- **To claim:** recall that the OCEAN rewards act as more sales coming to you (as a predictoor). So you claim your OCEAN from sales in the usual way, by running the OCEAN payout script. See the [payout README](https://github.com/oceanprotocol/pdr-backend/blob/main/READMEs/payout.md) for specific instructions.
|
||||
|
||||
|
||||
## On ROSE rewards in Predictoor DF
|
||||
|
||||
- ⚠️ **To be eligible** for a given DF round: you MUST run [OCEAN payout script](https://github.com/oceanprotocol/pdr-backend/blob/main/READMEs/payout.md) <= 4 days after the round ends, i.e. between Thu 00:00 UTC & Sun 11:59 PM UTC
|
||||
- **To claim:** See the [payout README](https://github.com/oceanprotocol/pdr-backend/blob/main/READMEs/payout.md) for specific instructions.
|
||||
|
||||
----
|
||||
|
||||
_Next: [Claim Rewards](claim-rewards.md)_
|
||||
|
||||
_Back: [Predictoor DF](predictoordf.md)_
|
@ -1,98 +0,0 @@
|
||||
---
|
||||
description: >-
|
||||
Baseline sales for predictoors
|
||||
---
|
||||
|
||||
<figure><img src="../.gitbook/assets/data-farming/predictoordf_main.png" alt=""></figure>
|
||||
|
||||
**This page** is about Predictoor DF, and [this page](predictoordf-guide.md) is a guide.
|
||||
|
||||
# Predictoor DF Overview
|
||||
|
||||
**Predictoor DF** is a substream of Active DF that amplifies predictoors’ earnings, via extra sales to Ocean Predictoor data feeds.
|
||||
|
||||
Predictoor DF has 37,500 OCEAN weekly rewards (ongoing) and 20,000 ROSE weekly rewards (throughout 2024).
|
||||
|
||||
The higher baseline sales makes Volume DF and Passive DF more attractive.
|
||||
|
||||
## Introduction
|
||||
|
||||
**[Ocean Predictoor](../predictoor/README.md)** data feeds predict whether BTC, ETH etc will rise or fall 5min or 1h into the future. These feeds are crowdsourced by “predictoors”: people running AI-powered prediction bots.
|
||||
|
||||
**[Data Farming (DF)](../data-farming/README.md)** is Ocean’s incentive program, that rewards OCEAN to people who lock OCEAN or do active DF activities.
|
||||
|
||||
You should be familiar with both Predictoor and DF before reading on.
|
||||
|
||||
**Predictoor Data Farming is a substream of Active DF. It amplifies existing predictoors’ earnings based on their accuracy and stake.**
|
||||
|
||||
## Predictoor DF Timing
|
||||
|
||||
Predictoor DF starts counting on Nov 9, 23, at the beginning of Data Farming Round 63 (DF63). It runs indefinitely.
|
||||
|
||||
## Predictoor DF Rewards
|
||||
|
||||
Predictoor DF has two components: [OCEAN](https://oceanprotocol.com/about-us/ocean-token) rewards and [Oasis ROSE](https://www.coingecko.com/en/coins/oasis-network) rewards.
|
||||
|
||||
### OCEAN Rewards
|
||||
|
||||
- A special “DF buyer” bot purchases Predictoor feeds. It started operating on Nov 9, 2023. Every day, it spends 1/7 of the weekly Predictoor OCEAN budget for another 24h subscription. It spends an equal amount per feed. (Currently there are feeds: 10 x 5min, 10 x 1h.)
|
||||
- The OCEAN comes from the Ocean DF budget, and specifically, the Active DF budget.
|
||||
|
||||
### ROSE Rewards
|
||||
|
||||
- Payout happens on Mondays, 4 days after the end of the DF round.
|
||||
- ⚠️ To be counted for ROSE rewards of a given DF round, you must claim your OCEAN rewards for that DF round. See [Predictoor DF user guide](predictoordf-guide.md).
|
||||
- Payout for a given predictoor is pro-rata to the net earnings of that predictoor over that DF round, specifically (total sales $ to the predictoor) minus (predictoor stake slashed due to being wrong).
|
||||
- The ROSE comes from a generous contribution of[ Oasis Protocol Foundation](https://oasisprotocol.org/) 👪🙏.
|
||||
|
||||
|
||||
## How to Earn $ Via Predictoor DF
|
||||
|
||||
**Running a predictoor bot will automatically make you eligible for Predictoor DF rewards.**
|
||||
|
||||
The [Predictoor DF user guide](predictoordf-guide.md) tells how to get started as a predictoor, and how to claim rewards.
|
||||
|
||||
## How to Earn More $ Via Passive DF & Volume DF
|
||||
|
||||
Predictoor DF makes [Active DF](../data-farming/volumedf.md) more attractive, and in turn [Passive DF](../data-farming/passivedf.md). You should be familiar with both before reading on.
|
||||
|
||||
**Predictoor DF makes Volume DF more attractive than status quo**, because the volume-based bounds on weekly rewards trends tend to be markedly higher for prediction feeds. (The Appendix has details.)
|
||||
|
||||
**Curating is straightforward.** Ocean assets with high DCV are easy to identify: it's the 20 OPF-published prediction feeds. This makes the choice of veOCEAN allocation easy: point to those 20 assets.
|
||||
|
||||
**Doing Volume DF gives Passive DF rewards too**, of course.
|
||||
|
||||
The net result: Predictoor DF means earnings potential from Predictoor DF, Volume DF, and Passive DF.
|
||||
|
||||
## Appendix: On DCV Bounds of Prediction Feeds
|
||||
|
||||
**Predictoor DF makes Volume DF more attractive than status quo.** Active DF's rewards are bounded by `DCV_bound` which in turn is bound by sales volume and fees. In Predictoor DF, both those factors are raised; this raises the bounds in Volume DF; this in turn means higher earning potential. Let's elaborate.
|
||||
|
||||
At one time, Volume DF had a "wash consume" problem, where people published and consumed their own datasets. [DF9](https://blog.oceanprotocol.com/data-farming-df8-completed-df9-started-reward-function-tuned-d74b5134b5d1) onwards address this, by putting a bounds on weekly rewards:
|
||||
|
||||
> `DCV_bound = DCV * m`
|
||||
|
||||
Where `m` = `DCV_bounding_multiplier` = `Ocean community fee (0.1%) + publish market fee`
|
||||
|
||||
This stopped wash consume 💪 because it became unprofitable to _do_ wash consume: fees eat up all potential profits.
|
||||
|
||||
A low `DCV` (data consume volume) or a low `m` (publish market fee) mean low `DCV_bound`.
|
||||
|
||||
Predictoor DF makes both `DCV` and `m` higher!
|
||||
|
||||
- **`DCV` is higher:** the 37K OCEAN/week counts as consume volume
|
||||
- **`m` is higher:** publish market fee is 20% for prediction feeds
|
||||
|
||||
Therefore `DCV_bound` is higher. Specifically: `DCV_bound = 37500 * (0.001 + 0.20) = 7537.5 OCEAN`. In other words, at least 7537.5 OCEAN is available for Volume DF in any given week.
|
||||
|
||||
## Notes
|
||||
|
||||
The BTC/USDT 5m and 1h feeds follow the same Volume DF mechanics as the other feeds, despite being free on the webapp.
|
||||
|
||||
Details: the BTC feeds _are_ priced at the smart contract level. The webapp receives datatokens for those feeds and makes the prediction values public. Because the BTC feeds _are_ priced, then: their DCV is non-negligible; allocating veOCEAN to them makes sense; and Volume DF rewards accrue to them as well.
|
||||
|
||||
----
|
||||
|
||||
_Next: [Predictoor DF Guide](predictoordf-guide.md)_
|
||||
|
||||
_Back: [Volume DF Guide](volumedf-guide.md)_
|
@ -1,81 +0,0 @@
|
||||
---
|
||||
description: >-
|
||||
Know the OCEAN reward schedule, towards understanding yields
|
||||
---
|
||||
|
||||
# OCEAN Reward Schedule
|
||||
|
||||
<figure><img src="../.gitbook/assets/gif/cash-flow.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
## Overview
|
||||
|
||||
DF proceeds one round at a time. Each round is weekly.
|
||||
|
||||
Rewards are distributed at the end of every week, for the activity of the previous week.
|
||||
|
||||
The reward schedule = the emission schedule, definining the weekly OCEAN budget for DF. DF currently rewards 150K OCEAN per round. Over time, rewards will increase to be as high as 1.1M OCEAN / week, then decay over time Bitcoin-style.
|
||||
|
||||
DF rounds are grouped into four phases: DF Alpha, DF/VE Alpha, DF Beta, and DF Main. We are now in the "DF Main" phase.
|
||||
|
||||
The table below shows OCEAN rewards per round, and corresponding phase.
|
||||
|
||||
<figure><img src="../.gitbook/assets/data-farming/reward_schedule.png" alt=""><figcaption><p><em>Ocean Reward Schedule for the next 20+ years</em></p></figcaption></figure>
|
||||
|
||||
### DF Phases
|
||||
|
||||
Each of the first three phases -- DF Alpha, DF/VE Alpha, and DF Beta phases -- had a fixed value. Each of these ran for 4-20 weeks. The final phase -- DF Main -- runs for decades with a Bitcoin-like emissions-schedule (plus a burn-in-period).
|
||||
|
||||
### Phase: DF Alpha - Rounds 1-4 (4 wks)
|
||||
- 10K OCEAN rewards per week.
|
||||
- Counting started Thu June 16, 2022 and ended July 13, 2022. It ran for 4 weeks. DF was temporarily paused after this, for time to put veOCEAN into place.
|
||||
- The aim was to test technology, learn, and onboard data publishers.
|
||||
|
||||
### Phase: DF/VE Alpha - Rounds 5-8 (4 wks)
|
||||
- 10K OCEAN rewards were per week.
|
||||
- Counting started Thu Sep 29, 2022 and ended Oct 27, 2022. It ran for 4 weeks.
|
||||
- The aim was to resume Data Farming with veOCEAN, test the technology, onboard data publishers, and keep learning.
|
||||
|
||||
### Phase: DF Beta - Rounds 9-28 (20 wks)
|
||||
- Up to 100K OCEAN rewards per week.
|
||||
- Counting started on Oct 27, 2022, ie the day DF/VE Alpha ended. Counting ended on March 15, 2023. It ran for 20 weeks.
|
||||
- The aim was to test the effect of larger incentives, and support ecosystem participation, while continually refining the underlying technology.
|
||||
|
||||
### Phase: DF Main - Rounds 29-1000+
|
||||
- Rewards began at 150K OCEAN per week, and go up to 1.1M OCEAN per week. Total emissions are 503.M OCEAN.
|
||||
- Counting started on March 15, 2023, ie the day DF Beta ended. It runs for decades.
|
||||
- DF Main's schedule mimics Bitcoin including a half-life of 4 years. Unlike Bitcoin, there is a _burn-in period_ to ratchet up value-at-risk versus time. Burn-in is implemented via four sub-phases: DF Main 1, 2, 3 and 4 with multipliers of 10%, 25%, 50%, and 100% respectively.
|
||||
- DF Main 1 emits 150K OCEAN per week. It runs 12 months.
|
||||
- DF Main 2 starts on Mar 14, 2024 (DF80). Rewards go 2x, to 300K OCEAN / week. It runs 6 months.
|
||||
- DF Main 3 starts on Sep 12, 2024 (DF106). Rewards go 2x, to 600K OCEAN / week. It runs 6 months.
|
||||
- DF Main 4 starts on Mar 13, 2025 (DF132). Rewards begin at 1.1M OCEAN / week then halve every four years. It runs for decades.
|
||||
|
||||
## Visualize Emissions: First 5 years
|
||||
|
||||
Let’s visualize emissions!
|
||||
|
||||
The image below shows the first 5 years (including all DF Phases). The y-axis is OCEAN released each week. It’s log-scaled to easily see the differences. The x-axis is time, measured in weeks. In weeks 0–29, we can see the distinct phases for DF Alpha (DF1 // week 0), DF/VE Alpha (DF5 // week 4), DF Beta (DF9 // week 8), DF Main 1 (DF29 // week 28), DF Main 2 (DF80 // week 79), DF Main 3 (DF106 // week 105), and DF Main 4 (DF132 // week 131).
|
||||
|
||||
<figure><img src="../.gitbook/assets/data-farming/emissions_first_5years.png" alt="" width="540"><figcaption><p><em>OCEAN released to DF per week — first 5 years</em></p></figcaption></figure>
|
||||
|
||||
## Visualize Emissions: First 20 years
|
||||
|
||||
The image below is like the previous one: OCEAN released per week. But now, we show for the first 20 years. Week 131 onwards is DF Main 4. We can see that the y-value divides by two (“halvens”) every four years.
|
||||
|
||||
<figure><img src="../.gitbook/assets/data-farming/emissions_first_20years.png" alt="" width="563"><figcaption><p><em>OCEAN released to DF per week — first 20 years</em></p></figcaption></figure>
|
||||
|
||||
## Visualize Total OCEAN released
|
||||
|
||||
The image below shows the total OCEAN released by DF for the first 20 years. The y-axis is log-scaled to capture both the small initial rewards and exponentially larger values later on. The x-axis is also log-scaled so that we can more readily see how the curve converges over time.
|
||||
|
||||
<figure><img src="../.gitbook/assets/data-farming/emissions_lifetime.png" alt="" width="563"><figcaption><p><em>Total OCEAN released to DF — first 20 years</em></p></figcaption></figure>
|
||||
|
||||
## Further resources
|
||||
|
||||
The blog post ["Data Farming Main is here"](https://blog.oceanprotocol.com/ocean-data-farming-main-is-here-49c99602419e) provides further detail yet.
|
||||
|
||||
|
||||
----
|
||||
|
||||
_Next: [APYs](apys.md)_
|
||||
|
||||
_Back: [Claim Rewards](claim-rewards.md)_
|
@ -1,48 +0,0 @@
|
||||
---
|
||||
description: >-
|
||||
Curate datasets in Data Farming and earn
|
||||
---
|
||||
|
||||
# Guide to Volume DF
|
||||
|
||||
<figure><img src="../.gitbook/assets/gif/avatar-pick-whale.gif" alt=""><figcaption>Pick your whale</figcaption></figure>
|
||||
|
||||
In Volume DF, you allocate veOCEAN to data assets with high data consume volume (DCV). You do this via the DF dApp.
|
||||
|
||||
We'll show you how!
|
||||
|
||||
#### Step 1 - Navigate to the DF dApp
|
||||
|
||||
- Go to [https://df.oceandao.org](https://df.oceandao.org)
|
||||
|
||||
#### Step 2 - Connect your wallet
|
||||
|
||||
- Connect your wallet to the dApp, on Ethereum mainnet
|
||||
|
||||
#### Step 3 - Click the Volume DF tab in the top menu
|
||||
|
||||
<figure><img src="../.gitbook/assets/data-farming/volumeDF-page.png" alt=""><figcaption><p>Click the Volume DF page link in the menu</p></figcaption></figure>
|
||||
|
||||
#### Step 4 - Select the assets which you would like to allocate to by toggling the percentage allocation at the end of the row
|
||||
|
||||
- On the rightmost column, toggle the percentage of your total Allocation Power that you wish to allocate to each asset of your choice. You will **get a portion of the sales** of each asset that you allocate to!
|
||||
- Note that if you allocate to an asset that YOU published, then you will get an **effective 2x allocation boost**.
|
||||
- If you are a publisher and curating your own asset, your asset may be styled differently in the UI.
|
||||
|
||||
<figure><img src="../.gitbook/assets/data-farming/allocations.png" alt=""><figcaption><p>Toggle the percentage of your veOCEAN that you would like to allocate to each asset</p></figcaption></figure>
|
||||
|
||||
#### Step 5 - Click the Update Allocations button
|
||||
|
||||
- Click the pink Update Allocations button
|
||||
- Sign the transactions with your wallet & pay the gas fees
|
||||
|
||||
<figure><img src="../.gitbook/assets/data-farming/update-allocations.png" alt=""><figcaption><p>Click the Update Allocations button</p></figcaption></figure>
|
||||
|
||||
That's it! You've successfully allocated (aka "voted on") your favorite assets in the Ocean ecosystem using your veOCEAN and are generating active rewards yield. Now, just wait until next Thursday to see if you can [claim any OCEAN rewards](claim-rewards.md) on the Active Rewards section of the [Rewards page](https://df.oceandao.org/rewards) for your portion of the assets' sales. Remember that your first time claiming rewards will require at least one week, but not more than 2 weeks of wait!
|
||||
|
||||
|
||||
----
|
||||
|
||||
_Next: [Predictoor DF](predictoordf.md)_
|
||||
|
||||
_Back: [Volume DF](volumedf.md)_
|
@ -1,80 +0,0 @@
|
||||
---
|
||||
description: >-
|
||||
Choose your fav data assets, earn more
|
||||
---
|
||||
|
||||
# Volume Data Farming
|
||||
|
||||
<figure><img src="../.gitbook/assets/gif/avatar-plugin.gif" alt=""><figcaption><p>Make your selection and commit. Good things will come.</p></figcaption></figure>
|
||||
|
||||
**This page** is about Volume DF. There's also a [user guide page](volumedf-guide.md) and a [page for delegation](delegate.md).
|
||||
|
||||
# About Volume DF
|
||||
|
||||
We've already covered [Passive DF](passivedf.md), which is a great start to earn from your locked OCEAN (veOCEAN).
|
||||
|
||||
_Volume_ DF lets you can earn more yet, with that same veOCEAN.
|
||||
|
||||
In Volume DF, you allocate veOCEAN to data assets with high data consume volume (DCV). This acts as _data curation_.
|
||||
|
||||
### How to Maximize Volume DF rewards
|
||||
|
||||
Here are tactics:
|
||||
|
||||
- Only allocate to assets that actually qualify for DF. The "Assets that qualify" section below has details.
|
||||
- Allocate to assets with high DCV. Predictoor data feeds are a good bet.
|
||||
- Lock more OCEAN.
|
||||
- Lock OCEAN for longer. For example, a 4-year lock is 4x more reward than 1-year.
|
||||
- Refresh your OCEAN locks often. This is needed since veOCEAN degrades with time.
|
||||
- Frequently claim your OCEAN rewards then lock it. Be careful: too often may make gas fees > OCEAN rewards.
|
||||
- Publish your own assets; you get 2x rewards for such assets. [Here are details](https://blog.oceanprotocol.com/data-farming-publisher-rewards-f2639525e508).
|
||||
|
||||
<br>
|
||||
|
||||
<figure><img src="../.gitbook/assets/gif/hustlin.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
### Delegate veOCEAN
|
||||
|
||||
You can delegate your veOCEAN from one wallet to another. This is handy if you have a hardware wallet holding veOCEAN, and you want a "hot" software wallet to automatically re-allocate more often. There are other uses too.
|
||||
|
||||
[Here's how to delegate](delegate.md).
|
||||
|
||||
### Assets that Qualify for Volume DF
|
||||
|
||||
Data assets that have veOCEAN allocated towards them get Volume DF rewards.
|
||||
|
||||
The asset may be of any type — dataset, data feed, a C2D algorithm, or other. It may be fixed price or free. If fixed price, any token of exchange is alright (OCEAN, H2O, USDC, etc). If free, then gas used for consume is the "volume".
|
||||
|
||||
To qualify for DF, an asset must also:
|
||||
|
||||
* Have been created by Ocean Smart contracts [deployed](https://github.com/oceanprotocol/contracts/blob/main/addresses/address.json) by OPF to [production networks](../discover/networks/README.md)
|
||||
* The asset must be listed on Ocean Market
|
||||
* Can’t be in [purgatory](https://github.com/oceanprotocol/list-purgatory/blob/main/policies/README.md)
|
||||
|
||||
|
||||
### How Rewards are Calculated
|
||||
|
||||
The Reward Function (RF) governs how Volume DF rewards are allocated.
|
||||
|
||||
_Rewards are calculated as follows:_
|
||||
|
||||
1. Distribute OCEAN across each asset **based on rank**: highest-DCV asset gets the most OCEAN, second-highest-DCV gets second-most, etc. [Here are details](https://blog.oceanprotocol.com/data-farming-df22-completed-df23-started-reward-function-tuned-ffd4359657ee).
|
||||
1. For each asset and each veOCEAN holder:
|
||||
1. If the holder is a publisher, 2x the effective allocation
|
||||
1. Baseline rewards = (% allocation in asset) \* (OCEAN for an asset)
|
||||
1. Bound rewards to the asset by 125% APY
|
||||
1. Bound rewards by asset’s `DCV` \* `DCV_multiplier`.
|
||||
|
||||
Step 2.4 is to prevent wash consume. `DCV_multiplier` is a function of fees, with a value of 0.201 for Predictoor feeds, and 0.001 for other data assets.
|
||||
|
||||
The actual code is in [calcrewards.py](https://github.com/oceanprotocol/df-py/blob/main/df_py/volume/calc_rewards.py) in df-py repo.
|
||||
|
||||
When DF restarts each Thursday, the global allocation towards each asset resets back to zero and then starts counting up again until the end of the round. After allocating your veOCEAN to different datasets, it will take time for your voting power to be accounted for.
|
||||
|
||||
|
||||
----
|
||||
|
||||
_Next: [Volume DF Guide](volumedf-guide.md)_
|
||||
|
||||
_Back: [Liquid Staking](liquid-staking.md)_
|
||||
|
@ -6,14 +6,14 @@ description: Remote setup for running & testing ocean.py
|
||||
|
||||
This setup does not use barge and uses a remote chain to do the transactions. When the network URL is specified & configured, ocean.py will use components (such as Provider, Aquarius, C2D) according to the expected blockchain.
|
||||
|
||||
Here, we do setup for Mumbai, the testnet for Polygon. It's similar for other remote chains.
|
||||
Here, we do setup for Sepolia. It's similar for other remote chains.
|
||||
|
||||
Here, we will:
|
||||
|
||||
1. Configure Networks
|
||||
2. Create two accounts - `REMOTE_TEST_PRIVATE_KEY1` and `2`
|
||||
3. Get test MATIC on Mumbai
|
||||
4. Get test OCEAN on Mumbai
|
||||
3. Get test ETH on Sepolia
|
||||
4. Get test OCEAN on Sepolia
|
||||
5. Set envvars
|
||||
6. Set up Alice and Bob wallets in Python
|
||||
|
||||
@ -32,7 +32,7 @@ In order to obtain API keys for blockchain access, follow up [this document](htt
|
||||
|
||||
**If you do have an Infura account**
|
||||
|
||||
Use the full RPC URL including the base and API key, e.g. for mumbai: `https://polygon-mumbai.infura.io/v3/<API-KEY>`
|
||||
Use the full RPC URL including the base and API key, e.g. for sepolia: `https://sepolia.infura.io/v3/<API-KEY>`
|
||||
|
||||
### 2. Create EVM Accounts (One-Time)
|
||||
|
||||
@ -61,35 +61,32 @@ Then, hit Ctrl-C to exit the Python console.
|
||||
|
||||
Now, you have two EVM accounts (address & private key). Save them somewhere safe, like a local file or a password manager.
|
||||
|
||||
These accounts will work on any EVM-based chain: production chains like Eth mainnet and Polygon, and testnets like Goerli and Mumbai. Here, we'll use them for Mumbai.
|
||||
These accounts will work on any EVM-based chain: production chains like Eth mainnet and Polygon, and testnets like Sepolia. Here, we'll use them for Sepolia.
|
||||
|
||||
### 3. Get (test) MATIC on Mumbai
|
||||
### 3. Get (test) ETH on Sepolia
|
||||
|
||||
We need the a network's native token to pay for transactions on the network. [ETH](https://ethereum.org/en/get-eth/) is the native token for Ethereum mainnet; [MATIC](https://polygon.technology/matic-token/) is the native token for Polygon, and [(test) MATIC](https://faucet.polygon.technology/) is the native token for Mumbai.
|
||||
We need the a network's native token to pay for transactions on the network. [ETH](https://ethereum.org/en/get-eth/) is the native token for Ethereum mainnet; [MATIC](https://polygon.technology/matic-token/) is the native token for Polygon, and [(test) ETH](https://www.alchemy.com/faucets/ethereum-sepolia) is the native token for Sepolia.
|
||||
|
||||
To get free (test) MATIC on Mumbai:
|
||||
To get free (test) ETH on Sepolia:
|
||||
|
||||
1. Go to the faucet [https://faucet.polygon.technology/](https://faucet.polygon.technology/). Ensure you've selected "Mumbai" network and "MATIC" token.
|
||||
1. Go to the faucet [https://www.alchemy.com/faucets/ethereum-sepolia](https://www.alchemy.com/faucets/ethereum-sepolia). Login or create an account on Alchemy.
|
||||
2. Request funds for ADDRESS1
|
||||
3. Request funds for ADDRESS2
|
||||
|
||||
You can confirm receiving funds by going to the following url, and seeing your reported MATIC balance: `https://mumbai.polygonscan.com/address/<ADDRESS1 or ADDRESS2>`
|
||||
|
||||
### 4. Get (test) OCEAN on Mumbai
|
||||
### 4. Get (test) OCEAN on Sepolia
|
||||
|
||||
[OCEAN](https://oceanprotocol.com/token) can be used as a data payment token, and locked into veOCEAN for Data Farming / curation. The READMEs show how to use OCEAN in both cases.
|
||||
|
||||
* OCEAN is an ERC20 token with a finite supply, rooted in Ethereum mainnet at address [`0x967da4048cD07aB37855c090aAF366e4ce1b9F48`](https://etherscan.io/token/0x967da4048cD07aB37855c090aAF366e4ce1b9F48).
|
||||
* OCEAN on other production chains derives from the Ethereum mainnet OCEAN. OCEAN on Polygon (mOCEAN) is at [`0x282d8efce846a88b159800bd4130ad77443fa1a1`](https://polygonscan.com/token/0x282d8efce846a88b159800bd4130ad77443fa1a1).
|
||||
* (Test) OCEAN is on each testnet. Test OCEAN on Mumbai is at [`0xd8992Ed72C445c35Cb4A2be468568Ed1079357c8`](https://mumbai.polygonscan.com/token/0xd8992Ed72C445c35Cb4A2be468568Ed1079357c8).
|
||||
* (Test) OCEAN is on each testnet. Test OCEAN on Sepolia is at [`0x1B083D8584dd3e6Ff37d04a6e7e82b5F622f3985`](https://sepolia.etherscan.io/address/0x1B083D8584dd3e6Ff37d04a6e7e82b5F622f3985).
|
||||
|
||||
To get free (test) OCEAN on Mumbai:
|
||||
To get free (test) OCEAN on Sepolia:
|
||||
|
||||
1. Go to the faucet [https://faucet.mumbai.oceanprotocol.com/](https://faucet.mumbai.oceanprotocol.com/)
|
||||
1. Go to the faucet [https://faucet.sepolia.oceanprotocol.com/](https://faucet.sepolia.oceanprotocol.com/)
|
||||
2. Request funds for ADDRESS1
|
||||
3. Request funds for ADDRESS2
|
||||
|
||||
You can confirm receiving funds by going to the following url, and seeing your reported OCEAN balance: `https://mumbai.polygonscan.com/token/0xd8992Ed72C445c35Cb4A2be468568Ed1079357c8?a=<ADDRESS1 or ADDRESS2>`
|
||||
You can confirm receiving funds by going to the following url, and seeing your reported OCEAN balance: `https://sepolia.etherscan.io/address/0x1B083D8584dd3e6Ff37d04a6e7e82b5F622f3985?a=<ADDRESS1 or ADDRESS2>`
|
||||
|
||||
### 5. Set envvars
|
||||
|
||||
|
@ -14,3 +14,4 @@ Hosting a data challenge is a fun way to engage data scientists and machine lear
|
||||
2. Curate the dataset(s) that participants will use for the challenge. The key to hosting a good data challenge is to provide an exciting and through dataset that participants can use to build their solutions. Do your research to understand what data is available, whether it be free from an API, available for download, require any transformations, etc. For the first challenge, it is alright if the created dataset is a static file. However, it is best to ensure there is a path to making the data available from a dynamic endpoint so that entires can eventually be applied to current, real-world use cases.
|
||||
3. Decide how the judging process will occur. This includes how long to make review period, how to score submissions, and how to decide any prizes will be divided among participants
|
||||
4. Work with Ocean Protocol to gather participants for your data challenge. Creating blog posts and hosting Twitter Spaces is a good way to spread the word about your data challenge.
|
||||
5. To submit your application, kindly visit [here](https://docs.google.com/forms/d/e/1FAIpQLSdBcTJepav-6k5PmIGwX5e4gpQgGb_82UxzwvCBhilVc59bXQ/viewform), and for more information, head over to this [page](https://oceanprotocol.com/earn/data-challenges/).
|
||||
|
@ -64,7 +64,7 @@ We analyzed dozens of possible verticals with according to these criteria. For a
|
||||
|
||||
Here are some examples.
|
||||
|
||||
- **Small $, slow**. Traditional music is small $ and slow, because incumbents like Universal dominate by controlling the the back catalogue.
|
||||
- **Small $, slow**. Traditional music is small $ and slow, because incumbents like Universal dominate by controlling the back catalogue.
|
||||
- **Large $, slow**. Medicine is large $ but slow, due to the approval process.
|
||||
Small $, fast. Decentralized music is fast but small $ (for now! Fingers crossed).
|
||||
|
||||
|
@ -10,7 +10,7 @@ coverY: 0
|
||||
|
||||
1. **Token-gated dApps & REST APIs**: monetize by making your dApp or its REST API token-gated. [Here's how](https://github.com/oceanprotocol/token-gating-template).
|
||||
1. **AI dApps**: monetize your AI dApp by token-gating on AI training data, feature vectors, models, or predictions.
|
||||
1. **Data Markets**: build a decentralized [data market](../developers/build-a-marketplace/README.md).
|
||||
1. **Data Markets**: build a decentralized data market. [Here's how](https://github.com/oceanprotocol/market)
|
||||
1. **Private user profile data**: storing user profile data on your centralized server exposes you to liability. Instead, have it on-chain encrypted by the user's wallet, and just-in-time decrypt for the app. [Video](https://www.youtube.com/watch?v=xTfI8spLq1k&ab_channel=ParticleNetwork), [slides](https://docs.google.com/presentation/d/1_lkDVUkA0Rx1R7RpkaSeLkX3PeOBoMQyRhvxjwTvd6A/edit?usp=sharing).
|
||||
|
||||
Example live dapps:
|
||||
|
@ -41,7 +41,7 @@ Additionally, in supporting the discovery process, middleware components come in
|
||||
|
||||
Here, the ocean comes alive with a vibrant ecosystem of dApps, marketplaces, and more. This layer hosts a variety of user-friendly interfaces, applications, and tools, inviting data scientists and curious explorers alike to access, explore, and contribute to the ocean's treasures.
|
||||
|
||||
Prominently featured within this layer is [Ocean Market](../user-guides/using-ocean-market.md), a hub where data enthusiasts and industry stakeholders converge to discover, trade, and unlock the inherent value of data assets. Beyond Ocean Market, the Application Layer hosts a diverse ecosystem of specialized applications and marketplaces, each catering to unique use cases and industries. Empowered by the capabilities of Ocean Protocol, these applications facilitate advanced data exploration, analytics, and collaborative ventures, revolutionizing the way data is accessed, shared, and monetized.
|
||||
Prominently featured within this layer is [Ocean Market](https://market.oceanprotocol.com), a hub where data enthusiasts and industry stakeholders converge to discover, trade, and unlock the inherent value of data assets. Beyond Ocean Market, the Application Layer hosts a diverse ecosystem of specialized applications and marketplaces, each catering to unique use cases and industries. Empowered by the capabilities of Ocean Protocol, these applications facilitate advanced data exploration, analytics, and collaborative ventures, revolutionizing the way data is accessed, shared, and monetized.
|
||||
|
||||
### Layer 4: The Friendly Wallets
|
||||
|
||||
|
@ -1,46 +0,0 @@
|
||||
---
|
||||
title: Forking Ocean Market
|
||||
description: Forking and customizing Ocean Market (Frontend)
|
||||
---
|
||||
|
||||
# Build a Marketplace
|
||||
|
||||
## Outcome
|
||||
|
||||
Your own fully functioning customized fork of Ocean Market is deployed and working.
|
||||
|
||||
## Introduction
|
||||
|
||||
Have you ever thought about monetizing digital assets over the blockchain? Your first instinct might be to head on over to a popular marketplace - but why not create your own marketplace? It’s a lot easier than you might imagine. This guide will cover everything you need to start your own blockchain marketplace in less than an hour. The reason it’s so easy is that we’ll be starting with a fork of Ocean Market, which provides us with some pretty cool tech under-the-hood (if you’re interested in blockchain, read on).
|
||||
|
||||
Using Ocean Market is already a big improvement on the alternatives that are out there, but it gets even better. Ocean Market is completely open-source and freely available under the Apache 2 license. This means that you can fork Ocean Market and set up your own marketplace in just a few steps. Ocean Market is primarily focused on monetizing data, but it can actually handle the sale of any digital asset. This guide will walk you through the process of forking Ocean Market and starting your own marketplace for selling photos; you’ll be surprised how easy it is. No prior blockchain knowledge is required!
|
||||
|
||||
## Content
|
||||
|
||||
The tutorial covers:
|
||||
|
||||
* [Forking and running Ocean Market locally](forking-ocean-market.md)
|
||||
* [Customizing your fork of Ocean market](customising-your-market.md)
|
||||
* [Quick deployment of Ocean Market](deploying-market.md)
|
||||
|
||||
## Preparation
|
||||
|
||||
**Prior knowledge**
|
||||
|
||||
If you’re completely unfamiliar with Ocean Market or web3 applications in general, you will benefit from reading these guides first:
|
||||
|
||||
* To use your clone of Ocean Market, you’ll need a [wallet](../../user-guides/wallets/README.md). We recommend [getting set up with metamask](../../user-guides/wallets/metamask-setup.md).
|
||||
* You’ll also need some [OCEAN on a testnet](../../user-guides/wallets-and-ocean.md) to use your marketplace.
|
||||
* When you have the testnet tokens, have a go at [publishing a data NFT](../../user-guides/publish-data-nfts.md) on Ocean Market.
|
||||
* Run through the process of [consuming a data asset](../../user-guides/buy-data-nfts.md) on Ocean Market.
|
||||
|
||||
**Required Prerequisites**
|
||||
|
||||
* Git. Instructions for installing Git can be found [here](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
|
||||
* Node.js can be downloaded from [here](https://nodejs.org/en/download/) (we’re using version 18 in this guide)
|
||||
* A decent code editor, such as [Visual Studio Code](https://code.visualstudio.com/).
|
||||
* You’ll need a Github account to fork Ocean Market via [Github](https://github.com/).
|
||||
|
||||
{% hint style="warning" %}
|
||||
Let's emphasize an important aspect of building dApps. It's crucial to keep in mind that practically everything can be added to the blockchain 😵 When you integrate with these components, it becomes **crucial** for you, as a developer, to ensure **proper sanitization** of the responses on your end. This means you should carefully **validate and filter** the data received to **prevent** any potential vulnerabilities or security risks in your applications.
|
||||
{% endhint %}
|
@ -1,211 +0,0 @@
|
||||
---
|
||||
title: Customising Market
|
||||
description: Step by step guide to customizing your fork of Ocean market
|
||||
---
|
||||
|
||||
# Customising a Market
|
||||
|
||||
So you’ve got a fully functioning data marketplace at this point, which is pretty cool. But it doesn’t really look like your data marketplace. Right now, it’s still just a clone of Ocean Market — the same branding, name, logo, etc. The next few steps focus on personalizing your data marketplace.
|
||||
|
||||
* Change your Market Name
|
||||
* Change the Logo
|
||||
* Change the Styling
|
||||
* Edit the Publish Form
|
||||
* Advanced customization
|
||||
|
||||
## Change your Market Name
|
||||
|
||||
It’s now time to open up your favorite code editor and start getting stuck into the code. The first thing we will be doing is changing the name of your marketplace. A decent code editor (such as VS Code) makes this incredibly simple by searching and replacing all the places where the name appears.
|
||||
|
||||
Let’s start by searching and replacing `Ocean Marketplace`. In VS Code there is a magnifying glass symbol in the left-hand panel (arrow 1 in the image below) that will open up the interface for searching and replacing text. Type “Ocean Marketplace” into the first textbox, and the name of your marketplace into the second textbox (arrow 2). To make things simple, there is a button to the right of the second textbox (arrow 3) that will replace all instances at once. You can take a moment to review all the text you’re changing if you wish, and then click this button.
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/market-customisation-3.png)
|
||||
|
||||
Next up, we need to repeat the process but this time we’ll be searching for and replacing `Ocean Market`. As you can see in the screenshot below, we have called our fork `Crypto Photos Market`.
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/market-customisation-4.png)
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/market-customisation-4.1.png)
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/market-customisation-4.2.jpg)
|
||||
|
||||
Now let’s change the tagline of your site. Open up the folder called `content` and then open the file called `site.json`.
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/market-customisation-5.png)
|
||||
|
||||
On line 3 in this file, you can enter the tagline that you want for your marketplace.
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/market-customisation-6.png)
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/market-customisation-6.1.png)
|
||||
|
||||
## Change the Logo
|
||||
|
||||
The next important step to personalizing your marketplace is setting up your own logo. We highly recommend using your logo in SVG format for this. The site logo is stored in the following location:
|
||||
|
||||
```
|
||||
src/@images/logo.svg
|
||||
```
|
||||
|
||||
Delete the `logo.svg` file from that folder and paste your own logo in the same folder. Then, if you rename your `logo.svg` everything will work without any problems.
|
||||
|
||||
At this point, it’s a good idea to check how things are looking. First, check that you have saved all of your changes, then cancel the build that’s running in your terminal (Ctrl + C OR Cmnd + C) and start it again `npm start`. Once the build has finished, navigate to http://localhost:8000/ and see how things look.
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/market-customisation-7.1.png)
|
||||
|
||||
Awesome! Our logo is looking great!
|
||||
|
||||
## Change the Styling
|
||||
|
||||
Hopefully, you like our pink and purple branding, but we don’t expect you to keep it in your own marketplace. This step focuses on applying your own brand colors and styles.
|
||||
|
||||
### Background
|
||||
|
||||
Let’s start with the background. Open up the following CSS file:
|
||||
|
||||
```
|
||||
src/components/App/index.module.css
|
||||
```
|
||||
|
||||
You’ll notice in the screenshot above that we are setting our `wave` background on line 3. Here, you’ll want to use your own background color or image. For this example, we’ll use an SVG background from [here](https://www.svgbackgrounds.com/). First, we save the new background image into the src/images/ folder (same folder as the logo), then we change the CSS to the file location of the new background (see line 3 in the image below).
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/market-customisation-8.png)
|
||||
|
||||
If we save this file and view the site at this point, we get a white section at the top (see image below). And you’ll also notice that the background doesn’t fill all the way down to the bottom of the screen.
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/market-customisation-10.1.png) ![Market Customisation](../../.gitbook/assets/market/market-customisation-10.2.png)
|
||||
|
||||
To fix this, we need to change the starting position of the background image and change it from no-repeat to repeat. We can do this on line 3.
|
||||
|
||||
When we view our marketplace, we can see that the new background starts at the top and fills the whole page. Perfect!
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/market-customisation-11.1.png)
|
||||
|
||||
### Brand Colors
|
||||
|
||||
Next up, let’s change the background colors to match your individual style. Open up the following file: `src/global/_variables.css`. Here you’ll see the global style colors that are set. Now is the time to get creative, or consult your brand handbook (if you already have one).
|
||||
|
||||
You can change these colors as much as you wish until you’re happy with how everything looks. Each time you save your changes, the site will immediately update so you can see how things look. You can see the styles chosen for this example in the image below.
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/market-customisation-12.png)
|
||||
|
||||
### Change Fonts
|
||||
|
||||
The final part of the styling that we’ll alter in this guide is the fonts. This is an important step because the font used in Ocean Market is one of the few elements of the market that are **copyright protected**. If you want to use the same font you’ll need to purchase a license. The other copyrighted elements are the logo and the name — which we have already changed.
|
||||
|
||||
If you don’t already have a brand font, head over to Google Fonts to pick some fonts that suit the brand you’re trying to create. Google makes it nice and easy to see how they’ll look, and it’s simple to import them into your project.
|
||||
|
||||
The global fonts are set in the same file as the colors, scroll down and you’ll see them on lines 36 to 41.
|
||||
|
||||
If you are importing fonts, such as from Google Fonts, you need to make sure that you include the import statement at the top of the `_variables.css` file.
|
||||
|
||||
As with the color changes, it’s a good idea to save the file with each change and check if the site is looking the way that you expected it to. You can see our eclectic choices below.
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/market-customisation-13.png)
|
||||
|
||||
## Customize the Publish Form
|
||||
|
||||
Let’s head to the publish page to see what it looks like with our new styling - so far, so good. But there is one major issue, the publish form is still telling people to publish datasets. On our new marketplace, we want people to publish and sell their photos, so we’re going to have to make some changes here.
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/publish-page-before-edit.png)
|
||||
|
||||
Open up the `index.json` file from `content/publish/index.json` - here we change the text to explain that this form is for publishing photos.
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/market-customisation-15.png)
|
||||
|
||||
Additionally, the asset type currently says dataset, and we need to change this so that it says photo. The simplest way to do this is to change the title of the asset type without changing anything else. Ocean can handle selling any digital asset that can be accessed via a URL, so no further changes are needed to accommodate selling photos.
|
||||
|
||||
Open up `src/components/Publish/Metadata/index.tsx` and change line 33 so that it says `Photo`
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/market-customisation-18.png)
|
||||
|
||||
Great, now our publish page explains that users should be publishing photos and the photo is provided as an asset type option. We’ll also leave the algorithm as an option in case some data scientists want to do some analysis or image transformation on the photos.
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/publish-page-2.png)
|
||||
|
||||
There is one more thing that is fun to change before we move away from the publish form. You’ll notice that Ocean Market now has a cool SVG generation feature that creates the images for the Data NFT. It creates a series of pink waves. Let’s change this so that it uses our brand colors in the waves!
|
||||
|
||||
Open up `/src/@utils/SvgWaves.ts` and have a look at lines 27 to 30 where the colors are specified. Currently, the pink color is the one used in the SVG generator. You can replace this with your own brand color:
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/market-customisation-21.png)
|
||||
|
||||
If you’re interested in doing some further customization, take a look at lines 53 to 64. You can change these properties to alter how the image looks. Feel free to play around with it. We’ve increased the number of layers from 4 to 5.
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/market-customisation-22.png)
|
||||
|
||||
And now your customized publish page is ready for your customers:
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/market-customisation-20.png)
|
||||
|
||||
## Advanced customization
|
||||
|
||||
This important step is the last thing that we will change in this guide. To set the marketplace fees and address, you’ll need to save them as environmental variables. You'll also need to set the environmental variables if you customized services like Aquarius, Provider, or Subgraph.
|
||||
|
||||
First, we are going to create a new file called `.env` in the root of your repository.
|
||||
|
||||
Copy and paste the following into the file:
|
||||
|
||||
```bash
|
||||
|
||||
NEXT_PUBLIC_MARKET_FEE_ADDRESS="0x123abc"
|
||||
NEXT_PUBLIC_PUBLISHER_MARKET_ORDER_FEE="0.01"
|
||||
NEXT_PUBLIC_PUBLISHER_MARKET_FIXED_SWAP_FEE="0.01"
|
||||
NEXT_PUBLIC_CONSUME_MARKET_ORDER_FEE="0.01"
|
||||
NEXT_PUBLIC_CONSUME_MARKET_FIXED_SWAP_FEE="0.01"
|
||||
|
||||
#
|
||||
# ADVANCED SETTINGS
|
||||
#
|
||||
|
||||
# Toggle pricing options presented during price creation
|
||||
#NEXT_PUBLIC_ALLOW_FIXED_PRICING="true"
|
||||
#NEXT_PUBLIC_ALLOW_FREE_PRICING="true"
|
||||
|
||||
# Privacy Preference Center
|
||||
#NEXT_PUBLIC_PRIVACY_PREFERENCE_CENTER="true"
|
||||
|
||||
# Development Preference Center
|
||||
#NEXT_PUBLIC_PROVIDER_URL="http://xxx:xxx"
|
||||
#NEXT_PUBLIC_SUBGRAPH_URI="http://xxx:xxx"
|
||||
#NEXT_PUBLIC_METADATACACHE_URI="http://xxx:xxx"
|
||||
#NEXT_PUBLIC_RPC_URI="http://xxx:xxx"
|
||||
|
||||
```
|
||||
|
||||
### Change the Fee Address
|
||||
|
||||
At this point, we have made a lot of changes and hopefully, you’re happy with the way that your marketplace is looking. Given that you now have your own awesome photo marketplace, it’s about time we talked about monetizing it. Yup, that’s right - you will earn a [commission](../contracts/fees.md) when people buy and sell photos in your marketplace. In Ocean, there are a whole host of [fees](../contracts/fees.md) and customization options that you can use. In order to receive the fees you’ll need to set the address where you want to receive these fees in.
|
||||
|
||||
When someone sets the pricing for their photos in your marketplace, they are informed that a commission will be sent to the owner of the marketplace. You see that at the moment this fee is set to zero, so you’ll want to increase that.
|
||||
|
||||
You need to replace “0x123abc” with your Ethereum address (this is where the fees will be sent).
|
||||
|
||||
### Change the Fees Values
|
||||
|
||||
You can also alter the fees to the levels that you intend them to be at. If you change your mind, these fees can always be altered later.
|
||||
|
||||
Go to [Fees page](../contracts/fees.md) to know more details about each type of fee and its relevance.
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/market-customisation-23.png)
|
||||
|
||||
It is important that the file is saved in the right place at the root of your repository, your file structure should look the same as below.
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/market-customisation-24.png)
|
||||
|
||||
Now that’s it; you now have a fully functioning photo marketplace that operates over the blockchain. Every time someone uses it, you will receive revenue.
|
||||
|
||||
![Market Customisation](../../.gitbook/assets/market/market-customisation-25.png)
|
||||
|
||||
### Using a custom Provider
|
||||
|
||||
You have the flexibility to tailor the ocean market according to your preferences by directing it to a predetermined custom [provider](https://github.com/oceanprotocol/provider/) deployment. This customization option allows you to choose a specific default provider, in addition to the option of manually specifying it when publishing an asset. To make use of this feature, you need to uncomment the designated line and modify the URL for your custom provider in the previously generated `.env` file. Look for the key labeled `NEXT_PUBLIC_PROVIDER_URL` and update its associated URL accordingly.
|
||||
|
||||
### Using a custom MetadataCache
|
||||
|
||||
If you intend to utilize the ocean market with a custom [Aquarius](../aquarius/README.md) deployment, you can also make set a custom MetadataCache flag. To do this, you will need to update the same file mentioned earlier. However, instead of modifying the `NEXT_PUBLIC_PROVIDER_URL` key, you should update the `NEXT_PUBLIC_METADATACACHE_URI` key. By updating this key, you can specify the URI for your custom Aquarius deployment, enabling you to take advantage of the ocean market with your preferred metadata cache setup.
|
||||
|
||||
### Using a custom subgraph
|
||||
|
||||
Using a custom subgraph with the ocean market requires additional steps due to the differences in deployment. Unlike the multi-network deployment of the provider and Aquarius services, each network supported by the ocean market has a separate subgraph deployment. This means that while the provider and Aquarius services can be handled by a single deployment across all networks, the subgraph requires specific handling for each network.
|
||||
|
||||
To utilize a custom subgraph, you will need to implement additional logic within the `getOceanConfig` function located in the `src/utils/ocean.ts` file. By modifying this function, you can ensure that the market uses the desired custom subgraph for the selected network. This is particularly relevant if your market aims to support multiple networks and you do not want to enforce the use of the same subgraph across all networks. By incorporating the necessary logic within `getOceanConfig`, you can ensure the market utilizes the appropriate custom subgraph for each network, enabling the desired level of customization. If the mentioned scenario doesn't apply to your situation, there is another approach you can take. Similar to the previously mentioned examples, you can modify the `.env` file by updating the key labeled `NEXT_PUBLIC_SUBGRAPH_URI`. By making changes to this key, you can configure the ocean market to utilize your preferred subgraph deployment. This alternative method allows you to customize the market's behavior and ensure it utilizes the desired subgraph, even if you don't require different subgraph deployments for each network.
|
@ -1,42 +0,0 @@
|
||||
---
|
||||
title: Deployment of Ocean Market
|
||||
description: Step by step guide to a quick deployment of Ocean Market
|
||||
---
|
||||
|
||||
# Build and host your Data Marketplace
|
||||
|
||||
All that’s left is for you to host your data marketplace and start sharing it with your future users.
|
||||
|
||||
## **Build and host your marketplace using surge**
|
||||
|
||||
To host your data marketplace, you need to run the build command:
|
||||
|
||||
```bash
|
||||
npm run build:static
|
||||
```
|
||||
|
||||
This takes a few minutes to run. While this is running, you can get prepared to host your new data marketplace. You have many options for hosting your data marketplace (including AWS S3, Vercel, Netlify and many more). In this guide, we will demonstrate how to host it with surge, which is completely free and very easy to use. You can also refer to this [tutorial](../../infrastructure/deploying-marketplace.md) from the infrastructuree section as well if you want to deploy your market in you own infrastructure using docker.
|
||||
|
||||
Open up a new terminal window and run the following command to install surge:
|
||||
|
||||
```bash
|
||||
npm install --global surge
|
||||
```
|
||||
|
||||
When this is complete, navigate back to the terminal window that is building your finished data marketplace. Once the build is completed, enter the following commands to enter the public directory and host it:
|
||||
|
||||
```bash
|
||||
cd out
|
||||
```
|
||||
|
||||
```bash
|
||||
surge
|
||||
```
|
||||
|
||||
If this is your first time using surge, you will be prompted to enter an email address and password to create a free account. It will ask you to confirm the directory that it is about to publish, check that you are in the market/public/ directory and press enter to proceed. Now it gives you the option to choose the domain that you want your project to be available on.
|
||||
|
||||
<figure><img src="../../.gitbook/assets/market/Screenshot 2023-06-14 at 14.30.59.png" alt=""><figcaption><p>surge interaction</p></figcaption></figure>
|
||||
|
||||
We have chosen https://crypto-photos.surge.sh which is a free option. You can also set a CNAME value in your DNS to make use of your own custom domain.
|
||||
|
||||
After a few minutes, your upload will be complete, and you’re ready to share your data marketplace. You can view the version we created in this guide [here](https://crypto-photos.surge.sh/).
|
@ -1,55 +0,0 @@
|
||||
---
|
||||
title: Forking Ocean Market
|
||||
description: Forking and running Ocean Market locally.
|
||||
---
|
||||
|
||||
# Forking Ocean Market
|
||||
|
||||
One of the best use cases for Ocean is running your own marketplace and monetizing your digital assets. With Ocean you can sell your data directly to your customers with no third party in-between, no need to speak to data with data brokers. Ocean makes this all super easy for you with some pretty cool tech under the hood. Furthermore, an Ocean powered market isn't just limited to selling data, you can use it for selling any type of digital asset!
|
||||
|
||||
Using Ocean Market is already a big improvement on the alternatives that are out there, but it gets even better. Ocean Market is completely open-source and made freely available under the Apache 2 license. This means that you can fork Ocean Market and set up your own data marketplace in just a few steps. This guide will walk you through the process, you’ll be surprised how easy it is. No prior blockchain knowledge is required!
|
||||
|
||||
* Fork Ocean Market
|
||||
* Clone the market locally
|
||||
* Install the dependencies
|
||||
* Run your Market fork for the first time
|
||||
|
||||
## Fork Ocean Market
|
||||
|
||||
The first step is to log into Github and navigate to the [Ocean Market repository](https://github.com/oceanprotocol/market), you’ll need to log in or create a Github account. Now you need to click “Fork” in the top right-hand corner. If you are a member of an organization on Github, it will give you the option to clone it into either your personal account or the organization. Choose whichever is suitable for you.
|
||||
|
||||
## Clone the market locally
|
||||
|
||||
Now we need to clone the market fork locally so that we can start making changes to the code. Upon forking Ocean Market, GitHub will take you to the repository page. Here, you should copy the URL of the repository. To do this, click on the green “Code” button and then click the copy icon to copy the HTTPS URL. Make sure that you have git installed and set up and installed on your computer before proceeding. See [this guide](https://git-scm.com/) if you’re not familiar with git.
|
||||
|
||||
## Install the dependencies
|
||||
|
||||
Installing the dependencies is a vital step for running the market. It’s a super simple process, thanks to npm (node package manager). Make sure you have node.js installed, otherwise it will fail. In Ocean Market it’s highly recommended that you use the same version of node that we are using, you can check this in the [.nvmrc file](https://github.com/oceanprotocol/market/blob/main/.nvmrc).
|
||||
|
||||
Enter the following command to install the dependencies:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
This command will take a few minutes to complete and you’ll see some warnings as it runs (no need to worry about the warnings).
|
||||
|
||||
## Run your Market fork for the first time
|
||||
|
||||
At this point, you are ready to run your data marketplace for the first time. This is another straightforward step that requires just one command:
|
||||
|
||||
```bash
|
||||
npm start
|
||||
```
|
||||
|
||||
The above command will build the development bundle and run it locally.
|
||||
|
||||
<figure><img src="../../.gitbook/assets/market/Screenshot 2023-06-13 at 14.39.17.png" alt=""><figcaption><p>Forking Ocean Market</p></figcaption></figure>
|
||||
|
||||
Great news - your marketplace has successfully been built and is now running locally. Let’s check it out! Open your browser and navigate to http://localhost:8000/. You’ll see that you have a full-on clone of Ocean Market running locally. Give it a go and test out publishing and consuming assets - everything works!
|
||||
|
||||
That’s all that’s required to get a clone of Ocean market working. The whole process is made simple because your clone can happily use all the smart contracts and backend components that are maintained by Ocean Protocol Foundation.
|
||||
|
||||
<figure><img src="../../.gitbook/assets/market/Screenshot 2023-06-13 at 14.43.25.png" alt=""><figcaption><p>Forking Ocean Market</p></figcaption></figure>
|
||||
|
||||
So you’ve got a fully functioning marketplace at this point, which is pretty cool. But it doesn’t really look like your marketplace. Right now, it’s still just a clone of Ocean Market - the same branding, name, logo, etc. The next few steps focus on personalizing your marketplace.
|
@ -42,7 +42,7 @@ Additionally, in supporting the discovery process, middleware components come in
|
||||
|
||||
Here, the ocean comes alive with a vibrant ecosystem of dApps, marketplaces, and more. This layer hosts a variety of user-friendly interfaces, applications, and tools, inviting data scientists and curious explorers alike to access, explore, and contribute to the ocean's treasures.
|
||||
|
||||
Prominently featured within this layer is [Ocean Market](../../user-guides/using-ocean-market.md), a hub where data enthusiasts and industry stakeholders converge to discover, trade, and unlock the inherent value of data assets. Beyond Ocean Market, the Application Layer hosts a diverse ecosystem of specialized applications and marketplaces, each catering to unique use cases and industries. Empowered by the capabilities of Ocean Protocol, these applications facilitate advanced data exploration, analytics, and collaborative ventures, revolutionizing the way data is accessed, shared, and monetized.
|
||||
Prominently featured within this layer is [Ocean Market](https://market.oceanprotocol.com), a hub where data enthusiasts and industry stakeholders converge to discover, trade, and unlock the inherent value of data assets. Beyond Ocean Market, the Application Layer hosts a diverse ecosystem of specialized applications and marketplaces, each catering to unique use cases and industries. Empowered by the capabilities of Ocean Protocol, these applications facilitate advanced data exploration, analytics, and collaborative ventures, revolutionizing the way data is accessed, shared, and monetized.
|
||||
|
||||
### Layer 4: The Friendly Wallets
|
||||
|
||||
|
@ -185,4 +185,4 @@ To make the most of these pricing models, you can rely on user-friendly librarie
|
||||
|
||||
With Ocean.js, you can use the [createFRE() ](../ocean.js/publish.md)function to effortlessly deploy a data NFT (non-fungible token) and datatoken with a fixed-rate exchange pricing model. Similarly, in Ocean.py, the [create\_url\_asset()](../../data-scientists/ocean.py/publish-flow.md#create-an-asset--pricing-schema-simultaneously) function allows you to create an asset with fixed pricing. These libraries simplify the process of interacting with Ocean Protocol, managing pricing, and handling asset creation.
|
||||
|
||||
By taking advantage of Ocean Protocol's pricing options and leveraging the capabilities of [Ocean.js](../ocean.js/README.md) and [Ocean.py](../../data-scientists/ocean.py/README.md) (or by using the [Market](../../user-guides/using-ocean-market.md)), you can effectively monetize your data assets while ensuring transparent and seamless access for data consumers.
|
||||
By taking advantage of Ocean Protocol's pricing options and leveraging the capabilities of [Ocean.js](../ocean.js/README.md) and [Ocean.py](../../data-scientists/ocean.py/README.md) (or by using the [Market](https://market.oceanprotocol.com)), you can effectively monetize your data assets while ensuring transparent and seamless access for data consumers.
|
||||
|
@ -62,7 +62,7 @@ Parameters
|
||||
```
|
||||
address: String object containing consumer's address (optional)
|
||||
nonce: Integer, Nonce (required)
|
||||
signature: String object containg user signature (signed message)
|
||||
signature: String object containing user signature (signed message)
|
||||
The signature is based on hashing the following parameters:
|
||||
address + nonce
|
||||
token: token to be expired
|
||||
|
@ -42,7 +42,7 @@ Parameters
|
||||
|
||||
{% code overflow="wrap" %}
|
||||
```
|
||||
signature: String object containg user signature (signed message) (required)
|
||||
signature: String object containing user signature (signed message) (required)
|
||||
consumerAddress: String object containing consumer's ethereum address (required)
|
||||
nonce: Integer, Nonce (required)
|
||||
environment: String representing a compute environment offered by the provider
|
||||
@ -108,7 +108,7 @@ Parameters
|
||||
|
||||
{% code overflow="wrap" %}
|
||||
```
|
||||
signature: String object containg user signature (signed message)
|
||||
signature: String object containing user signature (signed message)
|
||||
documentId: String object containing document did (optional)
|
||||
jobId: String object containing workflowID (optional)
|
||||
consumerAddress: String object containing consumer's address (optional)
|
||||
@ -175,7 +175,7 @@ Parameters
|
||||
index: Integer, index of the result to download (optional)
|
||||
consumerAddress: String object containing consumer's address (optional)
|
||||
nonce: Integer, Nonce (required)
|
||||
signature: String object containg user signature (signed message)
|
||||
signature: String object containing user signature (signed message)
|
||||
```
|
||||
|
||||
Returns: Bytes string containing the compute result.
|
||||
@ -204,7 +204,7 @@ Parameters
|
||||
|
||||
{% code overflow="wrap" %}
|
||||
```
|
||||
signature: String object containg user signature (signed message)
|
||||
signature: String object containing user signature (signed message)
|
||||
documentId: String object containing document did (optional)
|
||||
jobId: String object containing workflowID (optional)
|
||||
consumerAddress: String object containing consumer's address (optional)
|
||||
@ -245,7 +245,7 @@ Delete a compute job and all resources associated with the job. If job is runnin
|
||||
Parameters
|
||||
|
||||
```
|
||||
signature: String object containg user signature (signed message)
|
||||
signature: String object containing user signature (signed message)
|
||||
documentId: String object containing document did (optional)
|
||||
jobId: String object containing workflowId (optional)
|
||||
consumerAddress: String object containing consumer's address (optional)
|
||||
|
@ -1,57 +0,0 @@
|
||||
---
|
||||
description: >-
|
||||
Use these steps to reveal the information contained within an asset's DID and
|
||||
list the buyers of a datatoken
|
||||
---
|
||||
|
||||
# Retrieve datatoken/data NFT addresses & Chain ID
|
||||
|
||||
### How to find the network, datatoken address, and data NFT address from an Ocean Market link?
|
||||
|
||||
If you are given an Ocean Market link, then the network and datatoken address for the asset is visible on the Ocean Market webpage. For example, given this asset's Ocean Market link: [https://odc.oceanprotocol.com/asset/did:op:1b26eda361c6b6d307c8a139c4aaf36aa74411215c31b751cad42e59881f92c1](https://odc.oceanprotocol.com/asset/did:op:1b26eda361c6b6d307c8a139c4aaf36aa74411215c31b751cad42e59881f92c1) the webpage shows that this asset is hosted on the Mumbai network, and one simply clicks the datatoken's hyperlink to reveal the datatoken's address as shown in the screenshot below:
|
||||
|
||||
<figure><img src="../.gitbook/assets/market/marketplace_data.jpg" alt="" width="563"><figcaption><p>See the Network and Datatoken Address for an Ocean Market asset by visiting the asset's Ocean Market page.</p></figcaption></figure>
|
||||
|
||||
#### More Detailed Info:
|
||||
|
||||
You can access all the information for the Ocean Market asset also by **enabling Debug mode**. To do this, follow these steps:
|
||||
|
||||
**Step 1** - Click the Settings button in the top right corner of the Ocean Market
|
||||
|
||||
<figure><img src="../.gitbook/assets/market/Click-Settings.png" alt=""><figcaption><p>Click the Settings button</p></figcaption></figure>
|
||||
|
||||
**Step 2** - Check the Activate Debug Mode box in the dropdown menu
|
||||
|
||||
<figure><img src="../.gitbook/assets/market/Check-Debug-Mode.png" alt=""><figcaption><p>Check 'Active Debug Mode'</p></figcaption></figure>
|
||||
|
||||
**Step 3** - Go to the page for the asset you would like to examine, and scroll through the DDO information to find the NFT address, datatoken address, chain ID, and other information.
|
||||
|
||||
<figure><img src="../.gitbook/assets/market/Scroll-DDO-Info.png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
### How to use Aquarius to find the chainID and datatoken address from a DID?
|
||||
|
||||
If you know the DID:op but you don't know the source link, then you can use Ocean Aquarius to resolve the metadata for the DID:op to find the `chainId`+ `datatoken address` of the asset. Simply enter in your browser "[https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/ddo/](https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/ddo/did:op:1b26eda361c6b6d307c8a139c4aaf36aa74411215c31b751cad42e59881f92c1)\<your did:op:XXX>" to fetch the metadata.
|
||||
|
||||
For example, for the following DID:op: "did:op:1b26eda361c6b6d307c8a139c4aaf36aa74411215c31b751cad42e59881f92c1" the Ocean Aquarius URL can be modified to add the DID:op and resolve its metadata. Simply add "[https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/ddo/](https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/ddo/did:op:1b26eda361c6b6d307c8a139c4aaf36aa74411215c31b751cad42e59881f92c1)" to the beginning of the DID:op and enter the link in your browser like this: [https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/ddo/did:op:1b26eda361c6b6d307c8a139c4aaf36aa74411215c31b751cad42e59881f92c1](https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/ddo/did:op:1b26eda361c6b6d307c8a139c4aaf36aa74411215c31b751cad42e59881f92c1)
|
||||
|
||||
<figure><img src="../.gitbook/assets/market/network-and-datatoken-address.png" alt=""><figcaption><p>The metadata printout for this DID:op with the network's Chain ID and datatoken address circled in red</p></figcaption></figure>
|
||||
|
||||
Here are the networks and their corresponding chain IDs:
|
||||
|
||||
```json
|
||||
"mumbai: 80001"
|
||||
"polygon: 137"
|
||||
"bsc: 56"
|
||||
"energyweb: 246"
|
||||
"moonriver: 1285"
|
||||
"mainnet: 1"
|
||||
"goerli: 5"
|
||||
"polygonedge: 81001"
|
||||
"gaiaxtestnet: 2021000"
|
||||
"alfajores: 44787"
|
||||
"gen-x-testnet: 100"
|
||||
"filecointestnet: 3141"
|
||||
"oasis_saphire_testnet: 23295"
|
||||
"development: 8996"
|
||||
```
|
||||
|
@ -33,8 +33,6 @@ When it comes to fetching valuable information about [Data NFTs](../contracts/da
|
||||
| Ethereum | [Subgraph](https://v4.subgraph.mainnet.oceanprotocol.com) | [GraphiQL](https://v4.subgraph.mainnet.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql) |
|
||||
| Polygon | [Subgraph](https://v4.subgraph.polygon.oceanprotocol.com/) | [GraphiQL](https://v4.subgraph.polygon.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql) |
|
||||
| OP Mainnet(Optimism)| [Subgraph](https://v4.subgraph.optimism.oceanprotocol.com) | [GraphiQL](https://v4.subgraph.optimism.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql) |
|
||||
| Mumbai | [Subgraph](https://v4.subgraph.mumbai.oceanprotocol.com) | [GraphiQL](https://v4.subgraph.mumbai.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql) |
|
||||
| Görli | [Subgraph](https://v4.subgraph.goerli.oceanprotocol.com) | [GraphiQL](https://v4.subgraph.goerli.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql) |
|
||||
| Sepolia | [Subgraph](https://v4.subgraph.sepolia.oceanprotocol.com) | [GraphiQL](https://v4.subgraph.sepolia.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql) |
|
||||
|
||||
{% hint style="warning" %}
|
||||
|
@ -6,7 +6,7 @@ description: Query the Subgraph to see the buyers of a datatoken.
|
||||
|
||||
The result of the following GraphQL query returns the list of buyers for a particular datatoken. Here, `0xc22bfd40f81c4a28c809f80d05070b95a11829d9` is the address of the datatoken.
|
||||
|
||||
_PS: In this example, the query is executed on the Ocean subgraph deployed on the **Mumbai** network. If you want to change the network, please refer to_ [_this table_](README.md#ocean-subgraph-deployments)_._
|
||||
_PS: In this example, the query is executed on the Ocean subgraph deployed on the **Sepolia** network. If you want to change the network, please refer to_ [_this table_](README.md#ocean-subgraph-deployments)_._
|
||||
|
||||
{% tabs %}
|
||||
{% tab title="JavaScript" %}
|
||||
@ -42,7 +42,7 @@ const query = `{
|
||||
}
|
||||
}`
|
||||
|
||||
const network = "mumbai"
|
||||
const network = "sepolia"
|
||||
var config = {
|
||||
method: 'post',
|
||||
url: `https://v4.subgraph.${network}.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph`,
|
||||
@ -105,7 +105,7 @@ query = """
|
||||
datatoken_address
|
||||
)
|
||||
|
||||
base_url = "https://v4.subgraph.mumbai.oceanprotocol.com"
|
||||
base_url = "https://v4.subgraph.sepolia.oceanprotocol.com"
|
||||
route = "/subgraphs/name/oceanprotocol/ocean-subgraph"
|
||||
|
||||
url = base_url + route
|
||||
@ -127,7 +127,7 @@ python datatoken_buyers.py
|
||||
{% endtab %}
|
||||
|
||||
{% tab title="Query" %}
|
||||
Copy the query to fetch the list of buyers for a datatoken in the Ocean Subgraph [GraphiQL interface](https://v4.subgraph.mumbai.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph).
|
||||
Copy the query to fetch the list of buyers for a datatoken in the Ocean Subgraph [GraphiQL interface](https://v4.subgraph.sepolia.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph).
|
||||
|
||||
```graphql
|
||||
|
||||
|
@ -9,7 +9,7 @@ If you are already familiarized with veOCEAN, you're off to a great start. Howev
|
||||
On this page, you'll find a few examples to fetch the stats of veOCEANS from the Ocean Subgraph. These examples serve as a valuable starting point to help you retrieve essential information about veOCEAN. However, if you're eager to delve deeper into the topic, we invite you to visit the [GitHub](https://github.com/oceanprotocol/ocean-subgraph/blob/main/test/integration/VeOcean.test.ts) repository. There, you'll discover a wealth of additional examples, which provide comprehensive insights. Feel free to explore and expand your knowledge! :books:
|
||||
|
||||
{% hint style="info" %}
|
||||
The veOCEAN is deployed on the Ethereum mainnet, along with two test networks, namely Mumbai and Goerli. The statistical data available is specifically limited to these networks.
|
||||
The veOCEAN is deployed on the Ethereum mainnet, along with two test networks. The statistical data available is specifically limited to these networks.
|
||||
{% endhint %}
|
||||
|
||||
###
|
||||
|
74
developers/uploader/README.md
Normal file
@ -0,0 +1,74 @@
|
||||
# Uploader
|
||||
|
||||
### What's Uploader?
|
||||
|
||||
The Uploader represents a cutting-edge solution designed to streamline the upload process within a decentralized network. Built with efficiency and scalability in mind, Uploader leverages advanced technologies to provide secure, reliable, and cost-effective storage solutions to users.
|
||||
|
||||
### Architecture Overview
|
||||
|
||||
Uploader is built on a robust architecture that seamlessly integrates various components to ensure optimal performance. The architecture consists of:
|
||||
|
||||
- Uploader API Layer: Exposes both public and private APIs for frontend and microservices interactions, respectively.
|
||||
- 1-N Storage Microservices: Multiple microservices, each specializing in different storage types, responsible for handling storage operations.
|
||||
- IPFS Integration: Temporary storage using the InterPlanetary File System (IPFS).
|
||||
|
||||
### Streamlined File Uploads
|
||||
|
||||
Uploader streamlines the file uploading process, providing users with a seamless experience to effortlessly incorporate their digital assets into a decentralized network. Whether you're uploading images, documents, or other media, Uploader enhances accessibility and ease of use, fostering a more decentralized and inclusive digital landscape.
|
||||
|
||||
### Unique Identifiers
|
||||
|
||||
Obtain unique identifiers such as hashes or CIDs for your uploaded files. These unique identifiers play a pivotal role in enabling efficient tracking and interaction with decentralized assets. By obtaining these identifiers, users gain a crucial toolset for managing, verifying, and engaging with their digital assets on the decentralized network, ensuring a robust and secure mechanism for overseeing the lifecycle of their contributed files.
|
||||
|
||||
### Features
|
||||
|
||||
Uploader offers a range of powerful features tailored to meet the needs of any decentralized storage:
|
||||
|
||||
- User Content Uploads: Users can seamlessly upload their content through the user-friendly frontend interface.
|
||||
- Payment Handling: Uploader integrates with payment systems to manage the financial aspects of storage services.
|
||||
- Decentralized Storage: Content is pushed to decentralized storage networks like Filecoin and Arweave for enhanced security and redundancy.
|
||||
- API Documentation: Comprehensive API documentation on each repo to allow users to understand and interact with the system effortlessly.
|
||||
- Uploader.js: a TypeScript library designed to simplify interaction with the Uploader API. This library provides a user-friendly and intuitive interface for calling API endpoints within the Uploader Storage system.
|
||||
|
||||
### Components
|
||||
|
||||
- [Uploader](https://github.com/oceanprotocol/decentralized_storage_backend)
|
||||
- [Uploader.js](https://github.com/oceanprotocol/uploader.js)
|
||||
- [Uploader UI](https://github.com/oceanprotocol/uploader-ui-lib)
|
||||
|
||||
### Microservices:
|
||||
|
||||
- [Filecoin](https://github.com/oceanprotocol/uploader_filecoin) (WIP)
|
||||
- [Arweave](https://github.com/oceanprotocol/uploader_arweave)
|
||||
|
||||
### User Workflow
|
||||
|
||||
Uploader simplifies the user workflow, allowing for easy management of storage operations:
|
||||
|
||||
- Users fetch available storage types and payment options from the frontend.
|
||||
- Quotes for storing files on the Microservice network.
|
||||
- Files are uploaded from the frontend to Uploader, which handles temporary storage via IPFS.
|
||||
- The Microservice takes over, ensuring data is stored on the selected network securely.
|
||||
- Users can monitor upload status and retrieve links to access their stored content.
|
||||
|
||||
#### File storage flow
|
||||
|
||||
<figure><img src="../../.gitbook/assets/uploader/Diagrams_Upload_file_flow.png" alt=""><figcaption><p>Ocean Uploader - storage flow 1</p></figcaption></figure>
|
||||
|
||||
#### File retrieval flow
|
||||
|
||||
<figure><img src="../../.gitbook/assets/uploader/Diagrams_Retrieve_file_flow.png" alt=""><figcaption><p>Ocean Uploader - storage flow 1</p></figcaption></figure>
|
||||
|
||||
### API Documentation
|
||||
|
||||
Documentation is provided in the repos to facilitate seamless integration and interaction with the Uploader. The documentation outlines all API endpoints, payload formats, and example use cases, empowering developers to effectively harness the capabilities of the Uploader solution.
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
Did you encounter a problem? Open an issue in Ocean Protocol's repos:
|
||||
|
||||
- [Uploader](https://github.com/oceanprotocol/decentralized_storage_backend/issues)
|
||||
- [Uploader.js](https://github.com/oceanprotocol/uploader.js/issues)
|
||||
- [Filecoin Microservice](https://github.com/oceanprotocol/uploader_filecoin/issues)
|
||||
- [Arweave Microservice](https://github.com/oceanprotocol/uploader_arweave/issues)
|
||||
- [Uploader UI Library](https://github.com/oceanprotocol/uploader-ui-lib/issues)
|
154
developers/uploader/uploader-js.md
Normal file
@ -0,0 +1,154 @@
|
||||
# Uploader.js
|
||||
|
||||
<a href="https://github.com/oceanprotocol/uploader.js" target="_blank">Uploader.js</a> is a robust TypeScript library that serves as a vital bridge to interact with the Ocean Uploader API. It simplifies the process of managing file storage uploads, obtaining quotes, and more within the Ocean Protocol ecosystem. This library offers developers a straightforward and efficient way to access the full range of Uploader API endpoints, facilitating seamless integration of decentralized storage capabilities into their applications.
|
||||
|
||||
Whether you're building a decentralized marketplace, a content management system, or any application that involves handling digital assets, Uploader.js provides a powerful toolset to streamline your development process and enhance your users' experience.
|
||||
|
||||
### Browser Usage
|
||||
|
||||
Ensure that the Signer object (signer in this case) you're passing to the function when you call it from the browser is properly initialized and is compatible with the browser. For instance, if you're using something like MetaMask as your Ethereum provider in the browser, you'd typically use the ethers.Web3Provider to generate a signer.
|
||||
|
||||
### How to Safely Store Your Precious Files with Ocean Uploader Magic 🌊✨
|
||||
|
||||
Excited to get your files safely stored? Let's breeze through the process using Ocean Uploader. First things first, install the package with npm or yarn:
|
||||
|
||||
```bash
|
||||
npm install @oceanprotocol/uploader
|
||||
|
||||
```bash
|
||||
yarn add @oceanprotocol/uploader
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```bash
|
||||
yarn add @oceanprotocol/uploader
|
||||
```
|
||||
|
||||
Got that done? Awesome! Now, let's dive into a bit of TypeScript:
|
||||
|
||||
```typescript
|
||||
import { ethers } from 'ethers';
|
||||
import {
|
||||
UploaderClient,
|
||||
GetQuoteArgs,
|
||||
GetQuoteResult
|
||||
} from '@oceanprotocol/uploader';
|
||||
import dotenv from 'dotenv';
|
||||
|
||||
dotenv.config();
|
||||
|
||||
// Set up a new instance of the Uploader client
|
||||
const signer = new ethers.Wallet(process.env.PRIVATE_KEY);
|
||||
const client = new UploaderClient(process.env.UPLOADER_URL, process.env.UPLOADER_ACCOUNT, signer);
|
||||
|
||||
async function uploadAsset() {
|
||||
// Get storage info
|
||||
const info = await client.getStorageInfo();
|
||||
|
||||
// Fetch a quote using the local file path
|
||||
const quoteArgs: GetQuoteArgs = {
|
||||
type: info[0].type,
|
||||
duration: 4353545453,
|
||||
payment: {
|
||||
chainId: info[0].payment[0].chainId,
|
||||
tokenAddress: info[0].payment[0].acceptedTokens[0].value
|
||||
},
|
||||
userAddress: process.env.USER_ADDRESS,
|
||||
filePath: ['/home/username/ocean/test1.txt'] // example file path
|
||||
};
|
||||
const quoteResult: GetQuoteResult = await client.getQuote(quoteArgs);
|
||||
|
||||
// Upload the file using the returned quote
|
||||
await client.upload(quoteResult.quoteId, quoteArgs.filePath);
|
||||
console.log('Files uploaded successfully.');
|
||||
}
|
||||
|
||||
uploadAsset().catch(console.error);
|
||||
|
||||
```
|
||||
|
||||
There you go! That's all it takes to upload your files using Uploader.js. Easy, right? Now go ahead and get those files stored securely. You got this! 🌟💾
|
||||
|
||||
For additional details, please visit the [Uploader.js](https://github.com/oceanprotocol/uploader.js) repository.
|
||||
|
||||
### API
|
||||
|
||||
The library offers developers a versatile array of methods designed for seamless interaction with the Ocean Uploader API. These methods collectively empower developers to utilize Ocean's decentralized infrastructure for their own projects:
|
||||
|
||||
<details>
|
||||
<summary>
|
||||
constructor(baseURL: string)
|
||||
</summary>
|
||||
|
||||
```
|
||||
Create a new instance of the UploaderClient.
|
||||
```
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
getStorageInfo()
|
||||
</summary>
|
||||
|
||||
```
|
||||
Fetch information about supported storage types and payments.
|
||||
```
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
getQuote(args: GetQuoteArgs)
|
||||
</summary>
|
||||
|
||||
```
|
||||
Fetch a quote for storing files on a specific storage.
|
||||
```
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
upload(quoteId: string, nonce: number, signature: string, files: File[])
|
||||
</summary>
|
||||
|
||||
```
|
||||
Upload files according to the quote request.
|
||||
```
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
getStatus(quoteId: string)
|
||||
</summary>
|
||||
|
||||
```
|
||||
Fetch the status of an asset during upload.
|
||||
```
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
getLink(quoteId: string, nonce: number, signature: string)
|
||||
</summary>
|
||||
|
||||
```
|
||||
Fetch hash reference for the asset. For example: CID for Filecoin, Transaction Hash for Arweave.
|
||||
```
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
registerMicroservice(args: RegisterArgs)
|
||||
</summary>
|
||||
|
||||
```
|
||||
Register a new microservice that handles a storage type.
|
||||
```
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
getHistory(page: number = 1, pageSize: number = 25)
|
||||
</summary>
|
||||
|
||||
```
|
||||
Retrieves the quote history for the given user address, nonce, and signature.
|
||||
```
|
||||
</details>
|
||||
<br />
|
||||
Whether you're a developer looking to integrate Ocean Uploader into your application or a contributor interested in enhancing this TypeScript library, we welcome your involvement. By following the <a href="https://github.com/oceanprotocol/uploader.js" target="_blank">provided documentation</a>, you can harness the capabilities of Uploader.js to make the most of decentralized file storage in your projects.
|
||||
|
||||
Feel free to explore the API reference, contribute to the library's development, and become a part of the Ocean Protocol community's mission to democratize data access and storage.
|
27
developers/uploader/uploader-ui-marketplace.md
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
description: With the Uploader UI, users can effortlessly upload their files and obtain a unique hash or CID (Content Identifier) for each uploaded asset to use on the Marketplace.
|
||||
---
|
||||
|
||||
# Uploader UI Marketplace
|
||||
|
||||
<b>Step 1</b>: Copy the hash or CID from your upload.
|
||||
|
||||
<img src="../../.gitbook/assets/uploader/uploader_screen_11.png" alt="" />
|
||||
|
||||
<b>Step 2</b>: Open the Ocean Marketplace. Go to publish and fill in all the information for your dataset.
|
||||
|
||||
<img src="../../.gitbook/assets/uploader/uploader_screen_12.png" alt="" />
|
||||
|
||||
<b>Step 3</b>: When selecting the file to publish, open the hosting provider (e.g. "Arweave" tab)
|
||||
|
||||
<img src="../../.gitbook/assets/uploader/uploader_screen_13.png" alt="" />
|
||||
|
||||
<b>Step 4</b>: Paste the hash you copied earlier.
|
||||
|
||||
<img src="../../.gitbook/assets/uploader/uploader_screen_14.png" alt="" />
|
||||
|
||||
<b>Step 5</b>: Click on "VALIDATE" to ensure that your file gets validated correctly.
|
||||
|
||||
<img src="../../.gitbook/assets/uploader/uploader_screen_15.png" alt="" />
|
||||
|
||||
This feature not only simplifies the process of storing and managing files but also seamlessly integrates with the Ocean Marketplace. Once your file is uploaded via Uploader UI, you can conveniently use the generated hash or CID to interact with your assets on the Ocean Marketplace, streamlining the process of sharing, validating, and trading your digital content.
|
178
developers/uploader/uploader-ui.md
Normal file
@ -0,0 +1,178 @@
|
||||
# Uploader UI
|
||||
|
||||
The [Uploader UI](https://github.com/oceanprotocol/uploader-ui-lib) stands as a robust UI react library dedicated to optimizing the uploading, and interaction with digital assets.
|
||||
|
||||
Through an intuitive platform, the tool significantly simplifies the entire process, offering users a seamless experience for uploading files, acquiring unique identifiers such as hashes or CIDs, and effectively managing their decentralized assets. Developed using React, TypeScript, and CSS modules, the library seamlessly connects to Ocean remote components by default, ensuring a cohesive and efficient integration within the ecosystem.
|
||||
|
||||
## 🚀 Usage
|
||||
|
||||
Integrating [Uploader UI](https://github.com/oceanprotocol/uploader-ui-lib) into your application is straightforward. The package facilitates seamless uploads but requires a wallet connector library to function optimally. Compatible wallet connection choices include [ConnectKit](https://docs.family.co/), [Web3Modal](https://web3modal.com/), [Dynamic](https://dynamic.xyz/) and [RainbowKit](https://www.rainbowkit.com/docs/installation).
|
||||
|
||||
**Step 1:** Install the necessary packages. For instance, if you're using ConnectKit, the installation command would be:
|
||||
|
||||
```bash
|
||||
npm install connectkit @oceanprotocol/uploader-ui-lib
|
||||
```
|
||||
|
||||
**Step 2:** Incorporate the UploaderComponent from the uploader-ui-lib into your app. It's crucial to ensure the component is nested within both the WagmiConfig and ConnectKit providers. Here's a basic implementation:
|
||||
|
||||
```javascript
|
||||
import React from 'react'
|
||||
import { WagmiConfig, createConfig } from 'wagmi'
|
||||
import { polygon } from 'wagmi/chains'
|
||||
import {
|
||||
ConnectKitProvider,
|
||||
getDefaultConfig,
|
||||
ConnectKitButton
|
||||
} from 'connectkit'
|
||||
import UploaderComponent from 'uploader-ui-lib'
|
||||
|
||||
export default function App () {
|
||||
// Initialize the Wagmi client
|
||||
const wagmiConfig = createConfig(
|
||||
getDefaultConfig({
|
||||
appName: 'Ocean Uploader UI',
|
||||
infuraId: 'Your infura ID',
|
||||
chains: [polygon],
|
||||
walletConnectProjectId: 'Your wallet connect project ID'
|
||||
})
|
||||
)
|
||||
|
||||
return (
|
||||
<WagmiConfig config={wagmiConfig}>
|
||||
<ConnectKitProvider>
|
||||
{/* Your App */}
|
||||
<ConnectKitButton />
|
||||
<UploaderComponent
|
||||
uploader_url={
|
||||
process.env.NEXT_PUBLIC_UPLOADER_URL ||'https://api.uploader.oceanprotocol.com/'
|
||||
}
|
||||
uploader_account={
|
||||
process.env.NEXT_PUBLIC_UPLOADER_ACCOUNT ||
|
||||
'0x5F8396D1BfDa5259Ee89196F892E4401BF3B596d'
|
||||
}
|
||||
/>
|
||||
</ConnectKitProvider>
|
||||
</WagmiConfig>
|
||||
)
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
By following the steps above, you can smoothly incorporate the Uploader UI into your application while ensuring the essential providers wrap the necessary components.
|
||||
|
||||
Alternatively, the example below shows how you could use [uploader-ui-lib](https://github.com/oceanprotocol/uploader-ui-lib) with RainbowKit:
|
||||
|
||||
```javascript
|
||||
import React from 'react'
|
||||
import { WagmiConfig, createConfig } from 'wagmi'
|
||||
import { polygon } from 'wagmi/chains'
|
||||
import { RainbowKitProvider, ConnectButton } from '@rainbow-me/rainbowkit';
|
||||
import UploaderComponent from 'uploader-ui-lib'
|
||||
|
||||
export default function App () {
|
||||
// Initialize the Wagmi client
|
||||
const wagmiConfig = createConfig(
|
||||
getDefaultConfig({
|
||||
appName: 'Ocean Uploader UI',
|
||||
infuraId: 'Your infura ID',
|
||||
chains: [polygon],
|
||||
walletConnectProjectId: 'Your wallet connect project ID'
|
||||
})
|
||||
)
|
||||
|
||||
return (
|
||||
<WagmiConfig config={wagmiConfig}>
|
||||
<RainbowKitProvider>
|
||||
{/* Your App */}
|
||||
<ConnectButton />
|
||||
<UploaderComponent
|
||||
uploader_url={
|
||||
process.env.NEXT_PUBLIC_UPLOADER_URL ||'https://api.uploader.oceanprotocol.com/'
|
||||
}
|
||||
uploader_account={
|
||||
process.env.NEXT_PUBLIC_UPLOADER_ACCOUNT ||
|
||||
'0x5F8396D1BfDa5259Ee89196F892E4401BF3B596d'
|
||||
}
|
||||
/>
|
||||
</RainbowKitProvider>
|
||||
</WagmiConfig>
|
||||
)
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
\*\* under development
|
||||
|
||||
## NextJS Setup for Ocean Protocol Uploader UI Library
|
||||
|
||||
1. To use Ocean's Uploader UI library in your NextJS project modify your `next.config.js` file to include these fallbacks:
|
||||
|
||||
```javascript
|
||||
module.exports = {
|
||||
webpack: (config) => {
|
||||
config.resolve.fallback = {
|
||||
fs: false,
|
||||
process: false,
|
||||
net: false,
|
||||
tls: false
|
||||
}
|
||||
return config
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
\*\* add these fallbacks to avoid any issue related to webpack 5 Polyfills imcompatibility: https://github.com/webpack/changelog-v5#automatic-nodejs-polyfills-removed
|
||||
|
||||
2. Install dependencies:
|
||||
|
||||
```bash
|
||||
npm install @oceanprotocol/uploader-ui-lib
|
||||
```
|
||||
|
||||
3. Import the library's CSS into your project:
|
||||
|
||||
```javascript
|
||||
import '@oceanprotocol/uploader-ui-lib/dist/index.es.css';
|
||||
```
|
||||
|
||||
4. Dynamically import the Uploader component and ensure it is not processed during server-side rendering (SSR) using the next/dynamic function:
|
||||
|
||||
```javascript
|
||||
import dynamic from 'next/dynamic';
|
||||
...
|
||||
|
||||
const Uploader = dynamic(() => import('@oceanprotocol/uploader-ui-lib').then((module) => module.Uploader), { ssr: false });
|
||||
```
|
||||
|
||||
5. Import component:
|
||||
|
||||
```javascript
|
||||
<WagmiConfig config={wagmiConfig}>
|
||||
<ConnectKitProvider>
|
||||
<Layout>
|
||||
...
|
||||
<UploaderConnection
|
||||
uploader_url={
|
||||
process.env.NEXT_PUBLIC_UPLOADER_URL ||'https://api.uploader.oceanprotocol.com/'
|
||||
}
|
||||
uploader_account={
|
||||
process.env.NEXT_PUBLIC_UPLOADER_ACCOUNT ||
|
||||
'0x5F8396D1BfDa5259Ee89196F892E4401BF3B596d'
|
||||
}
|
||||
/>
|
||||
</Layout>
|
||||
</ConnectKitProvider>
|
||||
</WagmiConfig>
|
||||
```
|
||||
|
||||
When incorporating the Uploader component into your application, make sure to set 'use client' on top in your app's component. This ensures that the component operates on the client side, bypassing SSR when rendering:
|
||||
|
||||
```javascript
|
||||
'use client'
|
||||
import dynamic from 'next/dynamic'
|
||||
```
|
||||
|
||||
This comprehensive setup ensures the proper integration and functioning of the Ocean Protocol's Uploader UI library within a NextJS application.
|
||||
|
||||
For more details visit the [Uploader UI](https://github.com/oceanprotocol/uploader-ui) project.
|
@ -31,7 +31,6 @@ Here are the networks that Ocean is deployed to.
|
||||
**Test Networks:**
|
||||
- Görli
|
||||
- Sepolia
|
||||
- Mumbai
|
||||
- Oasis Sapphire testnet
|
||||
- Optimism (OP) Sepolia
|
||||
|
||||
@ -149,19 +148,6 @@ This is the chain for [Energy Web Foundation](https://www.energyweb.org/).
|
||||
|
||||
Unlike production networks, tokens on test networks do not hold real economic value.
|
||||
|
||||
### Görli
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr><td>Native token</td></td><td>Görli (fake) ETH</td></tr>
|
||||
<tr><td>Native token faucet</td><td><a href="https://goerlifaucet.com/">Here</a></td></tr>
|
||||
<tr><td>OCEAN address</td><td><a href="https://goerli.etherscan.io/address/0xcfdda22c9837ae76e0faa845354f33c62e03653a">0xCfDdA22C9837aE76E0faA845354f33C62E03653a</a></td></tr>
|
||||
<tr><td>OCEAN faucet</td><td><a href="https://faucet.goerli.oceanprotocol.com">Here</a></td></tr>
|
||||
<tr><td>Explorer</td><td><a href="https://goerli.etherscan.io"</a></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
**Wallet.** To connect with e.g. MetaMask, click on the network name dropdown and select _Goerli_ from the list of available networks.
|
||||
|
||||
### Sepolia
|
||||
|
||||
@ -178,21 +164,6 @@ Unlike production networks, tokens on test networks do not hold real economic va
|
||||
**Wallet.** To connect with e.g. MetaMask, select "Sepolia" from the network dropdown list(enable "Show test networks").
|
||||
|
||||
|
||||
### Mumbai
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr><td>Native token</td><td>Mumbai (fake) MATIC</td></tr>
|
||||
<tr><td>Native token faucet</td><td><a href="https://faucet.matic.network/">Here</a></td></tr>
|
||||
<tr><td>OCEAN address</td><td><a href="https://mumbai.polygonscan.com/token/0xd8992Ed72C445c35Cb4A2be468568Ed1079357c8">0xd8992Ed72C445c35Cb4A2be468568Ed1079357c8</a></td></tr>
|
||||
<tr><td>OCEAN faucet</td><td><a href="https://faucet.mumbai.oceanprotocol.com/">Here</a></td></tr>
|
||||
<tr><td>Explorer</td><td><a href="https://mumbai.polygonscan.com">https://mumbai.polygonscan.com</a></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
**Wallet.** To connect with e.g. MetaMask, select "Görli" from the network dropdown list. If it's not listed as a predefined network, follow [Polygon's guide](https://polygon.technology/blog/getting-started-with-metamask-on-polygon).
|
||||
|
||||
|
||||
### Oasis Sapphire Testnet
|
||||
|
||||
[Ocean Predictoor](../../predictoor/README.md) is deployed on Oasis Sapphire testnet. This deployment does do not currently support ocean.js, ocean.py, or Ocean Market.
|
||||
|
@ -116,7 +116,7 @@ http {
|
||||
|
||||
#### 1.6 Create Kubernetes secret in C2D server
|
||||
|
||||
Login into the compute-to-data enviroment and run the following command with the appropriate credentials:
|
||||
Login into the compute-to-data environment and run the following command with the appropriate credentials:
|
||||
|
||||
```bash
|
||||
kubectl create secret docker-registry regcred --docker-server=example.com --docker-username=<username> --docker-password=<password> --docker-email=<email_id> -n ocean-compute
|
||||
|
@ -224,7 +224,7 @@ kubectl apply -f operator-engine/kubernetes/binding.yml
|
||||
kubectl apply -f operator-engine/kubernetes/operator.yml
|
||||
```
|
||||
|
||||
**Optional**: For production enviroments, it's safer to block access to metadata. To do so run the below command:
|
||||
**Optional**: For production environments, it's safer to block access to metadata. To do so run the below command:
|
||||
|
||||
```bash
|
||||
kubectl -n ocean-compute apply -f /ocean/operator-engine/kubernetes/egress.yaml
|
||||
|
@ -286,8 +286,7 @@ Aquarius supports indexing multiple chains using a single instance to serve API
|
||||
The following deployment templates could be used for guidance. Some parameters are [optional](https://github.com/oceanprotocol/aquarius) and the template could be adjusted based on these considerations. Common cases are the deployments for one/multiple Ethereum networks:
|
||||
|
||||
* Mainnet
|
||||
* Goerli
|
||||
* Mumbai
|
||||
* Sepolia
|
||||
|
||||
a. Create a YAML file for Aquarius configuration.
|
||||
|
||||
@ -396,9 +395,9 @@ spec:
|
||||
terminationGracePeriodSeconds: 30ya
|
||||
```
|
||||
|
||||
Example deployment for _Mumbai_ (Polygon testnet):
|
||||
Example deployment for Sepoia (Polygon testnet):
|
||||
|
||||
* [aquarius-events-mumbai-deployment.yaml](https://github.com/oceanprotocol/aquarius/blob/update-deploy-docs/deployment/aquarius-events-mumbai-deployment.yaml) (annotated) - this deployment will be responsible for indexing the block and storing the metadata published on-chain:
|
||||
* [aquarius-events-sepolia-deployment.yaml](https://github.com/oceanprotocol/aquarius/blob/update-deploy-docs/deployment/aquarius-events-sepolia-deployment.yaml) (annotated) - this deployment will be responsible for indexing the block and storing the metadata published on-chain:
|
||||
|
||||
```yaml
|
||||
apiVersion: apps/v1
|
||||
@ -406,15 +405,15 @@ kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
labels:
|
||||
app: aquarius-events-mumbai
|
||||
name: aquarius-events-mumbai
|
||||
app: aquarius-events-sepolia
|
||||
name: aquarius-events-sepolia
|
||||
spec:
|
||||
progressDeadlineSeconds: 600
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 5
|
||||
selector:
|
||||
matchLabels:
|
||||
app: aquarius-events-mumbai
|
||||
app: aquarius-events-sepolia
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 25%
|
||||
@ -424,7 +423,7 @@ spec:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
app: aquarius-events-mumbai
|
||||
app: aquarius-events-sepolia
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
@ -459,9 +458,9 @@ spec:
|
||||
- name: ALLOWED_PUBLISHERS
|
||||
value: '[""]'
|
||||
- name: NETWORK_NAME
|
||||
value: mumbai
|
||||
value: sepolia
|
||||
- name: EVENTS_RPC
|
||||
value: https://polygon-mumbai.infura.io/v3/< INFURA ID > => or another RPC service for this network
|
||||
value: https://polygon-sepolia.infura.io/v3/< INFURA ID > => or another RPC service for this network
|
||||
- name: METADATA_UPDATE_ALL
|
||||
value: "0"
|
||||
- name: ASSET_PURGATORY_URL
|
||||
@ -474,7 +473,7 @@ spec:
|
||||
value: 0xd8992Ed72C445c35Cb4A2be468568Ed1079357c8
|
||||
- name: SUBGRAPH_URLS
|
||||
value: |
|
||||
{"80001": "https://v4.subgraph.mumbai.oceanprotocol.com"} => or your own deployed Ocean Subgraph service for this network
|
||||
{"80001": "https://v4.subgraph.sepolia.oceanprotocol.com"} => or your own deployed Ocean Subgraph service for this network
|
||||
- name: BLOCKS_CHUNK_SIZE
|
||||
value: "3500"
|
||||
- name: EVENTS_HTTP
|
||||
@ -491,7 +490,7 @@ spec:
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
name: aquarius-events-mumbai
|
||||
name: aquarius-events-sepolia
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
protocol: TCP
|
||||
@ -535,9 +534,9 @@ kubectl get pods -l app=aquarius
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
aquarius-6fd9cc975b-fxr4d 1/1 Running 0 1d
|
||||
|
||||
kubectl get pods -l app=aquarius-events-mumbai
|
||||
kubectl get pods -l app=aquarius-events-sepolia
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
aquarius-events-mumbai-8748976c4-mh24n 1/1 Running 0 1d
|
||||
aquarius-events-sepolia-8748976c4-mh24n 1/1 Running 0 1d
|
||||
```
|
||||
|
||||
Check the logs for newly deployed Aquarius by running the following command:
|
||||
@ -545,7 +544,7 @@ Check the logs for newly deployed Aquarius by running the following command:
|
||||
```bash
|
||||
$ kubectl logs aquarius-6fd9cc975b-fxr4d [--follow]
|
||||
|
||||
$ kubectl logs aquarius-events-mumbai-8748976c4-mh24n [--follow]
|
||||
$ kubectl logs aquarius-events-sepolia-8748976c4-mh24n [--follow]
|
||||
```
|
||||
|
||||
c. Create a Kubernetes service
|
||||
|
@ -1,71 +0,0 @@
|
||||
# Deploying Marketplace
|
||||
|
||||
### Prerequisites
|
||||
|
||||
* A server for hosting Ocean Marketplace. See [this guide](setup-server.md) on creating a server.
|
||||
* Obtain API key for wanted network. See [this guide](../developers/obtaining-api-keys-for-blockchain-access.md) for this.
|
||||
|
||||
### Push your customized Ocean Market code to your Git repository
|
||||
|
||||
In case you customized the Ocean Market using the tutorial from this chapter (link), push your code to a Git repository.
|
||||
|
||||
### Create a directory
|
||||
|
||||
```bash
|
||||
mkdir my-marketplace
|
||||
cd my-marketplace
|
||||
```
|
||||
|
||||
### Create a file with the name \`.env\`
|
||||
|
||||
If you already created the .env file as instructed in ...(link to customize the market chapter), you can skip this step, otherwise copy the below content into the \`.env\` file.
|
||||
|
||||
{% code title=".env" overflow="wrap" %}
|
||||
```bash
|
||||
# Update this value if your Market should use custom Aquarius
|
||||
NEXT_PUBLIC_METADATACACHE_URI=https://v4.aquarius.oceanprotocol.com
|
||||
|
||||
# Provide INFURA project ID from the obtained API key for NEXT_PUBLIC_INFURA_PROJECT_ID
|
||||
#NEXT_PUBLIC_INFURA_PROJECT_ID="xxx"
|
||||
#NEXT_PUBLIC_MARKET_FEE_ADDRESS="0xxx"
|
||||
#NEXT_PUBLIC_PUBLISHER_MARKET_ORDER_FEE="1"
|
||||
#NEXT_PUBLIC_CONSUME_MARKET_ORDER_FEE="1"
|
||||
#NEXT_PUBLIC_CONSUME_MARKET_FIXED_SWAP_FEE="1"
|
||||
|
||||
#
|
||||
# ADVANCED SETTINGS
|
||||
#
|
||||
|
||||
# Toggle pricing options presented during price creation
|
||||
#NEXT_PUBLIC_ALLOW_FIXED_PRICING="true"
|
||||
#NEXT_PUBLIC_ALLOW_FREE_PRICING="true"
|
||||
|
||||
# Privacy Preference Center
|
||||
#NEXT_PUBLIC_PRIVACY_PREFERENCE_CENTER="true"
|
||||
```
|
||||
{% endcode %}
|
||||
|
||||
### Create a \`Dockerfile\` file and copy the below content into it.
|
||||
|
||||
In the following Dockerfile, replace \<YOUR\_GIT\_REPO\_URL> with the url of your Ocean Market fork repository or use "https://github.com/oceanprotocol/market.git" if you want to deploy the standard image of Ocean Market.
|
||||
|
||||
<pre class="language-docker" data-title="Dockerfile"><code class="lang-docker">FROM node:16
|
||||
<strong>RUN git clone <YOUR_GIT_REPO_URL> /usr/app/market
|
||||
</strong>WORKDIR /usr/app/market
|
||||
RUN npm ci --legacy-peer-deps
|
||||
RUN npm run build
|
||||
EXPOSE 3000
|
||||
CMD ["npx", "next", "start"]
|
||||
</code></pre>
|
||||
|
||||
### Build a docker image
|
||||
|
||||
```bash
|
||||
docker build . -f Dockerfile -t market:latest
|
||||
```
|
||||
|
||||
### Start the marketplace
|
||||
|
||||
```bash
|
||||
docker start market
|
||||
```
|
@ -27,7 +27,7 @@ Ocean Subgraph is deployed on top of [graph-node](https://github.com/graphprotoc
|
||||
|
||||
From a terminal console, create the _/etc/docker/compose/graph-node/docker-compose.yml_ file, then copy and paste the following content to it (. Check the comments in the file and replace the fields with the specific values of your implementation.
|
||||
|
||||
_/etc/docker/compose/graph-node/docker-compose.yml_ (annotated - example for `mumbai` network)
|
||||
_/etc/docker/compose/graph-node/docker-compose.yml_ (annotated - example for `sepolia` network)
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
@ -48,9 +48,9 @@ services:
|
||||
postgres_host: postgres-graph
|
||||
postgres_user: graph-node
|
||||
postgres_pass: < password >
|
||||
postgres_db: mumbai
|
||||
postgres_db: sepolia
|
||||
ipfs: 'ipfs:5001'
|
||||
ethereum: 'mumbai:https://polygon-mumbai.infura.io/v3/< INFURA ID >'
|
||||
ethereum: 'sepolia:https://sepolia.infura.io/v3/<API-KEY>'
|
||||
GRAPH_LOG: info
|
||||
ipfs:
|
||||
image: ipfs/go-ipfs:v0.4.23
|
||||
@ -70,7 +70,7 @@ services:
|
||||
environment:
|
||||
POSTGRES_USER: graph-node
|
||||
POSTGRES_PASSWORD: < password >
|
||||
POSTGRES_DB: mumbai
|
||||
POSTGRES_DB: sepolia
|
||||
volumes:
|
||||
- pgdata-graph-node:/var/lib/postgresql/data
|
||||
volumes:
|
||||
@ -196,7 +196,7 @@ It is recommended to deploy PostgreSQL as helm chart.
|
||||
|
||||
References: [https://github.com/bitnami/charts/tree/main/bitnami/postgresql/#installing-the-chart](https://github.com/bitnami/charts/tree/main/bitnami/postgresql/#installing-the-chart)
|
||||
|
||||
Once PostgreSQL pods are running, a database must be created: eg. `mumbai.`
|
||||
Once PostgreSQL pods are running, a database must be created: eg. `sepolia.`
|
||||
|
||||
#### 2. Deploy IPFS
|
||||
|
||||
@ -317,15 +317,15 @@ kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
labels:
|
||||
app: mumbai-graph-node
|
||||
name: mumbai-graph-node
|
||||
app: sepolia-graph-node
|
||||
name: sepolia-graph-node
|
||||
spec:
|
||||
progressDeadlineSeconds: 600
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 10
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mumbai-graph-node
|
||||
app: sepolia-graph-node
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 25%
|
||||
@ -335,7 +335,7 @@ spec:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
app: mumbai-graph-node
|
||||
app: sepolia-graph-node
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
@ -350,7 +350,7 @@ spec:
|
||||
- name: postgres_db
|
||||
value: < postgresql database >
|
||||
- name: ethereum
|
||||
value: mumbai:https://polygon-mumbai.infura.io/v3/< INFURA ID>
|
||||
value: sepolia:https://sepolia.infura.io/v3/< INFURA ID>
|
||||
- name: GRAPH_KILL_IF_UNRESPONSIVE
|
||||
value: "true"
|
||||
image: graphprotocol/graph-node:v0.28.2
|
||||
@ -365,7 +365,7 @@ spec:
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
name: mumbai-graph-node
|
||||
name: sepolia-graph-node
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
name: graphql
|
||||
@ -407,8 +407,8 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: mumbai-graph-node
|
||||
name: mumbai-graph-node
|
||||
app: sepolia-graph-node
|
||||
name: sepolia-graph-node
|
||||
spec:
|
||||
clusterIP:
|
||||
clusterIPs:
|
||||
@ -426,7 +426,7 @@ spec:
|
||||
- name: metrics
|
||||
port: 8040
|
||||
selector:
|
||||
app: mumbai-graph-nodeyam
|
||||
app: sepolia-graph-nodeyam
|
||||
```
|
||||
|
||||
## Deploy Ocean Subgraph
|
||||
@ -460,26 +460,25 @@ npm i
|
||||
|
||||
#### 4. Deploy Ocean Subgraph
|
||||
|
||||
In the following example, we are deploying on Ocean Subgraph on graph-node running for `mumbai` testnet.
|
||||
In the following example, we are deploying on Ocean Subgraph on graph-node running for `sepolia` testnet.
|
||||
|
||||
Note: for `ocean-subgraph` deployment in the Kubernetes environment, both `graph-node` and `ipfs` services must be locally forwarded using `kubectl port-forward` command.
|
||||
|
||||
Run the following command:
|
||||
|
||||
```bash
|
||||
$ npm run quickstart:mumbai
|
||||
$ npm run quickstart:sepolia
|
||||
|
||||
> ocean-subgraph@3.0.8 quickstart:mumbai
|
||||
> node ./scripts/generatenetworkssubgraphs.js mumbai && npm run codegen && npm run create:local && npm run deploy:local
|
||||
> ocean-subgraph@3.0.8 quickstart:sepolia
|
||||
> node ./scripts/generatenetworkssubgraphs.js sepolia && npm run codegen && npm run create:local && npm run deploy:local
|
||||
|
||||
Creating subgraph.yaml for mumbai
|
||||
Creating subgraph.yaml for sepolia
|
||||
Adding veOCEAN
|
||||
Skipping polygon
|
||||
Skipping bsc
|
||||
Skipping energyweb
|
||||
Skipping moonriver
|
||||
Skipping mainnet
|
||||
Skipping goerli
|
||||
Skipping polygonedge
|
||||
Skipping gaiaxtestnet
|
||||
Skipping alfajores
|
||||
|
@ -11,7 +11,7 @@ As mentioned in the Setup a Server document, all Ocean components can be deploye
|
||||
|
||||
## Deploying Provider using Docker Engine and Docker Compose
|
||||
|
||||
In this guide, we will deploy Provider for two chains: Goerli (Ethereum test network) and Mumbai (Polygon test network). Therefore, please note that in the following configuration files, "5" and "80001" are the chain IDs for Goerli and Mumbai respectively.
|
||||
In this guide, we will deploy Provider for Sepolia (Eth test network). Therefore, please note that in the following configuration files, "11155111" is the chain ID for Sepolia.
|
||||
|
||||
|
||||
### Prerequisites
|
||||
@ -51,8 +51,8 @@ services:
|
||||
backend:
|
||||
environment:
|
||||
ARTIFACTS_PATH: "/ocean-contracts/artifacts"
|
||||
NETWORK_URL: '{"5":"https://goerli.infura.io/v3/<your INFURA project id>","80001":"https://polygon-mumbai.infura.io/v3/<your INFURA project id>"}'
|
||||
PROVIDER_PRIVATE_KEY: '{"5":"<your private key>","80001":"<your private key"}'
|
||||
NETWORK_URL: '{"80001":"https://sepolia.infura.io/v3/<your INFURA project id>"}'
|
||||
PROVIDER_PRIVATE_KEY: '{"80001":"<your private key"}'
|
||||
LOG_LEVEL: DEBUG
|
||||
OCEAN_PROVIDER_URL: 'http://0.0.0.0:8030'
|
||||
OCEAN_PROVIDER_WORKERS: "1"
|
||||
@ -190,7 +190,7 @@ $ docker logs --follow provider
|
||||
## Deploying Provider using Kubernetes with Docker Engine
|
||||
|
||||
|
||||
In this example, we will run Provider as a Kubernetes deployment resource. We will deploy Provider for two chains: Goerli (Ethereum test network) and Mumbai (Polygon test network). Therefore, please note that in the following configuration files, "5" and "80001" are the chain IDs for Goerli and Mumbai respectively.
|
||||
In this example, we will run Provider as a Kubernetes deployment resource. We will deploy Provider for Sepolia (Eth test network). Therefore, please note that in the following configuration files, "11155111" is the chain ID for Sepolia.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
@ -245,7 +245,7 @@ spec:
|
||||
value: /ocean-provider/artifacts
|
||||
- name: NETWORK_URL
|
||||
value: |
|
||||
{"5":"https://goerli.infura.io/v3/<your INFURA project id>","80001":"https://polygon-mumbai.infura.io/v3/<your INFURA project id>"}
|
||||
{"80001":"https://sepolia.infura.io/v3/<your INFURA project id>"}
|
||||
- name: PROVIDER_PRIVATE_KEY
|
||||
value: |
|
||||
{"5":"<your private key>","80001":"<your private key>"}
|
||||
|