Posts

A Guide to Moving Value Between Hive & Polygon

avatar of @jfuji
25
@jfuji
·
·
0 views
·
7 min read

With the recent successful PageDAO grant, Scholar & Scribe members now have an added incentive to learn more about the Polygon blockchain. This guide will explain why, and walk you through some basics.

  1. Why Polygon even matters
  2. How to connect to Polygon
  3. Moving assets from Polygon to Hive and vice versa
  4. What do with WETH you earn from NFTBook sales

 

🤷🏼‍♀️ Why care about Polygon (or any other chain?)

We all love Hive, but the web3 world is much, much bigger than Hive. And in order for Hive to grow and build value, we need more people involved with Hive!

Other chains also come with passionate communities of builders, makers, speculators, holders, gamers, artists… etc. When chains start to trade knowledge, talent, tokens, and “value,” they both can prosper. Kind of like trade in the physical world: nations grow stronger as they cooperate with neighbours.  

📖 PageDAO + Scholar & Scribe

S&S is a tokenized writing guild here on Hive. PageDAO is an interchain web3 publishing organization that has built some really cool tech. Their first NFTBook minter works on Polygon, which is why this guide is Polygon focused.

Let’s say an S&S author publishes their work using the Polygon Minter, and sells $100 USD worth of stories. They’re going to want to know how to either off-ramp that value into fiat, or move it into Hive, or whatever.

In the near future, PageDAO will have minters on multiple chains (including Hive, possibly!), so it’s important for a web3 writer to understand how to manage their products and value flow.  

What is Polygon?

In simple terms: it’s a blockchain based on Ethereum, but with very low gas fees. It is fully compatible with ETH “stuff,” and its native token is MATIC. (Like how Hive’s native token is HIVE).

This LeoFinance guide goes into much more detail on Polygon.

 

Accessing Polygon

If you have a MetaMask wallet (or any wallet with an ERC-20 address), then you’re already able to access Polygon. ERC-20 addresses look like this: 0xF5Ae101251a564C6259D2188fD4Bced9897Ee157

They all start with the 0x, and are terribly ugly compared to our nice human readable addresses here on Hive.

ERC-20 wallets act a lot like the Hive Keychain. You sign into ERC-20 services by signing things. You can look at token balances and send/receive. Most ERC-20 dApps will have a ‘Connect Wallet’ prompt, where we’re used to seeing ‘Login’ on our various dApps and frontends.  

➕ Add the Polygon network to your wallet

One big difference between ERC-20 dApps and Hive: there are many, many more networks and chains on ERC-20. Hive is just one chain. ERC-20 has lots of chains.

When you first set up something like MetaMask, you may only have the default chains or network connected to it: Ethereum Mainnet and several of its test networks.

To add Polygon, you need to find your “Add Network” menu and input a few things:

Network Name: Polygon New RPC URL: https://rpc-mainnet.maticvigil.com/ Chain ID: 137 Currency Symbol: MATIC Block Explorer URL: https://polygonscan.com/

In the image below, you can see I have a bunch of chains on my wallet:

 

⛽ Gassing up with SWAP.MATIC

Unlike Hive, every transaction on Polygon costs you gas fees.

As Hiveans, we’re used to free transactions. And you’d be wise to avoid chains with high gas fees unless the transaction is super important!

With Polygon, most gas fees are pretty tiny: a few cents (USD) usually.

Gas costs MATIC, and you won’t have MATIC the first time you connect, unless someone has already sent some MATIC to your ERC-20 address.

Luckily, Hive Engine has a nice supply of SWAP.MATIC that can be used to “fill up your tank” so to speak. You don’t need to worry about doing this until you’re ready to make some transactions on Polygon (e.g. minting an NFTBook!)

You’ll only need 1 or 2 MATIC to start, as most gas fees cost something like 0.02 or less MATIC.

 

(1) Acquire SWAP.MATIC on Hive Engine

I’ll assume most people know how to work with Hive Engine. Use the DEX of your choice that supports SWAP.MATIC and buy or swap it for SWAP.HIVE.

At the time of writing, there’s over $50,000 worth of liquidity in the SWAP.HIVE:SWAP.MATIC pool, so unless you’re doing some major whale business, it should serve most authors well.  

(2) Withdraw the SWAP.MATIC to your ERC-20 address

I used TribalDEX for this, but if the other DEXs out there do it, use whatever you like.

Simply hit the withdraw button, find MATIC on the list, and have your ERC-20 address handy. If it’s the first time you’re withdrawing/depositing MATIC, you may need to set up your ERC-20 address with Hive Engine through a Hive microtransaction.

Just like with Hive, triple check everything before executing any send. One small typo = funds lost. The nasty 0x ERC-20 addresses make this even more tricky, so copy and paste with care.

Once withdrawn, some small amount will be deducted for the ERC-20 gas fees, whatever fees the DEX may charge, and you’ll see the MATIC appear in your other wallet after a few minutes (not necessarily seconds like Hive! So remember to be patient).  

Depositing works the same way, in reverse

If you have MATIC and want to get it into Hive, hit the Deposit button in the Hive Engine DEX and follow instructions. SWAP.MATIC will appear in your account if you’ve done things properly, and you can turn that into SWAP.HIVE.  

