Author: Yilan, LD Capital

Public chain order book track pattern

When it comes to DEX, most people will immediately think of AMM, which is very useful and a key DeFi original mechanism. Although compared to AMM, onchain LOB (on-chain order book) has been criticized for lacking LP ecology and regulatory arbitrage on the chain of centralized exchanges, onchain LOB also plays an important role in the entire DEX track, especially for professional traders and institutions, and is an important sub-track of the DEX track.

Overall, order book exchanges can be divided into four types. The first type has excellent transaction speed and throughput and other high performance, but is highly centralized CEX, which is the trading choice of most people in the market, such as Binance/OKX. The second type is the Ethereum L1 chain order book, such as Gridex, which achieves a high degree of decentralization. However, since transactions are executed directly on the chain, performance is limited and users need to pay higher gas fees. The third type is a high-performance off-chain order book based on Rollup, which matches off-chain to reduce gas fees and batches settlement on the chain to ensure security, such as dYdX v3, Vertex, Zigzag, etc. ETH L2 Base recently called onchain order book dex to become part of its ecological fund and deploy it in its ecology. The development of each L2 will provide a good development soil for onchain orderbook. The fourth type is a high-performance DeFi native chain/custom chain that meets the high-performance needs of orders, such as Injective and Sei, which has not yet launched the main network, dYdX V4, etc.

Among the fourth type of DeFi order book protogenesis chains, in addition to typical projects including Injective, dYdX V4 and SEI, which are currently being tested, there are also Osmosis, Kujira and Crescent. Currently, DYdX and Injective have developed on a large scale. Benefiting from the Ignite consensus framework (formerly Tendermint, a proprietary Byzantine Fault Tolerant BFT PoS infrastructure), IBC and the special structure of customizable SDKs, almost all order book protogenesis chains are built on the Cosmos ecosystem. However, Injective is a pioneer in building on-chain orderbooks on Cosmos.

This article mainly introduces Injective in the DeFi order book native chain, focusing on the core advantages and moats of the public chain order book DEX and the situation of competitors, and the question of whether Injective has an advantage in fundamentals.

Injective is an interoperable L1 blockchain optimized for DeFi. In fact, before the announcement of the integration of Cosmos, Injective was also seen as an L2/sidechain of Ethereum, but after having a consensus layer and sovereignty on Cosmos, Injective has become a financial infrastructure with plug-and-play functions, covering high-performance on-chain decentralized exchange infrastructure, decentralized bridges, oracles, and composable smart contract layers with CosmWasm. Other protocols in the ecosystem can use Injective's onchain-orderbook to start liquidity and matching services, adding a layer of composability.

The construction of Cosmos Tendermint/Ignite, SDK, and IBC technical components helps Injective leverage the network's high Finality and low transaction costs to support its order book functionality and further improve capital efficiency and liquidity segmentation while maintaining interoperability with Ethereum, using the FBA (Frequent Batch Auction) order matching engine, which aggregates each order together at the end of the block and executes all market orders at the same price to help prevent front-running OME (order matching engine) methods. This enables Injective as a decentralized financial infrastructure to have decentralization, high transaction speed, high finality, and anti-MEV moats compared to traditional financial order books and other AMMs.

Injective Construction

Injective Chain is the core component of Injective. The Injective chain built using the Cosmos Tendermint/Ignite standard inherits decentralization, security, and high performance.

The figure above shows the entire Injective Stack structure

Service Domain

The service layer acts as a bridge between exchange DApps (such as Helix) and the underlying blockchain layer. It consists of multiple APIs, including the Exchange API, Coordinator API, Derivatives API, and The Graph API. These APIs play a key role in ensuring seamless communication between different components in the Injective ecosystem, helping users conduct transactions and access various DeFi services. The APIs within the service layer enable Helix to interact with the Tendermint/Ignite-based Cosmos chain and the Ethereum blockchain. This modular API design approach provides greater flexibility and scalability, ensuring that Injective can continue to grow and evolve to meet the ever-changing needs of the DeFi space.

