Integrating with Polygon

Multi-network route

Robson Silva
Pods
Published in
5 min readJun 2, 2021

--

DeFi, the magic of composable internet money, is growing into a better financial system for humanity. We are removing barriers, pooling liquidity worldwide, and bringing people together to use the most innovative financial system ever imagined. However, the ideal world we all aim for seems to be constrained by infrastructure limitations.

Current gas fees make transactions almost prohibitively expensive for regular users. As long as this is a blocker, we’ll not achieve our mission.

Source: Etherscan, June 2nd 2021. https://etherscan.io/chart/gasprice

Technologies such as DeFi and the internet often start as something expensive and niched. So far, the high gas costs represent both a limitation and a strong signal of how desired those solutions are.

“No one goes there anymore. It’s too crowded.”

-Yogi Berra

It is not the first time that we have seen high transaction costs. Back in 2017, with the ICO boom and the CryptoKitties craze, we saw similar behavior. At that moment, some projects started to build solutions that we know nowadays as Layer 2. Thanks to the effort and dedication of these teams, we can now choose among various solutions for scalability. Each one has its pros and cons and should be studied closely. Polygon is one of these solutions.

Polygon aims to be a flexible framework that supports building and connecting secured chains like Plasma, Optimistic Rollups, zkRollups, Validium, etc. For now, we will use the Sidechain Matic PoS, which is currently ~100x cheaper than Ethereum.

This blog post aims to share the thought process behind the first step towards Pods’ scalability journey.

Starting with Polygon

The basic reasoning behind deciding to do the Demo Release on the Polygon network is to give users an alternative to Ethereum’s current high gas fees. In the future, if users don’t feel comfortable using Polygon, they can always go back to Ethereum’s Mainnet and use the Pods app there.

Though we had many projects to start with, Polygon has a set of elements that led us to choose them.

Integration

Polygon already supports three of our partners:

  • Chainlink, which we use as a price provider for our option pricing.
  • TheGraph, which we use for our transaction history section.
  • Aave, which enables our protocol to increase the overall yield for options sellers and LPs.

The availability of these tools and protocols there makes our integration process smoother on the tech side.

Pods' Transaction screen using TheGraph

Composability

Aave announced its launch with Polygon on March, 31. Since our options tokens can use aTokens as collateral, it would be perfect for testing the max of the composability aspect by putting your funds to earn more interest on top of your aTokens.

Liquidity

Liquidity is one of the main traction indicators and also brings us the possibility of offering more underlying and collateral assets. We can see below how Polygon is dominating the L2 space:

Source: TheBlock research

Limitations

We are aware that Polygon is not a perfect solution and has certain limitations with its use. The limitations we currently evaluate are:

  • Decentralization. There are several metrics to compare decentralization in-depth, and this topic alone deserves an entire blog post. Still, it is no brainer that Polygon is not as decentralized as Ethereum (100 validators x more than 150,000 validators in Ethereum, only considering ETH2.0).
  • User experience. Bridging assets from Mainnet in Ethereum to Polygon Mainnet can be costly and time-consuming. Zapper bridge has a great UX for doing so. We also created a detailed video to help users on the traditional path.
  • Limited liquidity. Ethereum Mainnet has far more liquidity than Polygon.
  • Security. In comparison to Rollups, L2 execution and L1 data updates do not advance in lockstep in the sidechain approach. If you want to deep dive and learn more about L2 solutions, you can check here.

For our first step on the scalability journey, the limitations seemed less damaging than the users’ potential benefits. Knowing our contracts’ gas consumption, logic, and limits of the Demo Release, we realized that users could be uncomfortable with the transaction costs on Ethereum Mainnet. Polygon offers an alternative to this discomfort in the early days of the Demo Release.

What is next

Pods will continue looking for alternatives to improve our users’ experience. Transaction costs play a significant role here. We will keep following the new technologies, and integration will be one of our main focuses to bring you the ability to hedge, regardless of the layer you have chosen.

App Testing

If you want to simulate functionalities behind our app, you can do it in a costless way using testnets. The Pods protocol is currently live on Mumbai (Polygon’s Testnet) and Kovan (Ethereum's testnet).

Find a tutorial for testing on Polygon here.

Connecting Mumbai to your Browser wallet.

Using Pods demo on Polygon

There are some ways in which you can bridge your tokens from Ethereum to Polygon. We recommend using (1) Zapper Bridge for a simple UX or (2) Matic v2 Official bridge.

(1) For now, Zapper’s new Bridge functionality only supports an L1 to L2 bridge direction, not the other way around.

Zapper bridge

(2) Check the video below for a more detailed tutorial on bridging funds with the Matic Official bridge.

Hint: if you bridge any ERC20 token, you will earn some Matic tokens on L2 to pay for the transaction fees. That amount should be enough for at least your 50 first transactions.

Below you can find helpful links to other bridge alternatives:

That’s all for now 🤗

We’d love to hear from you about other scalability solutions you think we should integrate. Find us on Discord and share your thoughts!

Learn more about the risks of using Pods here.

About Pods

Pods is a decentralized non-custodial options protocol. Users can create options and trade them through an Options AMM on the Ethereum Blockchain. Pods is the easiest way to hedge crypto in DeFi.

We invite you to take the first step in your new mission: start testing the app on app.pods.finance

Join the Pods community

app | website | documentation | blog | twitter | youtube | telegram | discord

--

--