Logo

dev-resources.site

for different kinds of informations.

How Polygon Blockchain works...

Published at
2/3/2024
Categories
polygon
web3
layer2
ethereum
Author
sksabir
Categories
4 categories in total
polygon
open
web3
open
layer2
open
ethereum
open
Author
7 person written this
sksabir
open
How Polygon Blockchain works...

About:

  • Polygon is a blockchain platform which aims to create a multi-chain blockchain system compatible with Ethereum. As with Ethereum, it uses a proof-of-stake consensus mechanism for processing transactions on-chain. Polygon's native token is named MATIC. Matic is an ERC-20 token, allowing for compatibility with other Ethereum cryptocurrencies.
  • Polygon uses a modified proof of stake consensus mechanism that enables a consensus to be achieved with every block. Achieving consensus using traditional proof of stake requires processing many blocks to achieve consensus.
  • The proof of stake method requires network participants to stake—agree to not trade or sell—their MATIC tokens, in exchange for the right to validate Polygon network transactions. Successful validators in the Polygon network are rewarded with MATIC tokens.
  • The Polygon network aims to address problems within the Ethereum platform, namely high transaction fees and slow processing speeds.
  • Layer 2 solution. Off Chian computation. It's Decentralised.
  • Scalability issues solved. High throughput (High TPS). Enhance the capability of Ethereum.
  • Can achieve 10000 TPS.
  • Provide SDK. Mobile apps can build using this.
  • Matic js : to build Polygon apps using JS.
  • It has Polygon mainnet and mumbai testnet.

Architecture of Polygon:

Polygon Architecture

  • Polygon network is divided into 3 Parts/Layers:

    • 1) Ethereum Mainnet. / BeaconChain. It has: (All the SC that polygon is using i.e. Staking Contract , checkpoint contract and Reward Contract etc. ⮃
    • 2)Heimdall (POS for Polygon): <- (Polygon consensus layer).It contains POS mechanism. (2/3 voting)
    • 3) BOR layer. For adding new Blocks. (MATIC Chain = Native token for Polygon.)
  • The Heimdall node is responsible for aggregating or rolling up blocks produced by the Bor node into a Merkle tree and publishing the Merkle root onto the Ethereum blockchain in periodic intervals called checkpoints.

  • Checkpointing provides finality on the Ethereum network which is used in the withdrawal of assets from Polygon to Ethereum through Proof of Burn proofs.

  • The Bor node, a Geth fork, is the execution layer of Polygon. It’s responsible for processing transactions into blocks and passing those blocks to Heimdall for validation.

  • Polygon network blocks are by default proposed in the BOR layer, after which they are forwarded to the Ethereum layer after consensus is reached via the POS mechanism in the Heimdall layer.

  • There are various checkpoints available in Polygon POS. One block is minted in every 2 seconds in the BOR chain.

  • Each block will have its own blockhash. One block has between 100 and 200 TXN.

  • For example, five blocks with various TXNs connected to a POS polygon checkpoint. The merkel root hash for all block hashes was then represented by combining the block hashes of the individual blocks. The ethereum mainnet will receive that single merkle root hash.

  • Thus, 1 hash will be used to represent 600 transactions on the mainnet. Block will be put to the Ethereum blockchain after the Merkel root and TXN have been verified. Only the final polygon transaction, not the individual blocks, will be able to alter the Ethereum State.

  • Make sure a specific transaction is real or not by using the Merkel root.

  • At checkpoints, the BOR layer continuously generates new blocks and adds them to the Heimdall layer.

  • In every 10-20 minutes, checkpointing and snapshots of every block (Merkel Root) are taken i.e., all suggested blocks are added to the Heimdall layer on the checkpoint every 20 minutes.

  • These blocks from BOR networkswere added by randomly selected validators from the POS polygon.

  • In order to avoid doing transactions on the Ethereum blockchain, Polygon must execute the majority of its Transactions or operations in the offchain. Just To confirm the transactions, it uses Ethereum.