Cosmos Layer

The Cosmos layer is the foundation of the Injective chain, built on Tendermint/Ignite, and is responsible for executing various types of transactions and derivative orders. This layer contains the Injective API and the Injective EVM remote procedure call (RPC), which enables connectivity with the Injective chain and the Injective Explorer. EVM (Ethereum Virtual Machine) is a decentralized, Turing-complete virtual machine used to execute smart contracts on the Ethereum blockchain. Injective Explorer is a tool for tracking all transactions conducted on the Injective chain, providing users with valuable insights into platform activity and performance. Tendermint's instant deterministic properties make it ideal for supporting the Injective chain as it enables fast transaction execution and settlement. The Cosmos layer also offers a range of security and performance advantages, including the Tendermint/Ignite consensus mechanism, horizontal scalability, and a powerful application framework for building custom blockchain applications.

Importance of consensus mechanism

Tendermint/Ignite was chosen as the consensus mechanism for the Injective chain because it provides near-instant finality, a high degree of fault tolerance, and support for horizontal scalability. In the context of a trading platform, near-instant finality is particularly important, ensuring that transactions can be executed quickly and efficiently without the risk of rollbacks or double spending. This allows Injective to maintain a high level of performance even as the volume of trading activity on the platform increases. Tendermint's PoS consensus algorithm also provides a high degree of fault tolerance, ensuring that the Injective chain can still operate correctly in the presence of malicious or faulty nodes.

The specific implementation method is that the Tendermint/Ignite protocol uses multiple rounds to propagate blocks to network validators through proposal messages. For a block to propagate, it must be voted in by multiple block proposers and signed by the private key of the corresponding validator. Validators communicate on Tendermint/Ignite through the peer-to-peer (P2P) gossip protocol. In order for a block to be considered valid, more than two-thirds of the validators must accept the block, which is also called the Byzantine Fault Tolerant (BFT) Proof of Stake (PoS) consensus mechanism.

Ethereum Domain

The bridge layer is essential for cross-chain interoperability and communication between Injective and the Ethereum network. It consists of the Injective Bridge smart contract, which itself relies on Wormhole, Peggy, IBC, and Axelar. The bridge layer interacts with the Injective chain, the Ethereum network, and other supported blockchains. Injective Bridge enables bidirectional transfers of ERC-20 tokens and assets between the Injective and Ethereum blockchains through Peggy. This cross-chain interoperability enabled by Wormhole, Axelar, and IBC is essential for decentralized blockchain infrastructure as it allows different networks to seamlessly share data and assets. Through the Injective Bridge, Injective and the entire Cosmos ecosystem can inherit part of the huge liquidity on Ethereum by leveraging the capabilities of the Ethereum network and its DApps ecosystem.

Background of the project

Injective was incubated by Binance and is one of the eight projects in the first phase of Binance Labs. It has received support from many investment institutions. Binance was greatly affected by the SEC crackdown, but the impact on the decentralized exchange Injective was limited.

Injective Protocol co-founder and CEO Eric Chen graduated from the School of Computer Science at New York University. The core team has a good professional background and has work experience in internationally renowned companies such as Open Zeppelin, Amazon, and hedge funds. The core members of the team graduated from well-known universities such as Stanford University.

On July 29, 2020, Injective raised $2.6 million in a seed round led by Pantera Capital, with participation from QCP Soteria and Axia8 Ventures.

On April 20, 2021, Injective raised $10 million in a "party" financing round, with participation from Pantera Capital, Mark Cuban, and Hashed.

On August 10, 2022, Injective raised $40 million in a funding round that included participation from Jump Crypto and BH Digital.

In January this year, Injective announced the establishment of a $150 million ecological fund to promote ecological development. There are currently more than 20 projects in the Injective ecosystem, including Astroport, Celer Network, Helix, etc. In April, Injective announced a partnership with Tencent Cloud to support developers on Injective.

