EVM Compatible Chains VS Polkadot Parachains

This article is a summary of PolkaWorld’s Twitter Space discussion around “EVM Compatible Chains vs Polkadot Parachains” on May 24th 2022.


Xiaojie, PolkaWorld (PW)

Guest speakers:

Lurpis, Bifrost

Dr. Zhou, Phala

Lurpis: Let’s take Ether eum for comparison. But there is a catch here. We need to compare TPS in the context of decentralization for it to make sense. When we compare from TPS alone, the parachain is still higher than Ethereum. The block time of Ethereum 1.0 is 12–14 seconds, and each block can hold 200 transactions, so the TPS is around 15. When it’s not too congested, his TPS can reach about 45, but that’s the ceiling.

Gavin wood said that relay chain can reach 100,000 TPS, and the theoretical value of parachain can reach thousands of TPS, but the parachain is far from it. Take our own para chain Bifrost as an example, we have actually tested it, the current block out time of parallel chain is 12 seconds, and each block can contain 1500 transactions under normal circumstances, so the TPS can reach about 125, which is still a big gap with the theoretical value of 1000 TPS. The theoretical value is the very ideal situation, the best machine performance, the best bandwidth, and each transaction is the minimum GAS value to trade. So according to the current actual situation of parallel chain, its performance should be ranked in the upper middle level among public chains.

The performance of parachain has more room for improvement. Firstly, the block time will be optimized to 6 seconds in the future, and the TPS can be doubled while keeping other performance unchanged. If we add the optimization of the parachain, the optimization of collector and validator, TPS will definitely be improved. But TPS is the result of a combination of factors, so it is not very meaningful to compare TPS alone. For now, the parachain is in the middle to upper level.

Dr. Zhou: The gap between theory and practice is very objective. Our Phala network is quite full in each block, because we have a lot of miners who need to submit their transactions ,then trades with the main chain. We have actually measured the TPS, and Kusama had a particularly erratic block time of about 24 seconds. So the actual TPS is probably divided by 2 based on Lurpis’ calculation. Since the release of Parity version 0.9.18, the performance is much more stable, around 12 seconds.

We have carefully studied Kusama’s blocks and underlying code, and found many potholes in Substrate. In the SDK of Substrate, after receiving the user’s transaction, there is a transaction pool before packing the transaction into the block. The transaction pool appears because the consensus algorithm of Polkadot is complicated, and there is a very complicated sorting algorithm for the transaction in this pool. There are a lot of potholes in it, causing many transactions to be lost, and after a specific transaction is stuffed into it, it will be stuck in the whole transaction pool. We have stepped on many similar potholes.

In theory, we can easily sort the chains, for example, Solana’s central algorithm is definitely stronger than Polkadot’ NPOS, which is stronger than Ethereum native POS. Theoretical sorting can be done by everyone. Solana, which uses a centralized algorithm that everyone thinks will be good in theory, has had many downtimes. Similar problems can occur with Polkadot.

Parity will put more effort into improving the consensus algorithm, and I believe the development quality of the relay chain will become higher and higher. In the future, it will be closer to the theoretical value.

Lurpis: The gap between this is very normal. Because parachains are also appearing for the first time, how long it takes between Validtor and collector, this can only be seen by actually running out. So why Kusama will appear. It has been verified that there is no problem with security, and now it needs to keep improving in time.

Kusama hit a performance bottleneck last year, and the time of the block was around 24 seconds many times. This year it has stabilized at 12 seconds, then it can be improved to 6 seconds in the future. This is where performance needs to keep improving.

Dr Zhou: We can first see why these public chains are doing well. We don’t need to talk much about Ether, it is the leading project, no matter how hot the application is, it will deploy at least one on it. BSC and Binance, it will have the advantages of low fees, attracting traffic and so on.

If you have experienced Solana’s developer documentation, you will find that they have done a very good job. The current very hot StepN, why it will choose Solana, because their development documentation is very good, the development threshold is very low.

Solana also uses the Rust language, and everyone says Rust is more difficult. Developers don’t need to involve a lot of rust stuff to develop, they have already divided the relevant libraries very well, and developers can just call it directly. Although it has been down many times, it does not affect its ecosysterm growth.

And Polkadot‘s style is just very geeky and not very friendly to ordinary developers. Parachain has very good developers, but if an ordinary developer comes in, it is impossible to develop a chain on substrate in a very short time.

I want to ask you a question: How many of you know that Polkadot has its own smart contract?

Dr Zhou: Polkadot has its own smart contract, Polkadot’s smart contract is called Ink! So our problem is very obvious, Polkadot’s smart contract is in a very early stage, ordinary developers come in and don’t know what they have to write? First of all, it is impossible for him to develop a parachain, and then when he goes to find a smart contract, he finds that the relevant INK documents are not very detailed. It is particularly unfriendly to developers.

In addition, Ink! is only supported by the official chain of Polkadot, and Phalanetwork is just supporting ink! contracts. The whole ink! ecosysterm really needs to be developed. Currently, developers still prefer to write solidity on Moonriver.

We are also communicating with Polkadot technical team to see how to organize the relevant documentation, including the appropriate publicity to encourage people to use its smart contracts.

XCM is the biggest selling point of Polkadot, but the problem of XCM is that the binding between XCM and the contract is not strong, and it is currently used in various parachain projects, and cannot be connected to the contract, so its advantages are not reflected.

In addition, the usability of XCM is not strong. The Polkadot team is very geeky and does not explain the principle of XCM well to developers. Many people have heard of XCM, but they don’t know what it is. Nor do they know how to use it. For this problem Acala team has made a package for XCM, and the experience is very good. If more teams are willing to make such a contribution, it will also bring a lot of positive impact to the Polkadot team.

