Links

MUX Perpetual Aggregator

Motivation

Perpetual trading is one of the fastest growing domains in DeFi. Currently, more than 20 perpetual trading protocols are deployed on various blockchains. However, as the protocols proliferate at a rapid pace, obstacles start to appear along the way:
  1. 1.
    The liquidity is scattered on different protocols, leading to liquidity underutilization.
  2. 2.
    While the liquidity is fragmented on different chains, there isn’t a native approach to utilize the cross-chain liquidity.
  3. 3.
    The differences between pricing mechanisms and margin parameters on each protocol are vast; traders can’t easily access the optimal pricing and trading experiences.
The MUX protocol aims to provide the best-in-class trading experiences for traders. Therefore, to resolve the mentioned issues surrounding perpetual trading protocols, the MUX protocol launched the MUX Leveraged Perpetual Aggregator, a sub-protocol in the MUX protocol suite.

Mechanisms

Smart Position Routing

MUX Perpetual Aggregator automatically routes traders' positions to one or multiple liquidity sources based on market, available liquidity, position size, composite trading cost and user preferences.
Market: Traders' positions will only route to suited integrated protocols that offer the required market.
Available Liquidity & Position Size: Traders' positions will route to one or multiple suited integrated protocols that offer sufficient available liquidity to support the needed position size.
Composite Trading Cost: The MUX Aggregator will dynamically compare composite trading costs offered by all integrated trading protocols and select the most cost-effective route/routes for traders.
Unlike spot trading, the "trading cost" of leveraged trading is a composite factor containing the price, spread, slippage, price impact, position fees and other potential explicit trading costs. In addition, the composite factor also involves implicit costs like max leverage, maintenance margin, liquidation fees, available liquidity, etc. The MUX protocol comprehensively compares the trading cost of the aggregated protocols. As a result, it selects the most suitable liquidity route and minimizes the composite cost for traders while meeting the needs of opening positions. Unlike spot trading, the "trading cost" of leveraged trading is a composite factor containing the price, spread, slippage, price impact, position fees and other potential explicit trading costs. In addition, the composite factor also involves implicit costs like max leverage, maintenance margin, liquidation fees, available liquidity, etc. The MUX protocol comprehensively compares the trading cost of the aggregated protocols. As a result, it selects the most suitable liquidity route and minimizes the composite cost for traders while meeting the needs of opening positions.
User Preference: All available liquidity sources can be turned on/off under trading settings; if a liquidity source is turned off, the trader's position won't be routed to that protocol.

Leverage Boosting & Liquidation Price Optimization