Tokenomics

The total amount of INJ is 100mln. Block rewards are compensated by minting new tokens, so there is inflationary pressure. The target inflation rate of INJ tokens is 7% in the initial state, and gradually decreases to 2% over time. However, 60% of the handling fees are used to repurchase INJ and destroy it, making it currently in a deflationary state. More than 90% of the tokens have been released, and about 5% have been released recently (June-August), most of which come from Team, Advisors, Ecosystem Develpoment and Community Growth. The part belonging to Team and advisors may become potential selling pressure, and the rest will be converted into APY within Injective. There will also be a certain amount of selling pressure, but higher incentives will increase Injective ecological data.

INJ is deflationary, 60% of the fees generated by dAPP will go into the on-chain buyback of INJ and destruction (60% of the trading fee is auctioned to Bidder, Bidder bids with INJ, and the INJ obtained from the auction will be destroyed). The weekly supply destruction will have a deflationary effect and offset the increase in supply caused by token casting to a certain extent. More precisely, the annual inflation rate of 39.78 million staked INJ is 5%, which is equivalent to casting 2M INJ in one year. The cumulative destruction has reached 5.32M INJ, accounting for 5.32% of the total supply.

Image: INJ Burn

Figure: INJ Stake

Value Capture

1) Protocol Fee Value Capture

After 40% of the transaction fees are distributed to exchange DApps, Injective uses the remaining 60% for repurchase. The protocol conducts an auction every week, and participants bid for the fees of that week through INJ. The auction winner receives a basket of tokens and profits from arbitrage opportunities, while the protocol uses the proceeds to buy and destroy INJ to maintain the deflationary nature of the INJ token.

2) Security of Proof of Stake (PoS) based on Tendermint

INJ tokens are used to ensure the security of the Injective blockchain using a proof-of-stake mechanism. Both validators and delegators can participate in staking.

3) Developer Incentives

40% of the fees generated by users of dApps built on Injective are used directly to incentivize new developers to build applications on Injective, which will lead to an ever-growing developer base.

4) Protocol Governance

The INJ token is responsible for managing every component of Injective, including chain upgrades.

Token allocation

Token sales data

Source: Binance Research

Ecological Projects

There are currently 24 Dapps that have been launched on the Injective mainnet. Most of the Dapps are Defi-related, and there are also applications related to communication infrastructure, information protocols, NFT, etc. built on Injective.

Source: https://www.rootdata.com/EcosystemMap/list/247?n=Injective

Injective Main Dapp

Source: Injective Official

Helix

Helix is ​​the Injective order book trading frontend, originally known as Injective Pro. Its goal is to provide cross-chain spot and perpetual contract markets, enabling users to trade a variety of cryptocurrencies. Helix supports zero gas fees, which helps reduce transaction costs for users.

Myth

After a long period of anticipation, last month Injective Labs officially announced Mito, formerly known as "Project X", and launched closed testnet access to the platform. Mito is a protocol consisting of automated trading vaults driven by smart contracts, each of which executes advanced trading algorithms and is usually only held by institutions and hedge funds. It is currently in the early access stage. Mito includes two key components: an automated strategy vault for easy yield generation and a sophisticated token launch platform. Through this innovative platform, users can access a variety of trading strategies to generate yield while exploring new tokens in the cryptocurrency space.

Astroport

Astroport is an AMM protocol that allows any user to exchange or provide liquidity (LP) for crypto assets using multiple types of pools, including Curve-style stablecoin exchange pools and Uniswap V2-style constant product pools. Astroport is able to leverage Injective's interoperable network to exchange assets bridged from Cosmos or Ethereum, as well as chains such as Solana, Aptos, and Avalanche through Injective's Wormhole integration.

Since Astroport is built on Injective, users will be able to leverage Injective’s interoperable network to swap assets bridged from chains like Cosmos or Ethereum and Solana through Injective’s recent Wormhole integration. Users can bridge assets to Injective via the Injective Bridge, then create a liquidity pool on Astroport, start earning returns as a liquidity provider and start trading new markets.

