🎉2022 Wrap🎉 - The Ultimate Comparison
Ethereum vs Polygon vs Solana. PLUS a deep dive into how transactions happen on each of these chains👀
Gm Gm Folks!😁😁
🎉Festive greetings of the season.🥂
This is web3 Bits n Bytes, serving you the tastiest and droolworthy crypto snacks leaving you wanting for more.🍫
Well, we are just in time for the festive season, right?🤗
Well this is the last web3 munching edition of the week, month, quarter, and the year 2022. Let’s take a monemt to celebrate surviving another bear market year.🥳
If we look back a lot has happened this year.😵💫 From the purge to the Merge. FTX crash to the rising builder ecosystem.
And, Bits n Bytes made web3 fun and easy to understand for ya’ll. 😁
I started this newsletter 3 months ago and it’s great to have ya’ll munching on the web3 gyaan every week!🤩
The response from everyone has been more than what I had thought was possible, and there are more snackible editions coming your way in 2023.😊😊
2023 is also the year when ya’ll can hear all this gyaan from me and all the amazing guests that I plan to have on the Bits n Bytes Podcast. Yes you heard that right!🥳🥳
You’ll get to hear from a great pool of..
📌Developers, Devrels, Community folks
📌Founders, CTOs
..talk everything and anything about building in web3 and some very intersting chats around your favourite Dapps. Stay Tuned!🤗
Now getting back to the web3 world. What’s on the menu today?😋
🥞For starters, we have a comparison around Ethereum, Polygon and Solana from an infrastructure POV.
🍽️ For main course we have - a deep dive on how a transaction takes place on L1 and L2 and how is the TPS really high for L2s
🎂For desserts - well, year end calls for a delight🤩 - A lookback at the iconic crypto moments of 2022. I know you want to jump to the desserts section like you do at every party 🤭
Ethereum, Polygon, Solana - We’ve all heard these names either on that Whatsapp forward, from your crypto bros or on that clickbait video you saw yesterday.😬😬
But do you understand how transactions happen on these chains?
What goes behind making the expereince seamless for users when you mint that NFT on OpenSea or Send/Receive crypto? Well, we’ve got you covered from here!🫡🫡
Here’s the difference between the three most popular blockchain platforms which blockchain app developers and users around the world use. The usage of all three platforms depend on the type of applications being developed
To understand these consesnus mechanisms: checkout this Consensus Mechanism 101 edition from Bits n bytes.
The main goal is to understand how the jump from 15 to 65K was achieved by an EVM and a non EVM chain 🧐
Let’s start with Ethereum
First, let’s understand how a transaction is constructed and sent to the Ethereum network? Baby steps, eh?😺
👉In layman terms, transactions are cryptographically signed instructions from accounts. An account will initiate a transaction to update the state of the Ethereum network.
👉The simplest transaction is transferring ETH from one account to another.
📍 Say you send 1 ETH to your friend Alice. When you initiate that transaction, the state of the Ethereum Virtual Machine changes.
📍 Just how that nosy relative needs to broadcast about their kid moving abroad to the entire family🤣, transactions need to broadcast the info of state change to the whole network. Any node can broadcast a request for a transaction to be executed on the EVM.
👉Post this, a validator executes the transaction and propagates the resulting state change to the rest of the network.
But wait, transactions require a fee and must be included in a validated block.
A submitted transaction includes the following information:
recipient🙍♀️
– the receiving addresssignature👩💻
– the identifier of the sender, generated when the sender's private key signs the transaction and confirms the sender has authorized this transactionnonce
🤖- a sequencially incrementing counter which indicates the transaction number from the accountvalue
🪙– amount of ETH to transfer from sender to recipient (in WEI)data
⌨️– optional field to include arbitrary datagasLimit
🎰– the maximum amount of gas units that can be consumed by the transaction.maxPriorityFeePerGas💸
- the maximum amount of gas to be included as a tip to the validatormaxFeePerGas
💰- the maximum amount of gas willing to be paid for the transactionThe
gasLimit
, andmaxPriorityFeePerGas
determine the maximum transaction fee paid to the validator.
But how do we ensure that the transaction could only have come from the sender and was not sent fraudulently?
An Ethereum client like Geth handles the signing process using JSON-RPC API calls
Any transaction taking place on the chain requires gas, how do we know the amount of gas used?👀👇
Simple transfer transactions require 21000 units of Gas.
So for you to send 1 ETH to Alice at a baseFeePerGas
of 180 gwei and maxPriorityFeePerGas
of 20 gwei, you will need to pay the following fee:
(180 + 20) * 21000 = 4,200,000 gwei
OR
0.0042 ETH
👉Your account will be debited -1.0042 ETH (1 ETH for Alice + 0.0042 ETH in gas fees)
👉Alice's account will be credited +1.0 ETH
👉The base fee will be burned -0.00399 ETH
👉Validator keeps the tip +0.000210 ETH
To summarise for ya’ll🤓
Once you send a transaction, cryptography generates a transaction hash: 0xc9d2d79c6253406a146bf61690d4d5184124142665dbc2dd3b4ad1c73e6d9796
The transaction is then broadcast to the network and included in a pool with lots of other transactions.📣
A validator needs to pick your transaction and include it in a block in order to verify the transaction and consider it successful.✔️
As time passes the block containing your transaction will be upgraded to justified then finalized. Once a block is finalized it could only ever be changed by an attack 🆗
Let’s understand the TPS for Ethereum. Do checkout this post to know how it’s calculated👇👇
In ETHereum, miners have to race to find the nonce to meet the target difficulty.
Every node needs to verify that the miners’ work is valid and keep an accurate copy of the current network state. 😲
This greatly limits the transaction process capability and throughput of the Ethereum blockchain network. Currently, it can only process 12-15 transactions per second.😳
Less transaction processing speed and high gas has been a bottleneck for Ethereum and that’s when Polygon - a L2 scaling solution came into picture with multiple scaling solution to bring down the gas fees to pennies and skyrocket the TPS🥳🥳
Of the multiple scaling options on Polygon, the most popular are commit chains, plasma sidechains, a proof-of-stake (PoS) blockchain bridge, zk rollups and optimistic rollups. 👀
📌Matic began with plasma sidechains⛓️, which are lighter and more secure sidechains.
📌A plasma chain is a second blockchain that coexists with the main blockchain, similar to sidechains. Ethereum is the parent or main blockchain in this scenario.
📌Plasma chains communicate and connect to the main blockchain, enabling safe asset transfers between them.
👉 The necessity for Ethereum to independently process each file is eliminated by processing batches of transactions on its own PoS blockchain.
👉In order to make Ethereum lighter and faster, Polygon batches transactions off the main chain.🤜🤛
📍 Zk rollups process bundles of transactions off-chain and create validity proofs, verifying that each bundle of data is accurate. These validity proofs are then sent to the main blockchain.
📍 Each validity proof acts as a proxy for the bundle it represents which reduces the amount of data on the main chain. In effect, this approach reduces the time and gas fees required to validate a block of transactions.
🔊And the story doesn’t end here, recently, Polygon PoS announce a Parallel EVM upgrade to PoS that will make the Polygon PoS chain up to twice as fast.🥳
👉 The goal of a parallelizing engine is the ability to process multiple transactions at the same time.
👉 A 1.6x increase in gas throughput, with a clear path to a 2x speed-up was noted with the adoption of parallelization.
🟣But, what does a transaction look like in Polygon network?🟣
➡️Transactions are comprised of metadata held in contexts and messages that trigger state changes within a module, through the module's Handler.
➡️When users want to interact with an application and make state changes (e.g. sending coins), they create transactions.
➡️Each of a transaction's message
must be signed using the private key associated with the account before the transaction is broadcasted to the network.
➡️A transaction must then be included in a block, validated, and then approved by the network through the consensus process.
📍 Shifting focus to a non - EVM chain
Solana is the name that comes first in mind.
The blockchain works on PoH (Proof of History) consensus mechanism for allowing and restricting entries in the database💽
It uses the Gulfstream system for the transaction to wait in a memory pool until their turn for processing is up. It holds up to 1,00,00 transactions at one time.👀
It can enable multiple smart contracts simultaneously, which helps in saving cost and time.🫰
👉Proof-of-History is a high Verifiable Delay Function (VDF). Solana requires validators to solve these VDFs continuously. 👨💻
👉A VDF requires a specific number of sequence steps to evaluate but also produces a unique output that can be efficiently and publicly verified.
👉VDFs can only be solved by a single CPU core applying a particular set of sequential steps.
📌 For verifying transactions, validators receive staking rewards in the form of new coins and take a cut of the rewards as a commission. 🤑
➡️A Solana transaction contains a compact-array of signatures, followed by a message.
➡️Each item in the signatures array is a digital signature of the given message.
➡️The Solana runtime verifies that the number of signatures matches the number in the first 8 bits of the message header.
➡️It also verifies that each signature was signed by the private key corresponding to the public key at the same index in the message's account addresses array.
📌They then pass on the rest of the reward to those who have staked with them, proportionally to their ownership interest.
📌Solana depends on Tower Byzantine Fault Tolerance of TBFT which prevents real-time communication among nodes and reduces the time taken, increasing efficiency overall.
👉It’s based on a cluster architecture that works on Solana clusters - basically a collection of validators that together address the client transactions with ledger maintenance.
👉 Every cluster has its own validator and the roles of each validator continue to rotate among them. The leader of the cluster will build and timestamp the transaction with PoH consensus.
👉It is a stateless architecture and due to this, the whole state of Solana architecture does not need to update every time thus contrbuting to high TPS.
With what went down on crypto twitter, Sam Bankman (SBF), Terra founder Do and Celcius network’s CEO Alex Mashinsky would sure look back to 2022 and wish they had hired a social media advisor or taken a break from Twitter.🤣
Bringing you the 5 best crypto moments of 2022🤩🤩
📍 Tether(USDT) Regaining Its $1 Peg After a Short Drop📈
📍 Completion of Ethereum Merge 2.0 🥂
📍 Crypto crash fueled by FTX’s Crash and the bankruptcy filing😓😓
Can’t not mention this G.O.A.T tweet by SBF🫢
📍 Ukraine Accepting Crypto Donations 🤑🇺🇦
In two days, $12 million worth of Bitcoin, Ethereum, and USDT poured in😱
📍 Terra Collapse - The LUNA crash 😨
Terra’s 98% crash caused a market wipeout, but the damage didn’t stop there. 😨
The protocol’s implosion sparked an acute liquidity crisis, hitting major players like Celsius, Three Arrows Capital, Genesis Trading, and Alameda Research.😲
So what’s up next for crypto in 2023?🧐
2022 was a year of both challenges and opportunities for the web3 ecosystem, with several significant developments worth revisiting and considering as 2023 approaches.
😌As we move into 2023, we all know the market’s a little shaken.🤓
While there are significant issues that will not be easy to overcome, blockchain innovation and progress is continuing to grow and the use cases for the technology are continuing to be adopted. 🤩
The ecosystem is more developer centric than ever. It’s time to buidl for the next bull run.😍👩💻
Well that’s a wrap for today! To munching more crypto snacks 🥂🍩
If you want more web3 gyan, then, be sure to follow us on Twitter (@Web3_BNB)
Wishing ya’ll a very happy new year 🎉🥂
Adios 👋
How'd you like today's web3 Bytes?
Let me know in the comments