Skip to content

MarginX 2.0 and Roadmap

Revisiting our initial inspiration – Freedom to trade

 

 

What drives us to build MarginX

The freedom of listing, trading and utilizing derivatives – is at the core of our mission at MarginX, a decentralized infrastructure. Our goal is to establish a trustless, inclusive, transparent, and automated framework that facilitates unfettered trading.

To realize this vision, the system must first embrace the freedom of listing. Just as Uniswap did for spot trading in 2018, MarginX extends this concept to perpetual trading.

In MarginX 2.0, we intend to decentralize both the “listing” and “market-making” components, fully adopting the AMM (Automated Market Maker) approach for perpetual order books, which we’ve termed “Automated Limit Order Book Market Maker For Perpetual Market” or “ALO.” Market participants will have the authority to determine which assets or tokens they wish to trade or provide liquidity for, based on their own risk preferences – placing this decision in the hands of traders rather than the platform itself.

The entire process mirrors that of Uniswap, albeit tailored for the perpetual contract market. A liquidity provider gains the freedom to list any desired perpetual pair by injecting funds and configuring parameters. Trading fees, funding fees, as well as trading profits and losses, are equitably distributed among all liquidity providers. This structure delineates risks and rewards unambiguously.

This process is characterized by its permissionless nature, automation, and transparency.

 

 

Mechanic

The mechanics of our smart contract involve the integration of two key pools:

Liquidity Pools: This pool is comprised of funds contributed by market participants.

Position Pools: This pool encompasses all accumulated position sizes, both long and short, that have arisen during trading activities.

Market participants inject funds into the smart contract, specifically into the liquidity pools. Subsequently, the smart contract undertakes the task of generating limit orders on both the bid and ask sides. This generation process adheres to the formula:

X . Y = k (or alternately y = ax + b), in alignment with the guidance provided by the oracle price.

The X . Y = k formula serves the purpose of determining the depth of the order book as well as the spread. These determinations are established based on the equilibrium of the liquidity pool’s balance.

This approach underscores the mathematical foundation that orchestrates the dynamics of our smart contract, facilitating an optimized trading experience for all participants.

[diagram 1]

The liquidity pool operates by deploying a series of limit orders onto the market book. As a limit order gets executed, the associated margin for that specific order becomes immobilized, transforming it into a position within the Position pools. To eventually regain the locked margin along with potential profit or loss, these positions must be closed.

To optimize the capital deployment timeline and enhance utility, the Position pools will take action. Specifically, they will initiate a close position limit order using a designated margin on the opposite side. For instance, if the initial position was a long one, the Position pools will promptly generate a short position order. This strategic maneuver aims to efficiently manage the position and associated resources, thus streamlining the overall trading process.

[diagram 2]

The selection between order book and swap (AMM)

Amidst the ongoing debates between swap and order book models, MarginX has chosen to apply the order book model for specific reasons, with a focus on encouraging external party participation in trading. Reflecting the ethos of trade freedom, MarginX aims to empower anyone to place their orders—be it market or limit, maker or taker—ensuring that the Automated Market Maker (AMM) is not the exclusive counterparty. The order book model fosters individual strategy deployment, providing participants with the flexibility to engage at any time.

Market conditions are dynamic and intricate, defying a one-size-fits-all solution, including formulas like X . Y = k. The order book mechanics, however, extend an open invitation to various market stakeholders—seasoned traders, market makers, arbitrageurs—to collectively bridge potential gaps.

The cornerstone of market liquidity is the “Automated Limit Order book Market Maker For Perpetual Market” (ALO) model. ALO operates as an enticing complementary force, luring and motivating external participants such as arbitrageurs, traders, and market makers to partake.

Another rationale for adopting the order book model is the pliability of the price spread (price gap). Considering the heightened volatility and occasional liquidity constraints in exotic trading pairs, liquidity providers demand increased returns commensurate with the associated risks. This, in turn, translates to larger bid-ask price differences in harmony with market dynamics.

Furthermore, the order book model widens the door for additional market participants to bridge the price gap, leveraging diverse market viewpoints to potentially achieve equilibrium. This inclusivity nurtures a well-rounded trading environment where multiple perspectives contribute to market stability

Risk and reward of Liquidity Providers

Liquidity providers play a crucial role in the ecosystem, willingly embracing the potential risk of impermanent loss or gain by contributing liquidity to the pools. In exchange for their participation, the liquidity pool becomes eligible to receive a share of various fees, including trading fees, liquidation fees, and funding rate commissions. These accumulated fees are then distributed proportionally among all participants.

Here’s a breakdown of potential scenarios:

Trading Gain + Fees: The liquidity providers experience and trading gain, and the earned fees further enhance their overall profit.

Fees > Trading Loss: In this case, the fees earned by the liquidity pool outweigh any trading loss incurred, resulting in a net gain for the liquidity providers.

Fees = Trading Loss: The earned fees cover the trading loss, ensuring that liquidity providers don’t face any net loss.

Fees < Trading Loss: If the accumulated fees fall short of compensating for the trading loss, liquidity providers experience a net loss.

The relationship between fees and trading gain/loss underscores the intricate interplay of risks and rewards that liquidity providers navigate within the ecosystem. It’s important for liquidity providers to carefully assess their risk tolerance and potential for profit when participating in such arrangements.

Uniswap V3
dYdX
GMX
MarginX
Market
Spot
Perpetual
Perpetual
Perpetual
Market Making
AMM
N/A
N/A
ALO Automated Limit Order Book Market Maker for Perpetual Market
Order Book
N
Y
N
Y
Listing Permission
Permissionless
N
N
Permissionless
LP Token Utilization
N
N
N
Y
Model
Peer To Pool
Peer To Peer
Peer To Pool
Peer To Pool + Peer To Peer
Third Party Market Making
Not Allowed
Allowed
Not Allowed
Allowed

In conclusion, the forthcoming evolution of the Perpetual DEX represents a departure from the conventional “dex” concept. It signifies a paradigm shift, and we firmly believe that MarginX 2.0 embodies this transformative vision.

Roadmap

2023 Q3:

  • Testnet launch
  • Users add liquidity to create perpetual trading pairs (beta)
  • Order book AMM for perpetual automated market maker (beta)
  • Testnet for trading infrastructure
  • Support for WalletConnect and Keplr wallet

2023 Q4:

  • Mainnet launch
  • Order book AMM for perpetual automated market making version 1
  • Users add liquidity to create perpetual trading pairs version 1
  • Tokenize positions to represent them as tokens
  • Support for Cosmos ecosystem tokens

2024 Q1:

  • Deploy funding relay smart contract on other chains, enabling seamless integration of funds from other ecosystems into MarginX
  • Support for EVM ecosystem LP tokens
  • Support for Metamask
  • External liquidator module