Astroport brings important advantages to the Injective ecosystem. Originally built on Terra, Astroport contributors spent a lot of time analyzing multiple major L1 networks and finally decided to use Injective as the custodial chain for its V2 version. Astroport has now officially migrated its mainnet to Injective, becoming one of the largest AMMs in the Injective ecosystem.

Source:@astroport_fi

As of the end of June, Astroport’s total TVL was 32.94M, and its TVL on the Neutron, Terra, and Injective chains were 21.99M, 6.42M, and 4.52M, respectively.

Competitive Landscape

SEI is a protocol that is comparable to Injective in terms of consensus mechanism, OME type (FBA), FDV, etc. SEI differs from Injective in terms of OME mechanism in details, which will be introduced in detail below.

DYDX is about to migrate from Ethereum to Cosmos to launch the dYdX chain (dYdX V4). Currently, V4 is in the testnet. The launch of the dYdX v4 mainnet may have a certain impact on Injective's market share. The specific impact depends on the trading incentives and institutional preferences of the two. From the perspective of the token release stage, 90% of Injective tokens have been released. DYDX, including the SEI that has not yet been launched, may have an advantage in the token incentive space.

In terms of valuation, SEI completed $30 million in financing in its last round at a valuation of $800 million, with participation from Jump Capital, Distributed Global and others. Injective’s current valuation is less than $800 million, while dYdX’s is $1.9 billion. Injective’s valuation still has room for growth, but Injective’s key business data on trading volume is obviously inferior to other competitors (Helix 24hrs trading volume 22mln, dydx 600mln). The gap with dydx’s trading volume is very large, which is related to the fact that Injective’s trading pairs are mainly assets within the Cosmos ecosystem.

Compared with other blockchains on the Cosmos network, Injective is currently the fastest, with an average block time of about 1 second. As can be seen in the figure, Injective's block speed is significantly higher than other chains.

Source: https://hub.mintscan.io/chains/monitor

Order Matching Engine (OME) Comparison

Source:OME Comparison by 3V labs

The above picture is a comparison of the order matching mechanisms of SEI, Injective, dYdX V4, Serum, and Uni V3 by @3V Labs

The order book needs to defend against MEV, which is required for processing large-scale institutional-level order flows. Currently, the MEV defense mechanism of most public chain order book DEXs is to minimize bad MEV through frequent batch auctions (FBA). In addition to FBA, Off-Chain low-latency OME is the order matching mode of dYdX V4.

For Injective, the FBA matching mechanism is an important upgrade, which adopts a frequent batch auction model. The result is to maintain fast transaction time, close to market prices through higher liquidity, and narrow spreads.

So what is FBA? To understand FBA, you need to first understand the concept of continuous double auction CDA. FBA actually solves the problem of CDA capital inefficiency.

Problems with CDA Continuous Double Auctions

Centralized exchanges in crypto derivatives and traditional financial markets use a continuous double auction (CDA) model. In this model, orders are processed as soon as they arrive at the exchange. This can be achieved by either executing the order immediately on the other side of the order book or by keeping it on the order book until a matching order is found.

The way a continuous double auction processes orders incentivizes speed, while the highly volatile market creates huge arbitrage opportunities. The role of market makers (MMs) is to follow the market price of an asset and provide depth by placing orders on both sides of the order book. As prices move, MMs must cancel and create orders accordingly.

However, in the time period between price updates from external signals, high-frequency traders (HFTs) have the opportunity to execute obsolete MM orders before the MM cancels the order. Thus, HFTs are able to extract arbitrage gains. The profits from this obsolete order snapping game are so large and continuous that HFTs invest in advanced technologies such as microwave towers and FPGAs to compete in nanosecond (billionth of a second) speeds, leaving MMs at an insurmountable disadvantage.