Dr zhou: Looking at the Sonala example, Rust’s supposedly high threshold is a false proposition. If it’s packaged well enough, it’s not a big hindrance for the average developer.

Ink! didn’t have Killer level application. We can look at the Example of ink! which is nothing more than Solidity’s ERC20/721 . As a developer, the question arises, he has already written enough on solidity, why do I need to write it again with ink? The problem is that there is no unique point in it . We ourselves were thinking about how to add some unique points when we were using the ink! contract. For example, we wrote extention for the ink! contract, allowing the ink! contract to send out Http messages, including some secrecy features. The feedback we got so far is pretty good. So if Ink! can add some unique capabilities, people will still use it.

Lurpis: The issue we are discussing is how parachains can compete with EVM-compatible chains . We can talk about it in two ways. The first is cross-chain ecosystem and the second is scalability.

First is the cross-chain ecosystem. XCM is very advantageous. The para chains are cross-chain through XCM. Other EVM-compatible chains such as Solana, BSC, etc. can be cross-chained through Layer0 protocol. So what are the advantages of these two cross-chains trying to compare parachains?

Lurpis: The issue we are discussing is how parallel chains can compete with EVM-compatible chains like ethereum. We can talk about it in two ways. The first is cross-chain ecology and the second is scalability.

First is the cross-chain ecology. xcm is very advantageous. The parallel chains between the polka ecology are cross-chain through XCM. Other EVM-compatible chains such as Solana, BSC, etc. can be cross-chained through Layer0 protocol. So what is the advantage of parallel chain compared with these two cross-chain ecosystem?

Parachain ecosysterm can have higher asset utilization by using XCM protocol. Our currently staking derivatives yield can be higher than Lido. Because the utilization rate is higher, the return will be higher.

Second is scalability. Parachains are more scalable. First of all, it is functional. Parachain comes with many modules when it comes online, such as governance, no fork upgrade, etc. In addition, you can develop your own modules according to the individual needs of your project. So it is more scalable. In addition, XCM+substrate can make cross-chain assets more scalable. Take Bifrost as an example. Currently many Defi products want to do Staking derivatives, the core is to help make the earning of Staking assets in the DEFI more than the Staking revenue, Bifrost is a middle layer, first unstaking assets to release the liquidity.

If you want to release the liquidity of both KSM and Ethereum and participate in DEFI on the parachain ecosystem, you just need to go through XCM protocol, and the cost is very low. And if the same is implemented on Ethereum it is basically very, very difficult. So from this point of view, parachains will be more scalable.

These two points I think are the main competitive advantages of parachains.

Lurpis: Layer0 is a project I have studied carefully. Polkadot performance is definitely better. There are many EVM-compatible chains, and if Layer0 can link them to interoperate and become a common exchange consensus, then Layer0 wants to be the XCM of the Polkadot ecosystem, which is definitely faster. Polkadot is built on a unified infrastructure and collaborates on a unified standard. Polkadot is top-down and Ethereum is bottom-up. Many existing EVM chains developed before Layer0 was available, and it will take a very long time for it to be adopted by most of the chains. If it can become an exchange consensus, it needs to take a very big security test. From a technical level, it is safer than cross-chain bridges, but very inefficient because eventually all these EVM-compatible chains need to be submitted to the EVM mainnet.

Dr zhou: I don't know much about the Layer0 project, but I know more about cross-chain bridges and XCM. I think we can put our minds at ease. Cross-chain development is not that easy and not that fast. Let's look at what XCM has done to implement cross-linking. First deploy XCM's code in the Substrate SDK. It is equivalent to putting a stake in each para chain. Then it is constantly building its own controllable infrastructure. So far XCM has not been implemented so fast. If we want to implement a secure, cheap and efficient XCM, it is very difficult.

We have to have requirements for security.

Cosmos essentially only does message forwarding and does not provide any security for you. The security of the bridge is also very fragile. Once there is a bug in the account, the whole asset is at risk.

XCM development isn't really slow. There have been several iterations so far. The original XCM was just a unified representation for tagging your assets, contracts, etc. Then there was the logic for translating, forwarding and parsing XCM messages. The current version of XCM3 is now capable of supporting various operations and manipulations. I am very confident in the structure of it.

Regarding bridges, there are asset bridges and message bridges. The asset bridge is to transfer assets from one chain to another. The message bridge can send information about contracts on, say, Ether eum to Polkadot. The product we have experienced is ChainSafe. If you want to transfer assets from Ethereum to Phala, then first you have to transfer the assets inside a contract on Ethereum, then there are three verification nodes to verify the arrival of the assets and then the assets will be released in Phalanetwork. One fee for the transfer, three nodes confirm equivalent of three times the fee. Gas fee will become the biggest obstacle for the Ethereum

The current XCM is not the XCM that Gavin really wants to achieve. the current XCM is that a parachain sends a message to a relay chain first, and then the relay chain sends it to the target parachain. This places burdens on the relay chain.

In contrast, Gavin envisions an XCM in which the parachains can communicate directly with each other. So the best form of the Polkadot ecosystrm is a mesh structure.

About PolkaWorld

PolkaWorld is a Polkadot global community founded in 2019. We have gathered more than 40,000 Polkadot enthusiasts, and have always been committed to spreading Polkadot knowledge, training Substrate developers, and supporting Polkadot/Kusama ecosystem.

Twitter: @polkaworld_org.

Youtube: https://www.youtube.com/c/PolkaWorld

Telegram: https://t.me/polkaworld



A global Polkadot/Kusama community

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store