Heimdall Chain: (POS network , acting like BeaconChain)

  • It is the POS verification layer of polygon.it does the Checkpointing of BOR blocks/ Plasma blocks representation.
  • Transferring the Merkel root to the Ethereum blockchain from a checkpoint. And all the logic to validate this three-layer architecture is contained in the Polygon Smart Contract that was implemented on Ethereum.
  • The Ethereum mainnet is where the staking contract is deployed. It includes all the logic for proposing new blocks, allocating voting rights to various validators, selecting a random validator, and overseeing checkpoints.
  • On the Ethereum blockchain, Heimdall is able to perform function calls to the staking smart contracts. Polygon uses the Ethereum Mainnet for all it's security.
  • Aggregation of blocks produced by BORat the checkpoints. Then, verify the block signature and hashs of the Individual blocks. It merged the blocks to create the root hash after it was validated.
  • After successful validation, the blocks are merged to create the root hash and then it will be sent to Ethereum mainnet as final transaction.
  • Tendermint software need to install in order to become a validator.
  • Every new block, one valiadtor will perform the following duties:
    • Validate all blocks since the last checkpoint.
    • Creates a merkel tree of block hashes.
    • Final hash can be checkpointed and send to the mainnet.
    • polygon will do 1-1 mapping with the mainnet.
  • Checkpoint importance/Task:
    • Providing finality on the root chain.
    • Providing proof of burn in the withdrawal assets.
    • How transfer of token happens in both chain (zkEVM)

ERC20 polygon <-> Mainnet ETH. Tokens that are mapped to equivalent amounts, that should be added to the mainnet, will be burned on polygon before being transferred to the mainnet and vice versa.

polygon Article's
30 articles in total
Favicon
Automating Limit Orders on Polygon with TypeScript, 0x, and Terraform
Favicon
Understanding the Role of Validators in Polygon Bridge Transactions
Favicon
Transferencia de tokens entre Ethereum y Polygon: Mejores prácticas con Polygon Bridge
Favicon
Exploring the Latest Updates and Features of Polygon Bridge
Favicon
How to Run a Polygon Node: A Complete Guide
Favicon
Polygon Blockchain
Favicon
Web3 UI For Simple Smart Contract
Favicon
Simple Smart Contract and Hardhat
Favicon
MATIC Transitions to POL: Key Insights for Polygon Users
Favicon
Sending and Monitoring Transactions on Kalp Studio
Favicon
FastLane’s ERC-4337 Support, Limitless x Etherspot, XION’s Walletless Blockchain, and Unichain Launch
Favicon
Deploying Your Solidity Smart Contract on the Polygon Blockchain Using Kalp Instant Deployer
Favicon
Creating Your Custodial Polygon Wallet on AMOY Network Using Kalp Studio
Favicon
Exploring POL: The Token Powering the Future of Decentralized Applications on Polygon
Favicon
Polygon Nodes: Types and Usage
Favicon
How Polygon AggLayer Emerges to be the Hub for Ethereum L2s
Favicon
Choose Antier for Top-tier Polygon CDK Implementation Services.
Favicon
How Polygon’s Aggregation Layer Brings a New Phase in Rollup Interoperability?
Favicon
How Polygon Blockchain works...
Favicon
How Polygon PoS is different from its zkEVM chain?
Favicon
Ethonline 2023, my experience, challenge, and Lessons Learnt
Favicon
Top Blockchain Platforms for Your dApp Development
Favicon
Purple-Paper
Favicon
Polygon Blockchain (Matic) | A Comprehensive Guide
Favicon
Sort's Web3 React Components Are Now Open Source!
Favicon
Verified Mainnet Polygon Contract
Favicon
Launch Alert! Wowen Modular Blockchain Network - Unleash the Power of Consensus Choice 🚀⛓️💻
Favicon
Power Tools for Blockchain UI Development: $3.5M Seed Round, An Innovative Revenue Model, and Open Access to Contract Data
Favicon
Build Together for Free with Sponsored Contracts on Sort
Favicon
USDT transaction on Polygon(MATIC) network

Featured ones: