Vertex Protocol is a DEX protocol built on Layer 2 Arbitrum. Vertex provides Spot Trading, cross-margin and perpetual trading products, and integrates lending pools so that users with idle Capital can Capital traders using said cross-margin products.
Vertex uses both CLOB and AMM to operate its model ( Hybird Orderbook AMM ). This article will help you access the operating mechanism of Vertex Protocol. To have a more general overview of Vertex and perpetual, you can refer to the following related content:
Overview of Products Vertex Offers
As mentioned, Vertex is currently providing 3 main products:
- Spot market: spot trading.
- Perpetual market: trading perpetual Futures Contract .
- Money market: lending.
Spot transactions are buying and selling transactions that are performed immediately. Currently the payment unit being accepted on Vertex is $ USDC.e, this is $USDC issued by Circle on Ethereum and later bridged to Arbitrum One by Arbitrum Foundation. Although this is not actually Circle's native $USDC , these technical factors aside, it can be considered $ USDC.
Users can use $USDC to trade buy and sell with different assets and optionally choose leverage or not. With leverage mode, users essentially borrow money via cross-margin to trade with a maximum leverage of x, the Capital will come from users of "Money Market".
The default trading account on Vertex is a margin account, meaning the balance in the account will automatically be used as collateral for leveraged spot transactions.
Non-leveraged and leveraged transactions via cross-margin are both counted as spot transactions. While leveraged transactions through perpetual Futures Contract will be handled separately in a separate channel for Derivative transactions.
Hybird Orderbook AMM
The Hybrid Orderbook AMM model includes 3 main components:
- AMM (onchain)
- Risk engine (onchain)
- Sequencer (off-chain)
The location of these 3 components can be visualized through the structure diagram of Vertex as shown below:
The above diagram can be explained as follows:
- When traders send orders on Vertex, sequencers will be in charge of receiving orders, matching orders together and storing unmatched orders in a centralized memory. All of this is done off-chain and is done by Vertex Sequencer. Simply put, Vertex uses an off-chain orderbook.
- After the orders are matched, the money transfer process will take place on Vertex's smart contract layer (on Arbitrum). First, information is filtered by Risk engine - a risk management tool, which is responsible for confirming transaction information from participating parties to ensure the accuracy and completeness of information (onchain).
- If the Vertex Sequencer does not match orders - in other words, orders that are not processed by CLOB will be pushed to AMM. This model is applicable to both Spot Trading and perp transactions.
For Spot Trading , Vertex uses the same AMM as Uniswap V2, using the formula x*y=k. For perp transactions, Vertex uses vAMM to leverage volume.
Here we can take the following example to easily understand how a transaction on Vertex is performed:
Data from the video channel can be understood as follows:
Alice is a trader making trades on Vertex. This is a buy order of 75 ETH at a price of $1200/ ETH, with a maximum slippage of 1% (maximum slippage is $1210/ ETH).
In the case at the price of $1200, the liquidation on the orderbook - or in other words, the volume of ETH sell orders on the orderbook is only 25 ETH, clearly not enough to fill 100% of Alice's buy order volume, then the trade order of Alice will be split into three parts by Vertex.
- The first portion matched with the entire liquidation on CLOB at the $1200 price is 25 ETH.
- With data of "maximum slippage of 1%", 50% of the remaining order volume (corresponding to 25 ETH) will be swapped via AMM, with liquidation in the price range from $1200 to $1210.
- The final 25 ETH will be matched on CLOB at $1210
This is a relatively complex order matching mechanism. Maybe you will wonder: " Why not match completely with AMM or CLOB? "
The answer includes two factors:
- Vertex needed a trading model that could be used for both spot and perpetual trading
- AMM is more efficient for spot trading. CLOB is more efficient for perpetual trading.
AMM and CLOB, when integrated according to the above method, will compensate for each other's shortcomings:
- The nature of a Perp DEX CLOB will help users have a smooth experience like trading on CEX, because the orderbook allows placing limit orders, familiar UI-UX and low transaction latency.
- The nature of an AMM DEX can solve the problem of Tokenomics, Money Game because to operate an AMM, one must have LP and strategies on revenue Chia , yield boosting, administration, etc.
In short, for this model combining AMM and CLOB, CLOB will always be given priority to match orders for users. In case CLOB lacks liquidation or has maintenance or outage issues from the Sequencer side, the order will be sent to AMM for liquidation.
Vertex's operating mechanism is closely tied to their economic model. Readers can refer to the article What is Vertex (VRTX)? Vertex Protocol Cryptocurrency Overview to grasp the relevant factors.
vAMM Of Vertex Protocol
As mentioned above, Vertex's Spot Trading is a combination of AMM and CLOB, while Vertex's Perpetual trading is a combination of vAMM and CLOB.
To concretize Vertex's model, the article will analyze Vertex's vAMM in more detail because vAMM on the market has developed through many versions and many different variations.
Currently Perp DEXs that operate using vAMM are based on the Perpetual Protocol V2 model with real liquidation , which means that LPs are still required to function like spot DEX AMMs. This is an almost completely different model from the non- liquidation vAMM version of Perp V1.
Vertex is similar, providing liquidation for vAMM will be a single-side liquidation provision mode with liquidation entirely in USDC.
13/ The x*y=k pools architecture of AMMs is adopted for both spot and perp markets. Traders can provide liquidity to different pools:
— Vertex (@vertex_protocol) December 12, 2022
- Perps – single-sided USDC (vAMM).
- Spot – provides both the asset and quote (borrowing enabled) – AMM.
Currently, to provide liquidation to Vertex's vAMM, users will have to add liquidation on another client provided by Elixir.
To understand more about vAMM, people can refer to the article What is vAMM (Virtual AMM)? Overview of Virtual Automated Market Maker .
Conclude
Current Derivatives projects have not yet finished their journey to find the most effective model for Derivative trading to ensure benefits between both users and projects. An effective operating mechanism also needs to be associated with a win-win tokenomic model for participating parties.
The idea of Vertex Protocol is to combine both CLOB and AMM/vAMM, demonstrating profound learning from previous models.
Finally, and most importantly, Derivative trading tools need to prove their sustainability through the most volatile periods, the black swans of the market.
The post How Vertex Protocol Works appeared first on HakResearch .