Here’s why you should monetize your data over the blockchain

A step-by-step guide on publishing your first dataset on Ocean Market

Jamie
Ocean Protocol

--

Have you ever wondered how to make money over the blockchain? If you have datasets to sell, you will be amazed at how simple the process is. The blockchain often sounds like a complex and abstract concept that requires a lot of technical knowledge. In reality, interacting and selling datasets over the blockchain is an incredibly straightforward process that only has a couple of unfamiliar steps.

In this article, we will walk you through the steps to publish and sell your datasets via Ocean Protocol, which is a World Economic Forum Technology Pioneer.

Ocean puts you in control

We understand that many companies don’t feel comfortable sharing or selling data. This is because sharing data is perceived to be a risk — the risk of either losing your competitive advantage or violating strict data privacy regulations. This is why we have been driven to build you the tools so that sharing data means gaining control and preserving privacy.

Ocean Protocol gives you complete control of your data by removing any third parties from the process, selling data over the blockchain is completely decentralised. As we will demonstrate below, Ocean also gives you a super easy-to-use marketplace for selling your data. This reduces the barriers to entry and brings you customers for your data assets.

From the very beginning, Ocean has strived to put you in control of your data, we are on a mission to break the black-box data selling model of Facebook and others. We achieve this through the core concepts of access control, orchestration and decentralization. With access control and orchestration, any data or AI service can be shared under the conditions set by the owner of data. There is no central intermediary, which ensures no one can interfere with the transaction and both the publisher and user have transparency.

So much more than a typical data market

By leveraging the capabilities of blockchain, Ocean Protocol offers you so much more control than a typical data market. The gatekeeper to accessing your data is a smart contract, which is an immutable piece of code running on the blockchain that no one is able to change. You can have confidence that the terms and conditions to access your dataset can never be altered by an intermediary.

While Ocean Market is a great place for selling data, we also understand that some data is too sensitive to be shared — potentially due to GDPR or other reasons. For these types of datasets, we offer a unique service called compute-to-data. This enables you to monetise the dataset that sits behind a firewall without ever revealing the raw data to the consumer. Researchers and data scientists pay to run their algorithms on the data set and the computation is performed behind a firewall, all they receive is the results generated by the algorithm.

How to publish a dataset on Ocean Market

Tutorial Sections1. Introduction
2. Setup Your Wallet
3. Add Ether cryptocurrency to your wallet
4. Publish your data asset on Ocean Market
4.1 Connect your account
4.2 Enter your dataset information into the publish form
4.3 Sign the transactions & publish your dataset
5. Decide on pricing type
5.1 Fixed pricing
5.2 Dynamic pricing
6. Create fixed pricing for a data set
7. All done!

1. Introduction

Ocean Market provides a convenient and familiar interface for you to publish and sell your data. If you haven’t seen it before, now is a good time to have a look at the site. You’ll find it looks a lot like any other data marketplace — running the blockchain doesn’t compromise usability.

What you decide to sell via Ocean is entirely up to you. The dataset can comprise images, location information, audio, video, sales data, or combinations of them all. There is no exhaustive list of what type of data can be published, you can be as creative as you want. Just make sure that the data you’re selling is legal and not in breach of copyright or other regulations, our policies can be found here.

There are only a few unfamiliar things you need to get used to when selling data over the blockchain:

  • Every interaction with the blockchain costs money. There is no centralised company controlling the system that is going to pay for computation and server costs, so the user must pay. This is called the gas fee — it’s basically like putting gas into your car to make it run.
  • You need to have a wallet to store the cryptocurrency that you will be paying for these gas fees. This can easily be set up as a browser extension.
  • Each time you interact with the blockchain, you will be asked to “sign” a transaction. This is the process where you pay the gas fees and verify the origin of the transaction. It is equivalent to being asked to enter your pin when you pay with a credit card.

If you’re familiar with the blockchain space, you may be wondering which blockchain Ocean Protocol uses. It was originally deployed on Ethereum but we have since deployed to four other chains, and there will be more to come in the future.

It is important to note that the gas cost associated with signing transactions on different blockchains varies significantly. For the purpose of this guide, we will be focusing on how to publish datasets on the Ethereum blockchain, as it is the most ubiquitous. However — it is also the most expensive. If you would like to explore a cheaper option, we would recommend reading our blog post on using Polygon. We also have instructions in our documentation on how to transfer funds from Ethereum to Polygon (via a bridge).