Every underlying leveraged trading protocol usually requires different Initial Margin and Maintenance Margin. The differences lead to the variation of max open leverage and maintenance leverage on these protocols. Additionally, protocols with deep liquidity on the market might not offer the ideal max leverage to meet traders’ needs.
To provide optimal trading experiences and leverage options, when the MUX Aggregator opens positions on the underlying leveraged protocol on behalf of the traders, it can supply additional margin for traders to raise the leverage and lower the MM requirements. This feature can help boost the max leverage and optimize liquidation price for traders.
Suppose the required initial margin rate on the underlying protocol is IM, the maintenance margin rate is MM, then the max open leverage is 1/IM, and the max maintenance leverage is _1/MM. _When a trader wishes to open a position with a larger leverage L (L > 1/IM), then the trader only needs to provide a margin with the amount of 1/LSize and MUX Aggregator will provide an additional margin with the amount of Size * (MM - MM2). _The additional margin comes from the MUX Universal Liquidity Pool. In addition, the MUX protocol offers another maintenance margin rate (MM2), which is usually lower. When the position’s remaining margin gets lower than _MM2Size, the position will be liquidated, and the corresponding position on the underlying protocol will also be closed. When position opening and closing take place, the MUX Aggregator charges a minimal fee, which is the leverage boost fee based on the supplied additional margin. BoostFee = (MM - MM2) * Size * BoostFeeRate. When liquidation occurs, the position will settle with the liquidation price; the remaining margin will be returned to the traders after the liquidation fee charged by the underlying protocol and boost fee are deducted.
When traders open positions through MUX Aggregator, the underlying protocol will charge funding fees from traders. Since the MUX Aggregator supplies additional margin for traders, it will also charge a specific boost funding fee for traders every 1 hour. _BoostFundingFee=BoostMarginFundingRate=(MM - MM2) * Size FundingRate. _Similar to how funding is handled on the MUX protocol, the underlying protocol funding fee and boost funding fee will be deducted from the traders’ collateral. Also, if the position open time hasn’t reached 1 hour upon the funding collection time, the boost funding will round up to 1 hour; if a position is closed before the next funding collection time, no boost funding will be charged.
Example
On GMX V1, the position fee rate is 0.1%, IM is 2%, and MM is 1%. On MUX, suppose the MM is 0.5%, BoostFeeRate is 2%. When a trader tries to open a $10,000 position using 100x leverage, the trader only needs to use a margin of 10000/100=$100; the MUX protocol will supply the additional margin of (1% - 0.5%) * $10000 = $50. In addition, the trader also needs to pay the GMX position open fee of $10000*0.1%=$10 and the MUX leverage boost fee of $50*2%=$1. If the trader’s position is in a loss due to price fluctuation, the position will be liquidated when the remaining margin is below $10000*0.5% = $50. If the liquidation on GMX doesn’t have slippage, the trader needs to pay the GMX position fee of $10000*0.1%=$10 and MUX leverage boost fee of $50*2%=$1; the remaining $50-$10-$1=$39 margin will be returned to the trader.

Aggregated Position & Split Orders

MUX allows traders to open and manage aggregated positions with components routed to multiple liquidity sources. This feature can help to support large position sizes and lower overall trading costs for opening large positions.
For example, if integrated protocols A, B and C on the MUX Aggregator each have $30M available liquidity for ETH long positions, when a trader tries to open an $80M ETH long position, the MUX aggregator will split the trader's position into three orders to these three protocols in one trade; the estimated trading cost will determine each protocol's position ratio. MUX will preferably route trades' positions to liquidity sources with the lowest estimated total trading cost.

Liquidity Aggregation

When specific underlying liquidity protocols can’t meet the position needs of traders, the MUX Aggregator can aggregate the scattered liquidity from different protocols, further offering a consistent and convenient trading experience. Traders won’t need to be distracted by the liquidity supplier behind the Aggregator; they only need to focus on the unified trading interface.
For example, let’s say a user opens a $100M position through the MUX Aggregator. Within this aggregated position, $50M is on protocol A, $30M is on protocol B, and $20M is on protocol C. The obstacle to liquidity aggregation is the potential pricing differences in various protocols, and the MUX protocol can’t simply merge positions with different entry prices. To address this issue, the MUX Aggregator will use the following approaches:
  1. 1.
    Deeply collaborate with underlying leveraged trading protocols and acquire their guaranteed accurate pricing.
  2. 2.
    The MUX Aggregator can bear the underlying protocol pricing differences under a specific range, then offer traders unified pricing.

Position Container

The MUX Aggregator Protocol manages a set of smart contracts for holding traders’ positions. These contracts are called the “position containers”. When a trader opens a position through MUX Aggregator, the Aggregator will create a position container, then use it to open the position on the underlying leveraged trading protocol on behalf of the trader. From the underlying protocol’s perspective, the position container contract is its direct user. In addition, the MUX Aggregator provides an API for inquiring about the traders’ addresses behind their position containers.
Each position possesses a separate position container. The containers furthest isolate risks among the users, which is fundamental for ensuring the safety of the MUX protocol.

Roadmap

The MUX Aggregator sub-protocol is an essential component of the MUX protocol suite. The MUX dev contributors will continuously develop and deliver features to meet traders’ needs.
  • MUX Protocol V2: Composite with GMX and offer 100x leverage for traders
  • MUX Protocol V3: Launch the cross-chain aggregation feature
  • MUX Protocol V4: The integrated management of underlying positions