Due to these apparent problems, MMs are often forced to increase their investments in competing technology solutions, which are often indirectly paid for by traders through higher transaction fees. In addition, MMs often become more risk-averse by offering a lot of depth near the market price. This not only hurts retail traders who want to execute their orders at a fair price, but also creates high volatility within the spread, undermining market stability on small timescales. As a result, retail traders are often forced to enter positions at prices that are not ideal.

The matching engine of a continuous double auction requires high throughput processing at unpredictable times, while the demand is small most of the other time. Even when built by a centralized institution, exchanges based on continuous double auctions can rarely meet the market demand for 100% uptime. The situation is further exacerbated within the scope of blockchain networks. As a result, decentralized exchanges have much less flexibility to solve the same challenges than today's most modular centralized exchanges.

In the design of the continuous double auction (CDA) on decentralized exchanges, minor changes have proven to be unsatisfactory and ultimately only cause financial losses to retail traders. For example, orders are not prioritized by submission time, and orders that pay higher gas fees are executed while other orders with reasonable gas fees are ignored.

Anyone who has traded aggressively on a particular AMM exchange protocol has experienced the pain of being paid by high gas fees to take advantage of a bot that is profiting at the margin of a trader’s slippage tolerance. AMMs are designed to eliminate the need for institutional MMs, and the capital inefficiency costs associated with CDA are passed directly to retail traders.

Let’s look at the advantages of FBA and Injective FBA

Injective’s Frequent Batch Auctions (FBA) are widely proposed as a clear solution to the capital inefficiencies associated with CDA. One benefit of FBA is that it improves market fairness and liquidity by eliminating front-loading transactions.

Injective FBA is defined by three characteristics:

1) Discrete time: Orders are accepted during a discrete period of time called an auction interval. At the end of each auction interval, cross orders are filled in the following priority order:

Market orders are filled first, then unfilled limit orders from previous auction intervals, and finally limit orders from the latest auction interval. If the buyer and seller have different quantities, the smaller quantity is fully filled, while the larger quantity order is filled proportionally (evenly partially filled).

2) Unified clearing price: Limit orders are filled at the unified clearing price of the highest cross order quantity. If the quantity of the buyer and seller is the same, the middle price is used as the clearing price.

3) Closed bidding: orders are not published to the order book until the auction interval ends and the batch auction is executed. This eliminates the possibility of front-running and negative spreads.

Market Maker Incentives in Frequent Batch Auctions The relatively long auction intervals provide market makers with enough time to cancel outdated orders before HFTs can be executed. This eliminates the risk of market makers having to deal with front-end trade issues and therefore does not require them to invest capital in advanced technology.

Market makers are incentivized to provide deeper liquidity and tighter spreads around the market price, which is not only a better situation for retail traders trying to fill orders at close to the fair price, but also reduces the volatility associated with potential price crashes.

Frequent batch auctions aggregate orders into a set of auction intervals for state changes or order book inclusion. The blockchain queues and writes transactions to continuously generated blocks in batches. The optimal batch interval for FBA is still controversial, but has been reported in academic papers to be between 0.2 and 0.9 seconds, which is consistent with Injective's auction interval, where batch auctions are executed at each end block.

SEI, as a protocol for using FBA as order matching on Cosmos, has some differences from Injective FBA at the detail level, such as 1) SEI implements parallel processing of blocks and no longer processes transactions sequentially. Multiple transactions involving different markets can be processed simultaneously, thereby improving performance. According to recent load tests, it can be seen that the block time is reduced by 75–90% compared to sequential processing, and the latency of parallel processing is 40–120 milliseconds, while the latency of sequential processing is 200–1370 milliseconds;

2) SEI's price oracle is responsible for streaming off-chain price data onto the blockchain and is built into the chain. This means that all validators need to propose their prices (exchange rates) when submitting blocks. Blocks are created only when all validators agree on a common price. If a validator misses certain voting windows or the price provided deviates too much from the median, it will be punished;

