In-depth Interpretation of Polkadot Smart Contract Platform Gear: The Path to Parallel Architecture Public Chain
Author: Jiawen, Chain Catcher
I. Abstract
In November 2021, with the official launch of the Polkadot mainnet's parachain slot auctions, the Polkadot ecosystem quickly became a dazzling new force. The founder Gavin Wood's advocacy for "multi-chain interoperability" not only brought vast imaginative space to the blockchain field but also made Polkadot ecosystem projects such as Acala, Moonbeam, and Astar extremely popular.
Within the Polkadot ecosystem, Gear is one of the relatively underrated projects. As a smart contract platform on Polkadot, Gear technically supports asynchronous programming and parallel computing, as well as the WASM virtual machine. It is claimed that Gear's operating speed is significantly higher than that of traditional EVM chains, with its TPS (transactions per second) potentially exceeding that of Ethereum, BSC, and Polygon by several orders of magnitude. Gear CEO Nikolay Volf has also clearly stated that Gear will support DApp developers in deploying smart contracts using mainstream programming languages such as Rust, C, and C++, and will launch templates and libraries suitable for different applications, allowing developers to easily deploy DApps by modifying only a few parameters, thereby enhancing compatibility as much as possible.
In addition, Gear CEO Nikolay Volf previously served as a core developer at Parity Technologies, the parent company of Polkadot, where he participated in the development of the Parity Ethereum client and the Substrate framework, working alongside Polkadot founder Gavin Wood for six years.
Below, Chain Catcher will provide an in-depth interpretation of the Gear project from the perspectives of application scenarios, team members, technical solutions, competitive analysis, and SWOT analysis.
II. Project Introduction
1. Application Scenarios
Gear is the smart contract platform for the Polkadot---Kusama ecosystem and will become a parachain on Polkadot in the future. Since the Polkadot relay chain itself does not support DApp contract deployment, developers wishing to enter the Polkadot network often need to deploy contract code on a parachain or build and launch a blockchain themselves to connect to the Polkadot network. The latter requires staking a large amount of DOT tokens to participate in slot auctions, which is costly, so the vast majority of developers will deploy their DApp programs on a suitable parachain.
As a parachain, Gear serves as a platform for various categories of DApps, including DeFi, DAO, NFT, and supply chain management systems, providing developers with various infrastructure, supporting out-of-the-box creation processes, and ensuring that the DApps it hosts receive security guarantees from the Polkadot relay chain. Moreover, if the concurrent task processing mechanism proposed by the project is successfully implemented, its operating speed could significantly surpass that of other parachains on Polkadot, thus becoming the best entry point into the Polkadot ecosystem. Essentially, Gear is positioned as a new public chain.
2. Team Background
Co-founder and CEO: Nikolay Volf
Nikolay Volf is the co-founder and CEO of Gear, having served as a core developer at Parity Technologies, the parent company of Polkadot, since 2015, and has collaborated with Polkadot founder Gavin Wood for six years. During his time at Parity, Volf participated in the development of the Parity Ethereum client and the Substrate framework, and led the initial implementation of the WASM smart contract.
Co-founder and CFO: Ilya Veller
Ilya Veller is the co-founder and CFO of Gear, having worked at Renaissance Capital, Morgan Stanley, and Bank of America, collaborating with hedge funds and high-net-worth individuals globally for over 20 years. In the past 20 years, Ilya Veller has raised over $1 billion for various projects.
Co-founder and Head of Development: Alexander Bugorkov
Alexander Bugorkov is the Head of Development at Gear, with experience working at well-known tech companies such as Lyft, New Relic, and Spotify.
CTO: Petr Volynskiy
Petr Volynskiy is the Chief Technology Officer of Gear, with extensive experience in product development and technical leadership across various fields, including application development for project and business process management, system architecture, cross-platform development environments, web and mobile applications, operating systems, virtualization, and cloud (SaaS, IaaS, PaaS).
3. Project Progress
In August 2021, the Gear project team officially announced the project.
In September 2021, the Gear project team made its GitHub code repository public and completed the configuration of its testnet nodes.
In November 2021, Gear restructured its standard library.
In December 2021, Gear completed a $12 million private funding round, led by Blockchange Ventures, with participation from Three Arrows Capital, the Web3 Foundation, executives from Parity Technologies, Dr. Gavin Wood, Lemniscap, Distributed Globals, LAO, Mechanism Capital, Bitscale, Spartan Group LLC, HashKey, and others.
In February 2022, Gear officially announced that it would write a white paper in March, potentially releasing a testnet soon, and plans to launch the mainnet in 2022.
III. Technical Solution Interpretation
WASM Virtual Machine
To improve the node virtual machine (which builds the same program runtime environment across different node devices) and the development language layer, subsequent to Ethereum, EOS, NEAR, and the Substrate framework, as well as Polkadot relay chain nodes, all adopted the WASM virtual machine, and Gear is no exception. Unlike the EVM and Solidity language that emerged from the Ethereum team's "closed-door development," the WASM (WebAssembly) language has been jointly developed by top tech companies such as Google, Microsoft, and W3C for many years and was supported by the four major web browsers—Firefox, Chrome, Microsoft Edge, and Safari—in November 2017.
Compared to EVM, the WASM virtual machine has a long history of development in standardization, accompanied by a more complete instruction set compatible with most modern hardware architectures (used for interacting with hardware devices), allowing high-level languages such as Rust, C, and C++ to be compiled into machine code and run at near-native speeds. The CEO of Gear stated that theoretically, WASM can be up to 10 times faster than EVM.
By supporting the compilation of mainstream languages like Rust and C/C++, the adoption of the WASM virtual machine allows for broader support for smart contract development based on Gear, making it easier to bring traditional IT industry programmers into the blockchain and Web3 space. Considering the functionalities available in traditional computing environments, such as parallel computing, Gear overall will be closer to traditional computing environments than Ethereum and other public chains using EVM, as well as other new public chains that do not support parallel modes.
Parallel Task Processing and Asynchronous Programming Model
One major bottleneck limiting the current public chain's TPS (transactions per second) is that most public chains (especially EVM-based chains like Ethereum, BSC, and Polygon) adopt a single-threaded (processing only one task at a time) processing model, which greatly restricts the potential for blockchain networks to scale over time.
Unlike the vast majority of public chains, Gear has made significant changes directly in its technical architecture. In its technical documentation, it explicitly states that Gear network nodes will support "parallel processing" (running multiple tasks simultaneously) and "asynchronous programming" (the results of calling a function can be returned with a delay). To achieve this, it employs "parallel processing streams," "message-passing communication modes," the "Actor communication model," and "async/await declarations."
Theoretically, these features can allow Gear's TPS to exceed that of ordinary public chains by several orders of magnitude.
The interaction mode adopted by Gear, known as "message-passing communication," treats each transaction event as a "message" passed between different users. This interaction mode has been widely adopted in traditional computing fields and offers better performance than the older "shared memory model."
(Image source: Gear technical documentation)
At the same time, in the virtual machine architecture of Gear nodes, it allows for the creation of corresponding "event streams" based on the number of CPU cores. For example, if the CPU has two cores, two streams can be created, packaging transaction events into two different event streams, which are then executed by two different CPU cores. For instance, if there are originally 100 events to process, with only one event stream, a single core would take 100 seconds to execute; if two event streams are established, each containing 50 events, and executed by two cores, it would only take 50 seconds. Theoretically, adopting this multi-core parallel working mode can reduce task execution time by several times at best.
(Image source: Gear technical documentation)
However, running multiple transaction events simultaneously may lead to conflicts. For example, if event A and event B are executed by different CPU cores, but both events need to call contract address C, then A and B will interfere with each other’s calls to contract C's code, resulting in phenomena similar to "double spending."
To avoid the above scenario, Gear's solution is to place A and B in the same "event stream," allowing them to be executed in sequence by the same CPU core, thus resolving the shared resource issue.
In this way, Gear nodes can support multithreading (executing multiple transaction events simultaneously) while resolving the interrelated and conflicting issues between events. Through this approach, Gear can significantly improve operational efficiency.
The above describes Gear's improvements in transaction event processing modes. However, a single transaction event can be broken down into multiple steps, or calls to multiple contract programs. Therefore, to enhance efficiency at a more granular level, Gear also seeks to accelerate the execution speed of on-chain programs (smart contracts) and improve the programming experience for developers. To this end, Gear directly supports an "asynchronous programming" model.
In traditional programming models, code must be executed in a "synchronous" manner, line by line from top to bottom. The next line of code will only execute after the previous instruction has completed, creating a strict order. This model has its drawbacks; for example, after calling a certain instruction (such as printf in the image below), the system will wait for that instruction to finish executing. If that instruction takes a long time to execute, all subsequent code must wait in line, delaying the execution of the entire program. In the "time is of the essence" world of blockchain, this undoubtedly reduces the system's TPS.
To address this, Gear adopts an "asynchronous programming" model, allowing the program (smart contract) to continue executing the next instruction while executing one instruction, without being in a "waiting" state. The previously executed instruction can return a response result in the future. For example, if a smart contract on Gear contains instructions to call multiple other contracts (A, B, C), in a traditional "synchronous" mode, it would call A first, then B after A is done, and finally C after B. In contrast, with the "asynchronous" mode, it can almost immediately call contracts A, B, and C simultaneously within the same time frame, without waiting for the completion of the calling process, thus shortening the execution time of contract code. Essentially, "asynchronous programming" allows different code instructions in smart contracts to achieve "concurrent execution."
(Image source: CSDN)
As mentioned earlier, Gear significantly improves efficiency by supporting "parallel computing" and "asynchronous programming," allowing multiple transaction events to be processed simultaneously. However, this may introduce other risks. For example, if user A initiates a transaction that calls on-chain program B; while B is executing, it also needs to call programs C and D, and both C and D need to call the same program E; under the "parallel" and "asynchronous" model, if C and D execute simultaneously, they will both call E at the same time, leading to resource scheduling conflicts and chaos.
In the above scenario, the calling programs (contracts) must have a definite order. To address this, Gear adopts the Actor model.
The Actor model was proposed in 1973 as a logical model that supports concurrency, originally developed for high-parallel computers composed of numerous independent microprocessors, and has since been widely adopted in traditional computer programming. In the blockchain application scenario, the Actor model classifies different smart contracts as different Actor entities, each with its own mailbox, receiving messages (transaction events) related to it in order, and subsequently changing its data state according to the order of events. Each Actor entity processes only one event at a time, which eliminates shared state and prevents multiple events from simultaneously affecting the Actor entity. At the same time, different Actor entities can send messages to each other to invoke each other, corresponding to the scenario of contracts calling each other on the blockchain.
(Image source: CSDN)
It can be understood that an Actor entity is a smart contract with its own "transaction event queue." In the previously mentioned scenario where contracts C and D are running simultaneously and both call contract E, the calling requests from C and D will be placed in contract E's mailbox message queue in the order of their initiation time (which may be very close but sufficient to distinguish), and then E will execute the calling requests from C and D in order (for example, completing C's request before executing D's), thus resolving the conflict. It can be said that the Actor logical model fits the characteristics of smart contracts (having their own state and storage space).
By using the Actor model, developers on Gear can achieve "asynchronous programming" and "asynchronous execution" (essentially concurrent execution) in smart contract development. On this basis, Gear can support native asynchronous programming features of the Rust language, such as Futures and async/await syntax, which have long been absent in Solidity. Asynchronous programming will significantly rewrite the paradigm for writing smart contract code and bring great convenience to developers.
In summary, by combining the two most important unique features of "parallel processing" and "asynchronous programming," Gear can process transaction events faster than traditional public chains and run on-chain programs more quickly, resulting in a significant increase in TPS.
IV. Competitive Landscape
As Gear is positioned as a Polkadot parachain, its competitors are other parachains within the Polkadot ecosystem, such as Moonbeam, Astar, Acala, Parallel, and Clover. This article will primarily compare relevant information about these parachains (whose mainnets are already in operation).
1. Moonbeam
Moonbeam is an EVM-compatible chain on Polkadot, positioned as a Polkadot smart contract platform compatible with Ethereum. Through its EVM compatibility, developers can deploy existing Solidity smart contracts and DApps to Moonbeam with minimal changes, and achieve interoperability across the entire Polkadot ecosystem through Moonbeam's communication with the relay chain.
On the team side, the Moonbeam development team is led by Derek Yoo, the founder of PureStake, an American who is a member of G20 Ventures and served as CTO for 12 years at the parent company of the office social software FUZE, later becoming the CPO (Chief Procurement Officer) of that company. In May 2019, Derek Yoo founded PureStake, which participated in the development of the Substrate framework, mainly responsible for the Frontier module.
In terms of financing, in September 2020, the Moonbeam development team PureStake completed a $1.4 million seed round led by Hypersphere Ventures; in March 2021, the team completed a $6 million strategic round led by CoinFund, with participation from Binance Labs, IOSG Ventures, ParaFi, Coinbase Ventures, Distributed Capital, and others.
Currently, the native protocols on the Moonbeam chain mainly include DEX platforms like StellaSwap and BeamSwap, Zenlink, yield projects like Pickle and Astral Financial, options market-making projects like Polkamarkets, and cross-chain bridges like cBridge and Connext.
As of February 15, Moonbeam's total locked value (TVL) is approximately $180 million, with StellaSwap accounting for 45.74% of the locked share. The total locked value on Moonbeam's canary network Moonriver on Kusama exceeds $210 million.
(Image source: Defi Llama)
Moonbeam's on-chain data is as follows: the platform has processed over 1.05 million transfers, and its token GLMR has over 100,000 holding addresses in the Polkadot ecosystem.
(Image source: SubScan)
2. Astar (formerly Plasm)
Astar is positioned as a multi-chain, multi-virtual machine smart contract platform, supporting both EVM and WASM virtual machines simultaneously, allowing it to cater to Ethereum DApp developers while expanding to developers outside the Solidity ecosystem. Additionally, Astar features a unique "DApp Staking" incentive mechanism, distributing 50% of each block reward to DApp project developers and nominators, with the other 50% allocated to POS staking nodes. This mechanism aims to provide developers with a clearer long-term revenue path and enhance their motivation.
Currently, Astar has developed cross-chain bridges that will support Ethereum, BSC, Polygon, Avalanche, Dfinity, Cosmos, and others. It also supports Layer 2 ecosystems and has implemented OVM solutions (Optimistic Virtual Machine) to assist Layer 2 networks in asset transfers and information exchanges. According to its vision, Astar aims to become a smart contract platform that includes various complex development environments and supports multiple types of DApps.
On the team side, Astar's development company Stake Technologies was founded in Japan in 2018 by Sota Watanabe, who has resources in the Japanese internet industry. In 2021, the Astar ecosystem received support from Microsoft's "Microsoft For Startups" program in Japan, gaining infrastructure support including Azure and Microsoft's global network.
In terms of financing, Astar (formerly Plasm) has completed three rounds of financing in the past year, raising a total of $34.4 million, with investors including Binance Labs, Polychain Capital, HashKey Capital, and Alameda Research.
Astar officially launched its mainnet in January this year, and its on-chain protocols mainly include DEX platforms ArthSwap, PolkaEx, and cross-chain bridge cBridge. As of February 15, Astar's total locked value (TVL) is approximately $480 million, with $440 million locked in the Astar dApps Staking incentive program, accounting for 90.57% of Astar's total locked value. The total locked value on Astar's canary network Shiden on Kusama is approximately $15 million.
(Image source: Astar Network)
Astar's on-chain data is as follows: the platform has processed nearly 650,000 transfers, and its token ASTR has approximately 60,000 holding addresses in the Polkadot ecosystem.
(Image source: SubScan)
3. Acala
Acala is positioned as the underlying infrastructure serving the Polkadot DeFi ecosystem, supporting both EVM and WASM virtual machines, and has built a complete suite of DeFi applications for users, including a stablecoin system for collateralized lending, liquidity protocols for releasing staked assets, and DEXs as core infrastructure. By supporting EVM, Acala provides developers with modules compatible with Ethereum smart contracts, offering a range of out-of-the-box DeFi components to help developers build various applications on the Acala application layer, such as NFTs and DEXs.
On the team side, the Acala development team was jointly initiated by the decentralized finance protocol Laminar team and the Polkawallet team, with some members coming from the Web3 Foundation. The team CEO is Ruitao Su, a graduate of the University of Auckland, who previously served as the Chief Technology Officer of Centrality. The CTO is Bryan Chen, also a graduate of the University of Auckland, who is a major contributor to the Substrate codebase and a Polkadot ambassador; the COO is Bette Chen, also a graduate of the University of Auckland, responsible for blockchain protocol and DApp product development.
In terms of financing, Acala completed a $1.5 million seed round in March 2020, led by Polychain, with participation from Hashkey, KR1, and others; in August of the same year, Acala completed a $7 million Series A financing round, led by Pantera Capital, with participation from ParaFi Capital, 1confirmation, Arrington XRP Capital, Coinfund, DCG, and others. In March 2021, Acala received investment from Coinbase Ventures, with the amount undisclosed.
Acala opened transfer functions in January this year and launched a million ACA reward program on February 10 to incentivize the development of its on-chain DEX platform Acala Swap. As of February 15, Acala's total locked value (TVL) on its canary network Karura on Kusama is approximately $45 million.
Acala's on-chain data is as follows: the platform has processed nearly 490,000 transfers, and its token ACA has approximately 140,000 holding addresses in the Polkadot ecosystem.
(Image source: SubScan)
4. Parallel Finance
Parallel Finance is positioned as a DeFi-focused parachain, launching various DeFi products. It currently uses the WASM virtual machine, and its service called Leverage Staking has been deployed on the canary network Heiko, allowing users to lend out staked assets to earn both staking and lending interest simultaneously. Parallel---Heiko also supports Auction Loans, allowing users to determine the future share ratio based on fixed or floating rates or the amount borrowed for slot auction participation.
On the team side, the Parallel Finance project began around April 2021, initiated by Ruan Yubo, the founder of Eight Dimensions Capital, with other team members having backgrounds at Facebook, JPMorgan, or companies like Sushi, TrueFi, and Mina.
In terms of financing, Parallel Finance completed three rounds of financing last year, raising a total of between $20 million and $30 million, with investors including Polychain Capital leading the rounds, along with Slow Ventures, Lightspeed Venture Partners, Blockchain Capital, Alameda Research, Pantera Capital, Sequoia Capital, and Founders Fund.
Currently, Parallel Finance's total locked value (TVL) is approximately $600 million, primarily concentrated in its slot auction lending business segment.
Parallel Finance's on-chain data is as follows: the platform has processed nearly 40,000 transfers, and its token PARA has approximately 30,000 holding addresses in the Polkadot ecosystem.
(Image source: SubScan)
5. Clover
Clover Finance is positioned as an EVM compatible chain within the Polkadot ecosystem, creating a one-stop EVM compatibility framework for applications based on Substrate to lower the barriers and costs for developers. Projects on EVM-based public chains like Ethereum and BSC can easily migrate their smart contracts to Clover.
In response to Ethereum's high gas fees, Clover has designed a free economic model, charging transaction fees directly from the transaction assets, so users do not need to store ETH, BNB, HT, or other tokens specifically for gas payments, significantly lowering the user entry threshold. At the same time, Clover has a gas allocation model for developers, redefining gas allocation parameters and sending gas fees directly to network maintainers and DApp developers, creating passive income for smart contract developers.
On the team side, the Clover project began in November 2020, with project leader & co-founder Viven Kirby having previously served as the technical lead and architect for Microsoft's ERP software development, as well as being a core developer for many blockchain projects. Technical lead & co-founder Burak Keçeli was previously the technical lead for the payment product GatePay and the founder of the cross-border payment product Staqq. Operations director & co-founder Norelle Ng was a partner at Bithumb Global and the customer relations director at Amber Group.
In terms of financing, in February 2021, Clover Finance completed a $3 million seed round led by Polychain, Hypersphere, Bithumb Global, and Divergence Ventures. In May 2021, Clover Finance received investment from Huobi Innovation Lab.
Clover Finance's on-chain data is as follows: the platform has processed 36 transfers, and its token CLV has 32 holding addresses in the Polkadot ecosystem.
(Image source: SubScan)
V. SWOT Analysis
Through the previous explanations and analyses, Gear has the following strengths and weaknesses:
Strengths:
- Supports a more complete and faster WASM virtual machine, supporting mainstream languages like Rust, C/C++;
- Supports parallel execution of different transaction events and asynchronous programming for smart contract programming and execution, significantly accelerating program running speed, resulting in TPS levels far exceeding EVM-based public chains; compared to Solana, Gear's security can be guaranteed by the Polkadot relay chain.
- Compared to most public chains (especially EVM-based chains), its performance and architecture are closer to traditional computing environments;
- The project founder and CEO have backgrounds at Parity Technologies, the parent company of Polkadot, and have a close relationship with Polkadot founder Gavin Wood, securing early funding from the Web3 Foundation, Parity Technologies, and well-known VC Three Arrows Capital.
Weaknesses:
- Due to the adoption of a complex parallel architecture and asynchronous programming, its potential complexity is related to the determinism of blockchain states, but different nodes have different numbers of CPU cores, so it requires the development of specialized cutting-edge algorithms to overcome this, which poses significant development challenges.
- Even with meticulous design, the parallel processing model may encounter bugs in long-term operation. In 2018, EOS founder BM remarked on the "parallelism" mentioned in the EOS white paper, which is difficult to achieve: "Anyone who can solve this problem must have experience developing at least three blockchain systems." Additionally, Solana has proposed the "Sealevel" technology solution supporting parallel architecture, but it has yet to be practically implemented.
- Gear has not yet launched its testnet, and it may take a long time before the mainnet is officially operational and it can participate in Polkadot's slot auctions, which will cause it to lose its first-mover advantage in the Polkadot ecosystem.
- Gear currently mainly supports Rust and C languages, especially focusing on Rust. However, Rust has a steep learning curve, which may limit the number of developers.
- Gear's official stance does not indicate support for EVM, which will cause it to lose the currently dominant and widely used Solidity developers in blockchain development, hindering the rapid construction of the Gear ecosystem;
- Gear's security depends on the Polkadot relay chain, and its future prosperity will be constrained by the Polkadot ecosystem itself. Potential flaws in Polkadot in the future may severely impact Gear.
VI. Conclusion
As a new entry point for developers into the Polkadot ecosystem, Gear is refreshing in its technical propositions and team background. However, the unique business logic and operational mechanisms of blockchain inherently "oppose" parallel multi-threaded working methods, which undoubtedly poses a significant obstacle for the Gear team, which champions "parallel computing." At the same time, given that the EVM virtual machine and Solidity language are nearly "too big to fail," Gear still faces severe challenges against Moonbeam, Acala, and Astar, which have gained favor from Ethereum developers due to their EVM compatibility within the Polkadot ecosystem.
Note: Special thanks to Polkadot ecosystem developer, Patract CTO @Aten and Ethereum ecosystem developer @A Handsome Dog for their technical insights during the completion of this article. The author expresses gratitude here.
References:
《The advantage of Gear technology》
《Gear Technologies Raises $12M to Boost Smart-Contract Development on Polkadot》
《Patract CTO Aten | Future Contract Platform Outlook, How to Break Through Existing Bottlenecks?》
《Gear: Polkadot Ecosystem Wasm Smart Contract Platform | PW AMA》