Time-Based Transaction Ordering: How Shardeum Facilitates Chronological Consistency and Fairness
Table of contents
- What is Equity in Blockchain?
- The Development of Blockchain
- Why Blockchains Struggle to Attain High Equity
- Blockchain’s Transparency & Scalability Trilemma
- Validators Earning from Manual Arrangement of Transactions
- Network Latency
- Absence of Atomic Composability and Instant Finality
- Selection of Primary Node
- Consensus at the Block Level
- Implications of Layer 2 Scaling Solutions and Rollups
- How Does Shardeum Attain a High Level of Equity?
- Dynamic State Sharding and Transaction-Level Consensus
- Linear Scalability & Immediate Finality
- Consensus Algorithm Preventing Sybil Attacks
- Attaining a High Level of Fairness
What is Equity in Blockchain?
Equity in blockchain pertains to the principle that all participants within a blockchain-based system should possess an equal opportunity to engage in transaction processing, consensus procedures, governance, resource distribution, and the receipt of rewards for their contributions. This assures the network's security and resistance against attacks, thereby enhancing the credibility and legitimacy of the blockchain system. Such factors are pivotal for its acceptance and triumph. We shall delve into a thorough examination of a subject frequently overlooked by many: the time-based transaction ordering process. This serves as the gateway to matters such as MEV and inequity within the broader British blockchain industry.
Attaining equity within a blockchain presents a complex challenge. Issues such as restricted scalability, prolonged latency, feeble consensus algorithms, Sybil attacks, and economic incentives can lead to disparities in influence, offering certain participants an unjust edge. Simultaneously, it's essential to contextualize the situation properly. For instance, front-running emerged as an unintended outcome of blockchain's transparency and self-imposed restrictions, aimed at maintaining the security and decentralization of a public blockchain network.
Comparatively, this can be likened to the enforcement of car seat belt regulations and the issuing fines for non-compliance while driving. While the majority of law enforcement officers issue fines to individuals who simply fail to abide by the regulations, a few officers may perceive it as an opportunity to gain advantages from the system designed to reward them for upholding the law. While their motivation may not always align with the ideal, it's undeniable that this offers an incentive to safeguard the lives of drivers and their passengers, as well as encourage adherence to the regulations. New technology may encounter challenges on its path to broader adoption, and until it matures through research and development, certain compromises must be taken into account and put into practice.
The Development of Blockchain
Blockchain as a Peer-to-Peer Payment Network
It should be stressed that blockchain networks, which emerged in the aftermath of the 2008 financial crisis, were never conceived to expand to meet the diverse requirements of every individual on the planet. Bitcoin is rightfully regarded as the premier peer-to-peer payment network, offering maximum security, transparency, and decentralization while preserving the privacy of users. Subsequently, it revolutionized the industry's efficiency in cross-border payments, rendering them significantly cheaper and faster than their Web2 counterparts. However, if one were to observe, Bitcoin can only process up to 10 TPS, whereas Web2 platforms like Paypal and Twitter can handle more than 10,000 TPS. A throughput of 10 TPS sufficed when public blockchains were scarcely utilized before a pivotal shift occurred amid the last decade.
Greater Real-World Applications Lead to Enhanced Adoption
Global adoption will only materialise when a technology serves numerous purposes. If AI were exclusively applied to language translation, its utility would be confined to translation services, resulting in limited adoption. However, today, AI underpins applications such as Siri, chatbots, voice recognition, cybersecurity, IoT devices, exchange order books, fraud detection, and many more. Although the blockchain industry is still in its infancy, one of the earliest indicators of its potential for widespread popularity emerged with Ethereum's introduction of smart contracts and lighter consensus algorithms in 2016. Beyond merely functioning as a payment network, smart contracts have unlocked a plethora of applications for blockchains across diverse sectors.
Blockchains are now capable of connecting data between their networks and the external world, allowing for the creation of products and services without the need for intermediaries. Public blockchains, in particular, have demonstrated their ability to perform a wide range of functions similar to those found in the Web2 environment, albeit with transparency. Much like how apps are developed on Android or iOS platforms, anyone can create decentralized applications (dApps) on Layer 1 blockchains like Shardeum. Unlike Web2 entities, every transaction is openly recorded in a public network's digital ledger. This has provided additional motivation for industries such as finance, supply chain, retail, consumer goods, manufacturing, and more, to embrace blockchain technology to varying extents. DappRadar, a global app store for dApps, reports a total of over 12,000 dApps as of May 2023, with a Total Value Locked (TVL) of approximately $55 billion, despite encountering various downturns and negative perceptions within the industry.
Why Blockchains Struggle to Attain High Equity
Blockchain’s Transparency & Scalability Trilemma
The scalability trilemma pertains to the inability of public blockchains to simultaneously achieve scalability, security, and decentralization. The early architects of blockchain technology prioritized security and decentralization, which led to self-imposed limitations on scaling. Over the past four-plus years, blockchain networks have struggled to keep pace with the increasing rate of adoption. Users have encountered persistent issues, including network latency, delayed or failed transactions, and service disruptions resulting from congestion caused by a backlog of transactions submitted by users. When network demand reaches high levels, average transaction fees escalate rapidly. Maintaining precise time-based ordering becomes a challenge as the network expands with limited scalability, particularly when processing a substantial volume of transactions concurrently.
Another unintended consequence of blockchain's effectiveness is its transparency, as previously mentioned. Public blockchains cryptographically record each transaction on a public ledger, which is validated by unconnected network participants (referred to as nodes or validators) dispersed worldwide. While user data is encrypted for security purposes, block explorers, similar to search engines, can be employed to trace and determine the progress of a transaction from its initiation by a user until the network confirms and processes the transaction at each step. Essentially, this information is accessible to anyone, including users, data analysis firms, law enforcement, and, naturally, the validators.
Validators Earning from Manual Arrangement of Transactions
Most PoS networks follow a fairly uniform procedure for validating and processing transactions. When a user submits a transaction, it enters the network's transaction or mempool. The mempool serves as a repository for unconfirmed transactions within blockchain networks, awaiting validation by node validators. Once selected, individual validators verify these transactions before incorporating them into a block. As the block nears its maximum capacity, it is appended to the network chain. The validated transactions within the block are subsequently disseminated to other validators on the network to attain a majority consensus, a pivotal step in ensuring the security of public networks. Once a majority consensus is achieved for a block, the transactions within it are confirmed, and the block is permanently added to the network chain, preserving its integrity and immutability. It's worth noting that the consensus mechanism also plays a significant role in the transaction ordering process within blockchain networks, a topic we will delve into in the following paragraphs.
As you can observe, validators hold a significant role in the functioning of a public blockchain network. One might anticipate that transactions are ideally selected and processed on a first-come, first-served (FCFS) basis. However, due to the transparent nature of blockchains and the scalability challenges discussed in the preceding paragraphs, transactions within the mempool contend for limited block space, and validators prioritize them based on factors such as transaction fees, transaction size, and network congestion. Typically, transactions offering higher fees stand a better chance of being included in the next block by validators, encouraging users to attach higher fees to their transactions to expedite confirmation.
In this scenario, validators give preference to higher-value or more profitable transactions, while also incorporating lower-value or smaller transactions to fill the block space limit and expedite the consensus and block confirmation process. The ordering of transactions is performed manually rather than through an automated or impartial process, with the aim of preserving a high level of fairness free from any manipulation or bias.
Network Latency
Significant or irregular network latency can introduce disparities in the perceived sequence of transactions, even when the network employs a clock synchronization protocol. Even the more recent sharded blockchains contend with inconsistent latency problems, particularly during peak demand, because they conduct consensus at the block level, which often complicates the parallelization of transactions.
During a demand surge, these blockchains usually resort to using a static or predefined group of shards within the network. Transactions on such sharded platforms are either processed sequentially after a minimum number of nodes join the network to create a new shard or are processed after a waiting period for the new shard validators to synchronize with the network's latest state. This, in turn, heightens network latency, directly affecting its finality.
When the time required to confirm transactions and guarantee their irreversibility varies depending on the network's demand, it becomes impractical to fully utilize a timestamp-based ordering protocol. Additionally, the elevated latency could potentially provide an opportunity for malicious actors to create hard forks in the meantime, leading to numerous failed or delayed transactions. Users would then need to resubmit such transactions, disrupting the fairness within the blockchain system.
Absence of Atomic Composability and Instant Finality
Some transactions may rely on other transactions, such as in the case of smart contract interactions, token transfers, or chain reorganizations resulting from hard forks, which are a consequence of deterministic finality taking an extended period to confirm transactions, as discussed earlier. Blockchains are facing increasing challenges in achieving atomic and cross-shard composability, which, in itself, introduces latency to the network.
Without atomic composability, transactions could potentially fail or leave the blockchain in an inconsistent state, leading to security risks and reduced reliability. Without cross-shard communication, transactions will be unable to access and utilize data and state from different shards, limiting the execution of complex transactions and smart contracts in a sharded or partitioned environment. In summary, it will be impossible to maintain correct time-based ordering on the network without ensuring that dependencies are adequately synchronized across shards.
Selection of Primary Node
The process of electing a primary node within consensus mechanisms, such as Proof of Stake (PoS) or Delegated Proof of Stake (DPoS), employed by numerous blockchain networks today, is also susceptible to MEV crises, front-running, and sandwich attacks. In a consensus mechanism reliant on the election of primary nodes, where a single node or a small group of nodes are designated as block validators or leaders, there exists a risk that these nodes may gain an advantage in extracting MEV. They might possess the capability to prioritize their own transactions or engage in other manipulative practices, resulting in unfair economic benefits. Furthermore, they could be vulnerable to bot attacks and takeover attempts by malicious actors, leading to disruptions in the orderly processing of transactions.
In addition to the MEV-related risks, when a consensus mechanism depends on the authority of the primary node to validate transactions and establish a consistent order, the efficiency and speed of that specific node in reaching consensus can affect the accuracy of time-based ordering. The election of a primary node can also impact the network's stability. If the primary node is not elected or replaced in a timely manner, it can lead to network disturbances or delays in transaction processing, distorting the accuracy of time-based ordering.
Consensus at the Block Level
Although consensus algorithms (or mechanisms) primarily contribute to achieving consensus among validators for verified transactions, they also significantly impact the arrangement of transactions within a blockchain network. For example, conducting consensus at the block level introduces complexities in obtaining the precise timestamps for transactions. Many blockchains have predefined limits on block size to ensure network scalability and performance. When the number of transactions surpasses this block size limit, the selection and inclusion of transactions in a block become challenging. These selections are often influenced by various prioritization mechanisms used by networks, which differ from chronological ordering to prevent network congestion and disruptions.
Furthermore, consensus conducted at the block level typically results in the sequential processing of transactions unless blockchain networks scale vertically. However, both sequential processing and vertical scalability tend to reduce processing speeds and/or introduce stability issues that impede the chronological ordering of transactions within a block.
Implications of Layer 2 Scaling Solutions and Rollups
Layer 2 blockchains have been introduced as a solution built atop L1 platforms to address scalability issues to some extent. L2 solutions, which include rollups, are designed to ease the strain on the primary blockchain by handling a significant portion of transactions off-chain. These solutions typically consolidate multiple transactions into a single batch and then submit the outcome of that batch to the main chain. It's important to note that the final order of transactions on the main chain is often influenced by the submission timestamp of the rollups or layer 2 solution!
While transactions within the layer 2 solution may achieve quicker confirmation or settlement, they may require some time to be incorporated into the main chain, affecting the precise chronological ordering of transactions on the main chain, particularly if there are conflicts or reordering during the submission process. Additionally, we must consider that communication between the layer 2 solution and the main chain can introduce delays that impact time-based ordering unless the network achieves atomic composability.
How Does Shardeum Attain a High Level of Equity?
Bitcoin introduced decentralisation, and Ethereum expanded the decentralised economy. Alongside other recently launched blockchains and utilities, the industry reached a value of over $2 trillion at its all-time high (almost equivalent to the largest public Web2 company, Apple, in terms of market capitalisation).
Shardeum aims to make Web3 and decentralisation widely adopted by solving the scalability trilemma and ensuring consistently low gas fees. The network's intrinsic design incorporates innovative mechanisms to tackle both inequity and the MEV crisis that plagues blockchain networks.
Dynamic State Sharding and Transaction-Level Consensus
Shardeum will employ time-based transaction ordering before network validators validate and reach consensus on each transaction. The L1 smart contract platform will achieve linear scaling through dynamic state sharding. It will distribute its state evenly by allocating compute workload, storage, and bandwidth among all the nodes while also automatically auto-scale the number and size of shards based on the prevailing workload dynamically.
It is worth highlighting that, on Shardeum, processing and consensus occur at the transaction level, not at the block level, enabling parallel processing of transactions across shards while preserving atomic and cross-shard composability. Shardeum will ensure that complex transactions and smart contracts can be executed efficiently in a sharded environment while maintaining blockchain consistency. After individual validation and processing across shards, the transactions will be grouped together without any restrictions on the size and limit of such groups or partitions. These grouped partitions will be forwarded to archive nodes on Shardeum, responsible for storing transaction history.
Linear Scalability & Immediate Finality
Every node added to the network, especially during periods of increased demand, will promptly form shards, thereby increasing its throughput proportionally. If one node can process one transaction per second (TPS), then 1000 nodes can process 1000 TPS, and so forth. Due to Shardeum's linear scalability, transaction fees on the network will consistently remain very low and predictable. Consequently, the network's finality will be instantaneous, matching the network's latency of 0.2 seconds across the entire network, with a 0% chance of reversibility once a transaction is finalized.
In addition to its linear scalability, Shardeum's reliability in terms of composability and immediate finality will eliminate latency and MEV-related challenges in the context of a time-based ordering protocol. This further obviates the need to exclusively develop layer 2 solutions for scalability purposes while simultaneously preserving the network's time-based ordering, independent of the dApps built upon it.
Consensus Algorithm Preventing Sybil Attacks
The consensus algorithms used in Shardeum will play a significant role in promoting fairness within the network. Shardeum employs the Proof of Quorum (PoQ) and Proof of Stake (PoS) consensus algorithms to process transactions on the network. PoQ enables a trustless and leaderless gathering of votes after validations, followed by reaching consensus on individual transactions. PoS will ensure that validators stake a minimum amount of network coins to participate in the consensus process. Misbehaviors will result in penalties. Notably, the consensus algorithm will enable the automatic rotation of validator and standby nodes randomly to enhance security, regardless of the network's load.
Attaining a High Level of Fairness
The effectiveness and outcomes achieved through dynamic state sharding, automatic scaling, and the consensus mechanism on the network will empower Shardeum to uphold an independent and self-regulating clock synchronization. Consequently, this will enable the network to process transactions on a First-Come-First-Served (FCFS) basis. No transaction will receive preferential treatment or be prioritised over others based on factors like the identity or wealth of the sender, or any other discriminatory criteria. Every transaction is treated impartially and processed in the order it enters the transaction pool. As you can appreciate, time-based ordering will only be efficient when the network scales automatically in line with a robust consensus algorithm and atomic composability.