Polygon (MATIC) Ethereum-compatible scalable Layer-2 blockchain becomes mainstream for dApps including DeFis. Here’s why your business needs it as well - and how GetBlock accesses Polygon (MATIC) nodes.
What is Polygon (MATIC)?
Polygon (MATIC) is a unique project that should be referred to as both Ethereum-focused development stack and high-performance blockchain protocol. Technically, it represents the ecosystem of interconnected L2 solutions designed to advance Ethereum (ETH) scalability.
Technically, Polygon (MATIC) design includes two layers dubbed Bor and Heimdall. Geth fork Bor operates Polygon (MATIC) EVM-compatible sidechains while Heimdall is responsible for Proof-of-Stake in the network.
However, GetBlock customers don’t need to dive deeply into the rocket science of Polygon’s (MATIC) infrastructure design. With our solutions, every client can get reliable and fast-speed connection to Polygon (MATIC) nodes seamlessly in a number of clicks.
Image by GetBlock
What’s the difference between Polygon (MATIC) and Ethereum?
Full Ethereum (ETH) compatibility is amidst numerous ‘killing features’ of Polygon (MATIC). Developers of decentralized applications can easily move their products from Ethereum (ETH) to Polygon (MATIC) with zero extra expertise:
If you're an Ethereum developer, you're already a Polygon developer.
At the same time, Polygon-based decentralized applications are way more cost-efficient, scalable, and speedy that Ethereum-based ones.
Prominent investor, managing partner of Dragonfly Capital, ex-AirBnB’s Hoseeb Qureshi, shared his calculations of Polygon’s transactional costs:
Right now on Polygon, a simple Uniswap-style trade costs $0.0001. On Binance Smart Chain, it costs $0.20. On Ethereum, it costs about $7. And on Optimism, it’ll cost around $0.68.
Source: Haseeb Qureshi
At the same time, things have only started for Polygon (MATIC) as they are planning to integrate the entire stack of Layer-2 scalability solutions for Ethereum (ETH) available now.
Here’s how GetBlock accesses node of Polygon Network (MATIC)
GetBlock allows its users to seamlessly access blockchain nodes with API keys via an intuitive dashboard. To display our opportunities, we will experiment with Aave Matic Contract of USD Coin (USDC) stablecoin, a synthetic stablecoin asset by Aave Finance (AAVE) created to ease the ‘yield farming’ on Polygon.
In terms of accurate coordinates, we will check the ‘0x2791bca1f2de4661ed88a30c99a7a9449aa84174’ balance of ‘0x1a13f4ca1d028320a707d99520abfefca3998b7f’ account.
Just like in our demo for Binance Smart Chain (that gained notable popularity), we choose the Polygon (MATIC) node and input the API key.
Image by GetBlock
Then, we call ‘balanceOf’ function which demonstrates the balance of particular account for a certain token,
ABI (application binary interface) is an interface utilized to call for the functions through Web3.js library.
API key is a key utilized by our service to identify the users who interact with blockchains via GetBlock.
Once launched, the abovementioned command demonstrates the value of the account with 252 mln of USD-pegged stablecoins. Its accuracy can be verified by Polygon (MATIC) explorer services.
To try the functionality of this instrument, we invite all tech-savvy users to experiment with forking our code: https://replit.com/@getblock/PolygonOfERC20?v=1 (‘Fork’ button is located in the upper right corner).