Data Assets on alternate chains
The default implementation of Ocean Protocol is on the Ethereum Mainnet. Datatokens can, however, also be deployed on to four other blockchains. These are: Polygon [1], Binance Smart Chain [2], Moonriver [3] and Energy Web Chain [4]. Users might want to do this either because gas fees are high on Ethereum Mainnet or because they are already part of another blockchain ecosystem.
Let's explore some of the procedures involved in deploying and/or buying Datatokens on alternate chains. While the article focuses on Polygon's Mumbai testnet, extending this to other chains largely follows the same template.
- Polygon (previously Matic) - a brief introduction
- Bridging $OCEAN over to Polygon as mOcean
- mOcean denominated Data Tokens on Ocean Market - Buying, Selling and Staking
- Exercises
- References
Polygon (previously Matic) - a brief introduction
From [1], "Polygon is a protocol and a framework for building and connecting Ethereum-compatible blockchain networks. Aggregating scalable solutions on Ethereum supporting a multi-chain Ethereum ecosystem."
Polygon is a Layer2 (L2) Blockchain that uses Ethereum Mainnet (L1) as a base layer for settlement. L2s are preferred for their speed of settlement and minimal transaction fees compared to their base layers. As a mental model, it is useful to think of L2s as independent blockchains that have their own ecosystem - smart contracts, dApps and development frameworks - with a connection to their base layer.
Bridging $OCEAN over to Polygon as mOcean
In line with the mental model outlined above, users wishing to buy or deploy Data Assets on Polygon will need a version of $OCEAN that is native to Polygon. This called mOcean (matic Ocean).
$OCEAN on Ethereum Mainnet can be converted to mOcean (Matic Ocean) using a Polygon "Bridge". You will first need to add Polygon to the list of chains that your Metamask Wallet can connect to.
Select the Icon next to "Rinkeby Test Network" on your Metamask Wallet to open up the selection panel shown below. Select "Add Network".
Fill in the links below with URLS and information from the official Polygon documentation [5] as reproduced below.
Repeat this procedure with a different RPC URL and ID to add Polygon Mumbai Testnet to your list of Networks. The details are shown below.
Your list of Networks in Metamask should reflect Polygon Mumbai Testnet and Polygon Mainnet. Select Polygon Mainnet as your Network in Metamask.
Having completed these steps, navigate to https://wallet.polygon.technology/ and select "Polygon Wallet".
This will bring up a page that gives you the option to select your Metamask Wallet. This is similar to the procedure you first encountered when connecting to Ocean Market with your Metmask Wallet. Metamask will try to confirm that you trust the dApp that you are connecting to. Confirm the transaction to open up the Polygon Wallet dApp as shown below. Select the "Bridge" option on the left to open up the following screen.
In the "Ethereum Chain" field, you should see your $OCEAN balance in mOCEANs. Enter the amount that you would like to bridge over to Polygon chain in the "Ocean Token" field and click on "Transfer". You should see an information pop-up that tells you how much time the transfer might take and what's allowed to be transferred. In the final step before transfer, the wallet will let you know how much in Gas fees you will be paying for this transaction.
As you can see, Gas fees are very steep (as of this writing), so proceed with caution. Upon completion of this transaction, however, your wallet should contain mOCEANs minus any Gas fees. Changing your network to Polygon Mainnet on Metamask should now reflect your balance of mOCEANs. With this step done, you are ready to transact on Ocean Market with mOCEAN denominated assets.
mOcean denominated Data Tokens on Ocean Market - Buying, Selling and Staking
Having confirmed that you have mOCEANs in your wallet, select the "Polygon" and "Polygon Mumbai" options in Ocean Markets' Network options as shown below. You will also need to point your Metamask Wallet to Polygon Mainnet / Mumbai testnet to enable transactions.
From this point on, the user experience on Ocean Market for buying, selling and staking remains exactly the same as in previous sections. The only major difference is that tokens are denominated in mOCEANs and transactions are confirmed on Polygon rather than directly on Ethereum mainnet. The Token page for MARPEL-48 on Ocean Market is shown below with relevant parts highlighted.
The price of this token as of this writing is ~2.07 mOCEAN and it is deployed on Polygon mainnet.
A similar procedure described for Polygon above will be used for other Networks mentioned in the introduction. Ocean Protocol has a set of tutorials that explain bridging using Binance Smart Chain [2] for interested readers.
There is no straightforward way to minimize bridging costs except for finding CExes that buy and sell on the native chain and swapping the tokens for OCEAN on respective chains.
Bridging and its associated costs and inconveniences can be a major deterrent for users wanted to move assets across chains. I anticipate that things will get better and cheaper (as they always do in technology) as more people, ideas and solutions enter the open market. For the time being, however, I hope the explanation provided above was sufficient in the event you might want to bridge over to an alternate chain.
That brings us to the end of this no-code guide to Data DeFi on Ocean Market.
Let's wrap it up in the next section. Alternately, you might want to go back to the Table of Contents to give the guide a once-over.
Exercises
- If you're interested in buying MATIC on native Polygon network, go through this exercise [7]
- Compare the process of briding $OCEAN to mOCEAN using a Polygon bridge to natively swapping MATIC for $OCEAN on Polygon - How much would you end up saving for getting the same amount of mOCEAN?
- Think about the savings in transaction costs and then read more about layer 2 solutions like Arbitrum and Polygon as well as alternate layer 1 solutions like Solana, Avalanche and Terra. Try to make a future prediction for yourself - do you think Ocean Protocol will deploy on one of these networks in the future. Take a look at the Ocean Roadmap [8] and decide for yourself.
References
- Polygon - https://polygon.technology/
- Binance Smart Chain - https://www.binance.org/en/smartChain
- Moonriver - https://moonbeam.network/networks/moonriver/
- Energy Web Chain - https://www.energyweb.org/
- Adding Polygon Mainnet and Mumbai Testnet to Metamask - https://blog.polygon.technology/polygon-rpc-gateway-will-provide-a-free-high-performance-connection-to-the-polygon-pos-blockchain/ and https://docs.polygon.technology/docs/develop/metamask/config-polygon-on-metamask
- Bridging Ocean to Binance Smart Chain - https://docs.oceanprotocol.com/tutorials/bsc-bridge/
- Buying MATIC on Polygon Network - https://medium.com/@nifty.pixels/getting-matic-on-the-polygon-network-with-crypto-com-48374d4d78d5
- Ocean Protocol Development Roadmap - https://oceanprotocol.com/technology/roadmap