Sei Network – Revolutionizing the DeFi Landscape

  1. Introduction
  2. The Exchange Trilemma
  3. Sei Network – Architecture
  4. Key product differentiators
  5. Accomplishments & Roadmap
  6. Team
  7. Conclusion

Introduction

Sei is the fastest layer 1 blockchain designed to scale the industry. The chain is tailored for trading and uses novel approaches for block propagation, transaction ordering, block processing and parallelization. It optimizes every layer of the stack in order to offer infrastructure for trading apps.

Exchanges face the exchange trilemma, between decentralization, scalability and capital efficiency. It is very hard to achieve all three. With Sei, we have an answer. It has a lower bound for transaction finality at 300ms and the processing power of 20,000 orders per second. This means that sei offers high throughput and low latency without sacrificing decentralization. This will give the traders unparalleled speed and efficiency.

The Exchange Trilemma

Exchanges face the exchange trilemma, between decentralization, scalability and capital efficiency. The scalability of an exchange refers to its ability to handle a large volume of trades without sacrificing performance. The exchange can then process a large number of transactions without crashing. Blockchains are decentralized which means that the transactions are validated by all the nodes of the network. This makes it difficult to scale the blockchain as the number of nodes increases, the transaction speed becomes slower. To overcome this, we have automated market makers (AMMs). They are decentralized and they use algorithms to match buyers and sellers. They are more scalable than traditional order book exchanges, but they are less capital efficient.

Another approach to scale blockchain based exchanges is to use centralized exchanges (CEXs). They are not decentralized hence less secure, but they are scalable and capital efficient. Central Limit order books (CLOBs) and CEX are more capital-efficient because they do not require the liquidity providers (LPs) to deposit funds. They use the market makers to contribute to the depth of the market. Market makers then provide liquidity to the market by buying and selling the assets. However, CLOBs are often not scalable.

Sei Network – Architecture

Sei’s architecture addresses the limitations of previous layer 1 blockchains. Developers can customize the user experience using a native order matching engine. The applications built on Sei can be tailored easily to address the specific needs of traders. This makes it easier for the applications to scale and reach mass adoption.


Twin-Turbo Consensus

At the heart of Sei, lies the unique Twin Turbo consensus mechanism. This mechanism uses intelligent block propagation and optimistic block processing to verify the validity of the transaction at the protocol level.

When a full node receives the transaction from a user, it sends the transaction to other nodes in the network. The validators then make sure that the transaction is valid and then add it to the validator’s local memepool. This process makes sure that the transactions are distributed efficiently across the network. Sei has block proposers who look at the current state of the memepool and decide if a block be committed. During the transaction distribution process, the validators will already have most of the transactions, so they only need to include the unique transaction identifiers in the block proposal with reference to the full block. The validator can re-construct the block if it has all of the transactions from the proposal. This significantly reduces the time and resources required for block propagation.

Optimistic block processing allows the validators to start processing transactions and writing the candidate state to the cache during the pre-commit phase. This means that the validators can start processing the transaction as soon as they receive a block proposal, rather than waiting for the pre-commit stage to get completed. If the block is accepted, then the data from the cache is committed, else the data is discarded. This improves the latency of the transaction.

Parallelization

The Sei network uses parallelization to improve the throughput of the blockchain. This means that the transactions can be processed more quickly, which is important for high frequency trading applications.

Sei introduces parallelization as a part of the Cosmos SDK. There is a structured way of block processing (in the order BeginBlock logic, DeliverTx logic and Endblock logic) to make transactions in an efficient manner. In the DeliverTx phase, all transactions in a block are processed which results in state changes for most types of transactions. In the EndBlock phase, the independent central limit order book (CLOB) related orders are processed in parallel. Two orders are considered independent if they do not affect the same market.

Native Price Oracles

The native price oracle is used to determine the exchange rates of assets. Validators participate in the process to ensure that the prices are accurate. In each voting period, the validators provide their proposed exchange rates for the assets. At the end of the period, all of the votes are accumulated, and a median is calculated to get the true exchange rate for the asset. Each validator is assigned a miss count that tracks the number of voting periods in which they failed to participate or provided the false information. There are penalties for validators who do not participate in the oracle process or who provide bad data. This ensures that the oracle process is accurate and reliable. 


Native Order Matching Engine

