Introduction to Polygon

The Polygon chain was originally launched as a layer network under the name of Matic. At launch, Matic intends to be an "Internet of Blockchains", allowing developers to build products with cross-chain compatibility and interoperability. But as Ethereum became the dominant smart contract chain, Polygon gradually faded out of people's vision, but with the development of the entire network and the saturation of Ethereum, the market began to gradually understand the importance of cross-chain. In response, the Polygon team turned to being a framework for building and connecting Ethereum-compatible blockchains to help Ethereum scale, and their goal changed from "Internet of Blockchains" to "Internet of Ethereum-Compatible Chains" .

Polygon has always focused on the experience of its users and developers. Since rebranding, developers have begun to flock to Polygon, and the slogan "Born for Developers" has become a reality. Due to Polygon's double aura of optimizing developer experience and alleviating the expansion problem of Ethereum, Polygon will be in 2021. Made great progress.

Over the past six months, the number of contracts deployed on Polygon has surpassed that of Ethereum entirely. Since May 2021, the number of daily active addresses has started to climb sharply.

To continue growing, Polygon must both attract new developers and retain them. In order to allow developers (and end users) to participate in the construction of its ecosystem, the Polygon team has been focusing on creating a development environment for light deployment of blockchain networks, while also focusing on improving its module security ("Security as a Service").

Ethereum's Weaknesses; Polygon's Breakthroughs

With Ethereum becoming the dominant blockchain, while enjoying the increasingly prosperous ecology, the gas fee has become a pain that countless users can’t erase. Polygon’s strategic decision to focus on the Ethereum ecosystem is prescient from now on . In the first half of 2021, the gas fee has been exceeding 100gwei, and it once exceeded 350gwei during the peak period.

Due to the complexity of Ethereum's price fluctuations and network interaction, a transaction may cost users tens or hundreds of dollars, and the transaction processing time will also increase significantly, and these problems are forcing users and developers to seek suitable alternative.

Polygon aims to solve the dual problems of transaction cost and time cost while retaining users for Ethereum by providing various scaling solutions. Polygon is highly consistent with Ethereum in terms of goals and concepts. Through EVM compatibility and most importantly, Polygon still retains the security of Ethereum behind it.

Polygon Framework: Overview

Independent chain and security chain

Two types of blockchains can be deployed on Polygon: standalone and secure.

A "standalone" chain is a blockchain that does not rely on Ethereum's consensus for security. This solution is aimed at projects that already have their own validators or are looking to implement another scalability solution. These standalone chains are typically used by enterprise networks or mature chains looking to integrate with the Polygon-Ethereum ecosystem.

A "secure" chain is one that does not have its own verification network, but instead relies on Polygon's security layer. Polygon has an extremely high level of security while allowing developers to choose from a variety of security solutions, the most popular of which is the Polygon PoS (Proof-of-Stake) chain. These security chains are designed to help startups and projects that need a reliable security system.

Whether it is an independent chain or a secure chain, it is relatively simple to deploy for developers. This ease of deployment gives developers more options to meet the needs of their users, and this flexibility comes from Polygon's infrastructure.

architecture

Whether it is an independent chain or a secure chain, the blockchains deployed on Polygon all operate within the same architectural framework. Polygon's architecture has four components: Ethereum Layer, Security Layer, Polygon Network Layer, and Execution Layer.

Ethereum layer

Polygon uses Ethereum as its base layer. This layer consists of a set of smart contracts on Ethereum, and settlements are made by validating nodes, staking nodes, and passing messages between Polygon and the Ethereum ecosystem. This layer is responsible for solving the final processing flow on Ethereum. While this layer is optional, this part of the architecture is where Polygon excels. By utilizing Ethereum as an endpoint, Polygon can take advantage of and benefit from the security of Ethereum as the ultimate shield.

security layer

The second architectural layer is an optional security layer. This layer is called "Verification-as-a-Service" because it allows developers to leverage several security solutions to verify transactions. Users can employ fraud proofs or PoS sidechains (among other solutions) for security.

By far the most popular security solution is PoS sidechains. The PoS side chain utilizes a group of about 100 verification nodes to ensure the security of the blockchain project (a certain verification fee will be charged) and manage the verification nodes. In addition, this layer can use Ethereum miners (final verification nodes) to reach consensus.