2. Setup Your Wallet

Let’s start with getting your wallet set up to interact with the blockchain. After this, the process of publishing a dataset is very familiar — it just requires filling out a form.

  1. Go to your browser’s web store for extensions and search for MetaMask.

2. Install MetaMask. The wallet provides a friendly user interface that will help you through each step. MetaMask gives you two options: importing an existing wallet or creating a new one. Choose to Create a Wallet:

3. In the next step create a new password for your wallet. Read through and accept the terms and conditions.

4. Once your wallet is set up, MetaMask will show your Secret Backup Phrase. It is very important that you write this down (ideally more than once) on paper (don’t save it on your computer) and store it somewhere safe. If you forget your password or lose access to your computer, this is the only way to regain access to your cryptocurrency.

5. Continue forward. On the next page, MetaMask will ask you to confirm the backup phrase — this phase is very important so they’re checking you’ve actually written it down. Select the words in the correct sequence.

6. Voila! Your account setup is complete. You can access MetaMask via the browser extension in the top right corner of your browser.

7. You can now manage Ether and Ocean Tokens with this wallet. You can copy your account address to the clipboard from the options. When you want someone to send Ether or Ocean Tokens to you, you will have to give them that address.

If you feel you need some more help setting up your MetaMask wallet, you can also watch our tutorial video snippets and view these instructions on our documentation.

3. Add Ether cryptocurrency to your wallet

There are many places where you can purchase cryptocurrency and you may have used some of them before. To keep things simple, we will purchase Ether from within MetaMask. It’s easy to buy cryptocurrency in MetaMask with your credit card or Apple/Android pay. Here are the steps:

  1. Open Metamask and click “Buy”

2. MetaMask gives you a few different options, which you’ll see here. Wyre (the first option on the list) is fast and easy to use so let’s click “Continue with Wyre”

3. Now enter the amount of Ether that you would like to purchase and the currency that you will be paying in. At this point, you will also need to tick to accept the terms and conditions.

4. Now you need to enter your personal payment details — name, address, credit card number etc.

5. All you have to do is click “Accept” and Wyre will process the payment and send you your cryptocurrency.

Once the payment processing is complete you will now see that your balance in MetaMask is no longer zero.

4. Publish your data asset on Ocean Market

Great — so you’ve got your wallet set up and you’ve bought some cryptocurrency. You are now ready to publish your dataset on Ocean Market. Head on over to the site and let’s get going!

4.1 Connect your account

The first step is to connect your wallet to the site. This is the equivalent of logging in on a traditional site. This lets Ocean Market know the public address that’s associated with your Ethereum account.

You’ll see that Ocean Market gives you a few different options for the type of wallet that you want to connect. In our case, we will click MetaMask as that is the wallet that we have set up.

MetaMask will now ask you to select the account that you would like to connect to Ocean Market — this is only relevant if you have more than one.

Now we need to click “Connect” to confirm that we want MetaMask to connect our account to Ocean Market. You can see here that MetaMask helpfully explains that this site is requesting to “View the addresses of your permitted accounts (required)”.

Now that your wallet is connected, you will see that your wallet address is shown in the top right-hand corner.

Click “Publish” from the top of the site and let’s start filling out the publish form.

4.2 Enter your dataset information into the publish form

The publish form is nice and straightforward and most of the fields are obvious (title, description, author etc) — they also all have descriptions of what’s expected underneath in case they’re not clear.

The link to your dataset should be entered into the “file” field. You need to take responsibility for hosting your dataset — this can be on Google Drive, Dropbox, or AWS — anywhere that it can be downloaded from. For the access type, you need to decide if customers will be allowed to buy your raw dataset or if you only want them to run computations on it behind a firewall (Compute-to-Data). It’s also advisable to enter some tags — these are keywords that help customers discover your dataset, try to think of words that people will be searching for.

The only blockchain-specific field is the datatoken name and symbol. The datatoken is the token on the blockchain that grants access to your dataset — consumers have to purchase the datatoken to have access. The name of the datatoken doesn’t really matter, it’s just important it’s unique, so it’s fine to keep the default or click refresh a couple of times until you see something you like.