📚 Selling NFTBooks on Opensea

Ultimately, this guide is about making sure S&S authors know how to capture the value from NFTBook sales.

A ‘How to Mint’ Guide will be linked eventually. But basically: once you mint your NFTBook, your Polygon ERC-20 address will receive however many NFTs you chose to mint.

First, you must list them:

  • Head to Opensea.io
  • Connect your ERC-20 wallet, ensure that the network is set to Polygon
  • Find the NFTBook(s) you want to sell in your Collection
  • Click the big blue “Sell” button
  • Fill in the fields:

Executing the listing will incur a gas fee. Your wallet will tell you what it estimates this to be, and you can reject the transaction if you don’t want to do it.

🛑 Notice that the price is in ETH

Wait, why is this listed in ETH? I thought we were on Polygon?

Welcome to yet another confusing UX/UI choice in the early world of web3 wild west.

This is an Opensea thing—your only choice for selling Polygon-based NFTs on Opensea is in the Polygon version of ETH.

This is not Mainnet ETH, it’s a “wrapped” version of ETH. Kind of like how HIVE is not SWAP.HIVE, but it’s more or less the same value.

Unfortunately, this wrapped ETH can go by several confusing names since web3 has very few standards (a price we all pay for being biased towards decentralization). You might see Polygon ETH referred to as:

  • ETH on Polygon
  • WETH
  • Ether - PoS
  • ETH

  Lovely. Step carefully!  

💱 Swapping WETH for MATIC

When someone buys your NFTBook, you’ll see the WETH on the Opensea wallet tray:

It nicely differentiates the two ETHs here, at least.

You won’t see WETH in your MetaMask wallet unless you manually import the token contract. Other wallets may already have the WETH listed or be set up to show any token with a positive balance. Not MetaMask for some reason!

The ‘import tokens’ option is usually somewhere at the bottom of your assets list. The WETH contract to add is 0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619

Now that you have a handle on your WETH, time to trade it into stuff.  

Using the online Polygon wallet

Connect your ERC-20 wallet to this dApp: https://wallet.polygon.technology/

Once connected, you’ll find a suite of DEX tools that should look pretty familiar to someone who's used a Hive DEX.

Token Swap is a key operation. Here, you can turn your WETH into MATIC and vice versa.

At the time of writing, there’s a very annoying UI issue that makes it seem like you have fewer options than are available.

Sometimes you can’t find ETH or MATIC in the swapping menu—this happens if you already have ETH or MATIC selected in the other spot. To get around this, you need to select some other random token to “free up” the choice to pick MATIC or ETH. A pretty silly oversight, and hopefully fixed one day.

Presumably, you can also use ERC-20 DEXs like Uniswap or Sushiswap to do this as well. I’ve never tried it. Just be extra mindful to ensure you’re trading the “right” kind of WETH! You will also probably need to authorize the use of WETH on these DEXs—there will be a big bright button prompting you to do so and it may cost some gas to authorize the use (one-time).

I assume, like Hive, there are a ton of alternative DEXs that will be happy to execute your swap. This is serious DYOR territory, as the liquidity and legitimacy of lesser known DEXs are all questionable.  

🌉 Bridging ETH

The Polygon wallet also has a bridge option, which lets you turn WETH into Mainnet ETH and presumably vice versa. I’ve heard horror stories of being able to wrap ETH one way but not the other, so DYOR around this feature before using.

 

💵 Turning WETH into fiat

There’s no single way to do this, since every person and every jurisdiction can have their own approach to how crypto can be traded into fiat.

Generally, you need to find a reliable “off-ramp” service that will allow for the trade of crypto to fiat, and be able to send that fiat to your financial institution of choice (or send cash!)

Most of these off-ramp systems deal with the major cryptocurrencies. So the most direct route could be to bridge WETH to ETH and sell the ETH.

But if you’re routing through Hive to avoid gas fees, a viable path that I might make is:

  • Swap WETH to MATIC
  • Deposit MATIC as SWAP.MATIC on Hive
  • Withdraw SWAP.MATIC to my off-ramp

I think I could probably skip step two though, and send the MATIC right to my off-ramp. But maybe I want to invest in some Hive stuff first. All depends on what you’re trying to do and what currencies your off-ramp supports.

 

The recap!

You should now have a good idea of how to manage the WETH you earn from selling an NFTBook.

  1. Ensure you have a secure ERC-20 wallet
  2. If needed, add the Polygon network and import the WETH token
  3. Swap or trade SWAP.HIVE to get SWAP.MATIC
  4. Withdraw a small amount (1 or 2) of SWAP.MATIC to your ERC-20 address to cover gas
  5. Mint an NFTBook and list it for sale
  6. Swap or bridge WETH proceeds into the token of choice, including back into Hive assets

You can of course just keep the WETH and use it buy Polygon NFTs on Opensea!

 

I hope you found this helpful! I screenshotted all images in this post (MetaMask, TribalDEX, Opensea, Polygon), except for the Scholar and Scribe banner icons, which were designed by @trashyomen.

Posted Using LeoFinance Beta