General-purpose blockchains do not have a built-in order matching engine because it is not so valuable to them as it is for DeFi specific networks. They make use of automated market makers in DeFi, but this makes it susceptible to MEV (maximal extractable value) attacks like the arbitrage and sandwich attacks that arise when the smart contract rebalances its price. AMMs rely on liquidity providers (LPs) who deposit their token into a liquidity pool to earn fees in return. But the LPs remain exposed to impermanent loss (IL), which happens when the price of an asset changes and it can cause the LPs to lose money.

Order books do not have the same vulnerabilities as they do not require AMM functions and hence do not rely on LPs to provide the liquidity and they are less susceptible to MEV attacks. The Sei network’s native order book engine is an on-chain list of buy and sell orders on a cryptocurrency. Trades are executed when a buyer and seller are matched, and not on the basis of an algorithm. This provides a more capital-efficient way to trade assets and an easier way for traders to access liquidity.

The matching engine will not have any trading fees at chain level launch. Decentralized exchanges built on top of Sei can add their own trading fees as required. This will be defined at the smart contract level and will be easily configurable.

Frequent Batch Auctioning

Frequent batch auctioning (FBA) is a mechanism implemented by Sei network to prevent validators from front-running market orders. Front-running is a type of market manipulation where a validator places their own transaction ahead of the incoming market order in order to profit from the difference in prices. Sei’s matching engine aggregates all market orders and executes them at the same uniform clearing price. This ensures that the validators cannot profit from arranging transactions their way because they cannot see the order before it is executed. This makes the network fairer and more efficient. 

Consider an example where we have two sell orders at $10 and $11 and two market orders at the market price. With sequential execution, the first market buy order would be executed at $10 and the second market buy order would be executed at $11. However, with FBA, the average execution price would be the average of the sell orders which is at $10.50. Therefore both the market buy orders will be executed at the same price, $10.50.

Key Product Differentiator

1. Time To Finality

Sei has many positives and is different from other chains. Sei offers the fastest transaction speed on any layer 1 blockchain. Time to finality (TTF) is the time it takes for a transaction to be considered final, after which it cannot be reversed. Sei can achieve a transaction speed of 300ms which is 2x faster than sui and 1.5x faster than Aptos.

2. Transaction Per Second (TPS)

The number of transactions completed per second (TPS) is the transaction throughput for the given chain. Solana can do 10,000 transactions per seconds while Sei can do 22,000 orders per second. Sei possesses much better performance capacity than Solana.

3. Frontrunning Prevention

Sei makes use of Frequent Batch Auctioning (FBA) mechanism to prevent the validators from front-running the market orders. This ensures that the validators cannot profit from arranging transactions their way because they cannot see the order before it is executed. This makes the network fairer and more efficient.

4. Parallelization 

The Sei network uses parallelization to improve the throughput of the blockchain. This means that the transactions can be processed more quickly, which is important for high frequency trading applications. 

Accomplishment and Roadmap

Sei raised $30M across two rounds, with a valuation of $800M. As of July 2023 Sei has processed over 400.2 million transactions with a peak daily active user of 984k. The total number of wallets has increased to over 7.5 million.

During the launch of Sei, it incentivized the launch of testnet 1 in Q3 2022. After that Sei ran Dawn and Dusk Campaigns, incentivized testnet 2 launch and also ran the sunken treasure campaign in Q4 2022, Q1 2023, Q2 2023. According to the current roadmap of Sei, the mainnet will launch in Q3 2023.

The Current roadmap of Sei is shown below.

Team

Sei Labs was founded by Jeff Feng and Jayendra Jog in August 2022. It had raised $5 million at the time from Multicoin Capital, Delphi Digital and Coinbase Ventures. Jayendra Jog is a former software engineer at Robinhood and had previously interned at Facebook (Meta). Before Joining Jayendra at Sei Labs, Jeff worked as venture investor at a crypto hedge fund and has also been a part of the Investment Banking team at Goldman Sachs.

Together they make the perfect team with the right amount of experience as an investor and a developer. They felt the need to have a blockchain specifically for trading and worked diligently to scale in that direction.

Conclusion

Sei network is a specialized blockchain that aims to transform the digital asset trading sector. Sei is the first sector specific blockchain with high throughput, low fees and fast transaction speeds. It offers a solution to the exchange trilemma, as they aim to offer a promising environment for any type of trading app including DeFi DEXs, NFT marketplaces and gaming DEXs. Considering the composability and efficiency of Sei with respect to DeFi application, it is quite possible to see many more groundbreaking financial innovations in due time.