You can also decide how long you would like users to have access to the dataset after their initial purchase by choosing the timeout. If you’re constantly updating your dataset you may wish to have a shorter timeout so that customers come back to purchase the latest copy.

4.3 Sign the transactions & publish your dataset

When you finish filling out the form and click submit, you will see a series of pop-ups from Metamask. This is the process of signing the transactions and paying the gas fees that were mentioned above. There are two transactions that you need to sign.

In each of these pop-ups, MetaMask shows you an estimate of how much the gas fee is likely to be. It also gives an estimate of how long the transaction is likely to take. It also shows you the functions that the transaction is carrying out. The first one is “Create Token” and the second is “Contract Interaction”. Click “confirm” on each pop-up.

Awesome — your dataset is now published! Now you see that using the blockchain isn’t so difficult after all.

5. Decide on pricing type

Once the dataset is published, you can think about how you want to set the pricing for your asset. The pricing can only be set from the Ethereum account that published the dataset. If you have multiple accounts, you need to ensure you’re still connected with the same one you used to do the publishing.

There are 2 options for setting the price of an asset on Ocean Marketplace. It is important to think carefully about which one is appropriate for your data asset. Once you set the pricing type you will not be able to change it, although you will still be able to change the price.

5.1 Fixed pricing

Fixed pricing is fairly self-explanatory — you set the price and that’s what customers pay to access your data. You can change the price at any time and customers will always have to pay the amount that you set.

5.2 Dynamic pricing

Dynamic pricing is a little more complicated as the price is determined by an automated version of an order book. This concept is called an Automated Market Marker (AMM). Under the hood, Ocean uses the Balancer AMM.

If you would like to create dynamic pricing you will need to purchase Ocean tokens so that you can provide liquidity to the AMM pool. The price that the customer pays is set by the ratio of Ocean tokens to datatokens within the pool. As more people purchase the datatokens, the ratio changes and the price increases. If you remove Ocean tokens from the pool the ratio changes in the other direction and the datatoken price goes down.

Anyone can add liquidity to the pool you have created — they are known as liquidity providers. Liquidity providers earn a share of the transaction fees when the datatoken is purchased.

6. Create fixed pricing for a data set

To keep things simple, let’s use fixed pricing for the dataset that we have just published. From the publish success page that you are on, click “Go to Data set”

Now click on “Create pricing”. This takes you to the section where you can choose either dynamic or fixed pricing.

Click on the “Fixed Price” tab at the top. Now there is a simple form for you to enter the price of your data asset. The price that you set is in Ocean tokens — this is the cryptocurrency that your customers will use to purchase your asset.

Once you have entered the price and clicked “Create Pricing” you will, once again, be presented with a series of MetaMask pops. There are three pop-ups that you need to confirm in this case: Creating the pricing, minting the datatokens, and then allowing Ocean Market to spend them (i.e. selling them on your behalf).

Once you have confirmed each of these transactions you will see the success message explaining that fixed pricing has been set.

After reloading the page you will see that your dataset is now for sale at the fixed price which you set.

7. All done!

Excellent — you’re all done! We have covered a lot in this article so well done for making it all the way to the end. You have set up your MetaMask wallet, bought Ether, published your first dataset, set the pricing and signed all of the transactions along the way.

Hopefully, now you see that publishing and selling data on the blockchain doesn’t require any advanced technical knowledge. Once you have got your MetaMask wallet set up, it is a fairly straightforward process. You have to fill out a form and click confirm on a couple of pop-ups — that’s pretty much it. Now all you need to do is notify your potential customers and start earning money from the sales!

Let’s also not lose sight of why we’re doing this — Ocean Protocol is significantly better than any centralised data exchange. It is completely decentralized and puts you in complete control. It is completely unique in enabling you to sell access to sensitive data sets without exposing the raw data (Compute-to-Data).

We are always happy to answer any questions that you may have after reading this article, the best way to get in touch is discord. We will also publish more blog posts on the advanced topics that weren’t covered here — so make sure you follow us to get the latest articles.

Follow Ocean Protocol on Twitter, Telegram, LinkedIn, Reddit, GitHub & Newsletter for project updates and announcements. And chat directly with other developers on Discord.

--

--