Again, this layer is optional. Generally speaking, the structural layers farther away from layer 1 tend to be less secure, but will improve transaction throughput and user experience. Not all chains need to take advantage of Polygon's security layer. Some projects, such as chain games, may even want to reduce security in exchange for faster settlement, so that players can get a good user experience.

Polygon network layer

The Polygon network layer is a network of independent blockchains responsible for finalizing transactions, producing blocks, and determining the consensus of their respective chains. These chains can be independent chains or security chains. The block producers of these chains group their respective transactions, and according to the security solution, the network layer will publish a Merkle root as a checkpoint for the first layer.

executive layer

Finally there is the executive layer. The execution layer interprets and executes transactions determined by the Polygon network layer. This layer has two components.

Execution Environment – ​​implemented by a virtual machine. Similar to the EVM, it keeps track of the state of the blockchain.

Execution logic – implements state transitions for a particular Polygon blockchain. This logic is used to define the transition to the next blockchain state, and Ethereum can be thought of as an "infinite state machine". (As opposed to a finite state machine (English: finite-state machine, abbreviation: FSM), a finite state machine is usually referred to simply as a state machine, which is a mathematical calculation model that represents a finite number of states and behaviors such as transitions and actions between these states.)

However, in all these layers, the key value-added point for developers is the security layer, because this is where the flexibility of the Polygon framework can really be exploited. Developers can choose the security solution that suits their project, and can swap solutions if they choose to change direction. Its purpose is to provide developers with a set of tools to achieve the role of custom blockchain projects.

Security Layers: A Deep Dive

While low transaction costs and high processing efficiency are key drivers of Polygon's rapid growth, none of this growth would be possible without Polygon's modular security solutions. These "security-as-a-service" solutions include Polygon's PoS sidechains and fraud proof mechanisms, while new solutions like the general data availability layer Avail and Hermez ZK-rollups are still in development. Some of these solutions can be mixed, but all rely on the Polygon SDK.

Polygon SDK

The Polygon SDK (Software Development Kit) is a framework for projects to launch their own EVM-compatible chains. This SDK implements "Security as a Service", allowing developers to choose the ideal scaling solution for their projects.

As shown in the diagram above, the Polygon framework separates functionality, allowing developers to choose their own consensus mechanism, or develop their own, while maintaining interoperability with other chains within the Polygon ecosystem.

This interoperability enables Polygon chains with different scaling solutions to communicate with each other, allowing developers to choose customized security solutions. Polygon also plans to add more out-of-the-box consensus mechanisms, database implementations, and other auxiliary services.

Polygon Hermez (ZK-rollup) Security

Polygon recently acquired Hermez, a ZK-rollup solution. Hermez is developing an EVM equivalent of ZK-rollup, a very promising layer-2 solution designed to make asset transfers more secure and less expensive. ZK-rollup compresses batches of transactions into a small amount of data in the form of validity proofs (or zk-SNARKs). This data is then published on-chain to allow verification of the proof's correctness. Compared with Ethereum, Hermez has 133 times the throughput, and the transaction cost is only one-tenth.

This solution does not have the disadvantage of plasma, namely the seven-day withdrawal wait time, because there is no need to challenge the data with fraud proofs, as SNARK proofs are computationally easy to verify. However, the structure of validity proofs is still computationally intensive. At present, the real solution that users are looking forward to will have to wait for a while. Like Avail, the future of ZK-rollup looks smooth.

Polygon Miden

Polygon also recently announced a new ZK project called Miden, a STARK-based, EVM-compatible rollup. The project is led by Bobbin Threadbare, core developer of other ZK technologies Distaff VM (a STARK-based virtual machine) and Winterfell (a high-performance STARK validator).

This solution will be based purely on STARK, supporting arbitrary transactions and automatically generating execution proofs. Miden will compile the Solidity code into Miden Assembly, which the Miden VM will use to execute transactions and generate zero-knowledge proofs.

Hermez aims to be fully compatible with EMV (at the code level), Miden will start with Solidity compilation and then move to other languages.

in conclusion

Polygon's decision to focus on providing scaling solutions for Ethereum has proven successful, as the Polygon network has seen explosive growth throughout 2021. To continue this growth, Polygon is working hard to build out-of-the-box scaling and security solutions that allow developers to take advantage of Polygon's reduced transaction costs and time-to-inclusion. With over $1 billion in funding for the ZK-rollup solution alone, Polygon has the resources to further expand its suite of solutions to help Ethereum scale to meet future projected network loads.

Guess you like

Origin blog.csdn.net/nzyjava/article/details/122977632