3) Trading order bundling, market makers can cancel and create orders involving multiple markets in one transaction (i.e., combine all BTC perpetual contract orders into a smart contract call for a specific market).

Injective is built on Tendermint/Ignite's BFT-based PoS consensus, with instant finality features, which fits in well with the FBA execution at the end of each interval. Since FBA has no concept of time priority within the auction interval, it is a market design that perfectly matches blockchains running on the same foundation. This is because Tendermint/Ignite is a consensus engine based on the BFT (Byzantine Fault Tolerance) consensus algorithm. It uses a pre-selected set of validator nodes to reach consensus, and votes and confirms the order of transactions through consensus rounds. Tendermint/Ignite is designed with high security and determinism, suitable for application scenarios that require strong consistency and finality, and this design fits perfectly with Injective's infrastructure.

By replacing the Continuous Double Auction (CDA) with a Frequent Batch Auction (FBA), Injective has adopted a market design that is technically robust and competitive with centralized exchanges. Injective is able to eliminate front-running trades that harm traders and help market makers provide deeper liquidity and tighter spreads. The implementation of frequent batch auctions prepares Injective to compete with institutional-grade centralized exchanges for trading volume.

Summarize

Injective has the best transaction speed, instant finality, almost zero gas fees and MEV protection. These advantages come from 1) the block confirmation speed based on the Tendermint BFT consensus mechanism is fast (but the degree of centralization is relatively high) and has timely finality; 2) since the exchange broadcasts the signed message to the Injective Chain node instead of the trader itself, all fees related to the chain interaction are paid by the exchange's DApp, which means that traders do not need to pay any gas fees; 3) Frequent batch auctions (FBA) are used as an order clearing mechanism. Orders submitted to the memory pool are executed at the end of each block (about 1 second block time) and will not be published on the order book before the auction process is completed, which effectively prevents MEV bot front-end transactions.

Compared with AMM, the built-in settings of Injective onchain order book are more friendly to ordinary users, especially institutional strategic orders (for example, AMM cannot currently implement stop-loss orders, but Univ4 may be able to implement them to some extent). AMM has a huge TVL, and LP has become an organic part of the entire market. For LOB, there is a natural lack of on-chain staking assets, and the attraction of MM requires external subsidies. It is difficult to form an LP ecosystem similar to AMM, and it is impossible to capture the value chain derived from the LP ecosystem. Of course, AMM-like products can also be built on Injective, but currently the main transaction volume of Injective still occurs on the Orderbook front-end Helix.

Before Rollup improves LOB dex performance on a large scale, building a native chain on Cosmos is still the best solution for high-performance LOB. The launch of dYdX v4 mainnet may squeeze Injective's market share to a certain extent, depending on the trading incentives and institutional preferences of the two. LOB dex on Rollup will also form a certain competition, but due to the definition of dapp as a non-public chain and lack of sovereignty, the valuation system is completely different from the order book native chain. LOB DEX and AMM both use a decentralized approach. At this stage, there is no need to define what the final form is. This market always needs diversified solutions.

Injective uses LOB as the core trading model and has the feature of "MEV protection". It provides a highly decentralized, high-performance and reliable environment built on Tendermint and can be used for trading cross-chain derivatives, foreign exchange (FX), synthetic assets and futures. It provides a safe and efficient platform for institutional order flows and market makers for trading applications, and eliminates the risk of market manipulation and exploitation by high-frequency traders. The implementation of frequent batch auctions has prepared Injective for the trading volume competition with institutional-level centralized exchanges, making Injective a decentralized trading platform that is naturally supported by institutions. But this also means that the price of Injective is closely related to the support of institutional funds. In the next cycle, the transaction engine based on high-performance chains, one-click chain issuance and other engineering implementations will further promote professional market makers to establish liquidity in the DEX field, and together with AMM, help the pricing power gradually shift from CEX to DEX.

website: ldcap.com

medium:ld-capital.medium.com