Perpetual Markets

XODEX’s perpetual markets are designed to provide a decentralized trading environment with advanced features such as leveraged trading, liquidity provisioning, and various risk management tools. By leveraging XODEX’s innovative technology, users can participate in a wide range of trading activities while maintaining control over their assets and managing risk effectively.

Liquidity Provision

Liquidity on XODEX is provided through the XODEX Liquidity Provider (XOLP) pool. Liquidity providers earn fees from leverage trading, swaps, and market making, making it an attractive option for those looking to earn passive income in a decentralized manner.

Overview

An XOLP pool consists of:

  • Index Price Feed: Long and short positions are opened and closed based on this price feed.
  • Long Token: The token backing long positions.
  • Short Token: The token backing short positions.

For example, in an ETH/USD market:

  • Index Price Feed: ETH/USD
  • Long Token: ETH tokens back long positions.
  • Short Token: Stablecoins (e.g., USDC) back short positions.

If a market is labeled as SWAP-ONLY or SPOT-ONLY, it only supports swaps and does not support leverage trading. For single-token-backed pools, both the long and short tokens would be the same. For instance, a single-token ETH pool would have both the long and short tokens as ETH.

Adding Liquidity

By adding liquidity, you receive XOLP tokens. XOLP tokens can be bought on the XOLP Pools page. Steps to buy XOLP tokens:

  1. Select the "Market" and "Pool" of the XOLP token you'd like to purchase in the "Buy XOLP" box.
  2. Depending on whether your purchase improves or reduces the balance of tokens in the pool, there will be a positive or negative price impact. This impact will be shown in the "Buy XOLP" box.
  3. If the pool is mostly balanced, a large purchase may result in a significant negative price impact. To avoid this, select the "Pair" option and buy the XOLP token with an equal USD amount of long and short tokens.

Removing Liquidity

XOLP tokens can be sold on the XOLP Pools page. Note that liquidity available for redemption is capped at the tokens in the pool multiplied by the pool's reserve factor minus the tokens reserved. If this capacity is reached, liquidity providers would need to wait for positions to close or for additional liquidity to be deposited by other providers.

Minting and Burning XOLP

XOLP can be minted using any index asset on any chain (deposit) and can be burnt to redeem (withdraw).

The price for minting and redemption is determined by dividing the total worth of assets in the index, including profits and losses from open positions, by the supply of XOLP

Token Pricing

The price of the XOLP token depends on the price of the long/short tokens and the net pending PnL of traders' open positions. Fees from leverage trading and swaps will automatically increase the price of XOLP tokens. There may be a spread for some long/short tokens, resulting in a spread when buying/selling XOLP tokens as well.

XOLP pools aim to maintain an equal worth of long and short tokens. When the price of a long token increases, there may be a positive price impact to incentivize selling long tokens for short tokens to rebalance the pool. If a pool maintains its balance, its pricing excluding PnL should mimic a pool that is 50% long token and 50% short token and that rebalances as price changes.

Risks

Caution should be exercised when interacting with any smart contract or blockchain application. While risks are mitigated through rigorous testing and comprehensive audits, there is always a risk of vulnerabilities in smart contract code.

A non-exhaustive list of risks includes:

  • Smart Contract Risks
  • Liquidations
  • Auto-Deleveraging

It's important to remember that collateral and profits might be tied to tokens that are pegged or bridged to other assets. These pegs aren't always perfect, and there's a chance the value could fluctuate significantly.

Trading

XODEX is a decentralized exchange built for simplicity and security. It facilitates direct cryptocurrency trading without requiring account registration.

Obtaining a Secure Wallet

For complete beginners, it's essential to obtain a secure cryptocurrency wallet (e.g., Tangem) to start trading on XODEX.

Start Trading: Connecting Your Wallet

Before you can start trading on XODEX, you need to connect your cryptocurrency wallet. This is a straightforward process:

  1. Make sure you have a compatible wallet, and it's funded with the necessary assets.
  2. Click the "Connect Wallet" button at the top right corner on the Trade page.
  3. Select your wallet from the options and follow the prompts to authorize the connection.

Swaps

XODEX supports both swaps and leverage trading. To perform a swap, click on the "Swap" tab on the Trade page. This will open the interface where you can easily exchange one token for another.

More details on leverage trading can be found in the following sections.

Opening a Position

To open a leverage position on XODEX, follow these steps:

  1. Select Position Type:
    • Click on "Long" or "Short" on the Trade page, depending on which side you would like to open a leverage position on.
    • Long Position:
      • Earns a profit if the token's price goes up.
      • Incurs a loss if the token's price goes down.
    • Short Position:
      • Earns a profit if the token's price goes down.
      • Incurs a loss if the token's price goes up.
  2. Enter Trade Details:
    • Key in the amount you want to pay.
    • Select the leverage you want to use.
  3. Review Exit Price:
    • Below the trade input box, you will see the "Exit Price." This is the price used to calculate profits if you open and then immediately close a position.
    • The exit price will change with the price of the token you are longing or shorting.

By carefully selecting your position type and entering the desired trade details, you can effectively open and manage leverage positions on XODEX.

Selecting a Market

You can select a market by changing the token that you'd like to long or short. Simply choose the token pair you want to trade on the Trade page to set your preferred market.

Selecting a Pool

Multiple pools may be available for your selected market. For example, there may be both an ETH-USDC and an ETH-USDT pool. You can select which pool you'd like to trade in based on your preferred collateral for backing your positions.

Selecting Collateral

Multiple types of collateral may be available for your selected market. For example, in the ETH-USDC market, you can choose whether your position's collateral is stored as ETH or USDC.

Examples of how to use different collateral types:

  • Long ETH with ETH as Collateral:
    • You would be long ETH both from your long position and from your ETH collateral.
    • For instance, you could open a 0.1 ETH long position while using 1 ETH as collateral, giving you a total of 1.1 ETH exposure.
  • Long ETH with USDC as Collateral:
    • You would be long ETH only from your long position.
    • This setup is useful if you frequently switch between longing and shorting.
  • Short ETH with ETH as Collateral:
    • This can be beneficial for delta-neutral strategies to earn funding fees.
    • For example, if longs pay shorts in funding fees, you could open a 1 ETH short position with 1 ETH as collateral.
  • Short ETH with USDC as Collateral:
    • This setup is useful if you frequently switch between longing and shorting.

Important Note: If you open a long position with a non-stablecoin as collateral, your liquidation price may change as the price of your collateral changes. By carefully selecting your collateral type, you can tailor your trading strategy to suit your needs and market conditions on XODEX.

Max Leverage

XODEX keeps an eye on the total amount of money being borrowed in a market (open interest). As this number goes up, the maximum leverage you can use goes down. This helps protect the market from people taking advantage of high leverage to manipulate prices (gaming price impact).

This mainly affects markets with less trading activity (lower liquidity), but it can also affect well-traded markets (high liquidity) if there's a massive amount of borrowing happening.

XODEX will warn you if you're trying to use more leverage than is allowed. It's important to note that this only applies to opening or increasing your positions, not ones you already have open.

Even if you need to close or decrease a position that would exceed the max leverage limit, you can still do so. However, the amount of collateral used for that position won't be reduced.

Managing Positions

Once you've opened a trade, you can find it in your "Positions" list. This is where you can fine-tune your trade by adding more collateral (increasing leverage) or withdrawing some (decreasing leverage). This lets you adjust your risk and influence your liquidation price.

Closing a Position

Need to get out of a trade? No problem! You can close your position, either fully or in part, by clicking "Close" on the position you want to exit. Closing a position will lock in your profits or losses based on the portion you close.

Here's the breakdown of profits:

  • Long positions (betting price will go up): Profits are paid in index token (e.g., ETH for a long ETH position).
  • Short positions (betting price will go down): Profits are paid in the stablecoin used to open the position (e.g., USDC or USDT).

Want your profits in a different token? XODEX lets you choose the token you receive when closing your position. There might be a small swap fee involved, which will be shown upfront.

Understanding Profits and Losses: Imagine you open a long ETH position worth $10,000:

Every 1% change in ETH price translates to a $100 change in your position's value (profit if price goes up, loss if it goes down). This applies proportionally to your position size. The same logic goes for short positions, but with profits earned when the price goes down.

Keeping Track of Leverage: XODEX shows your leverage ratio as position size divided by collateral used. You can even customize this view in settings to include unrealized profits or losses in the calculation.

Limit Orders

For traders seeking greater control over their entry and exit points into perpetual contracts, XODEX offers limit orders. Limit orders allow you to specify a desired execution price (trigger price) for your order. The order will only be filled if the mark price, which is an aggregation of exchange prices, reaches your trigger price.

  1. Select "Limit" after choosing to go long (buy) or short (sell).
  2. Set your desired price (trigger price) at which the order will automatically execute.
  3. Find your limit orders under the "Orders" tab, where you can edit or change the trigger price as needed.

Keep in mind that limit orders aren't guaranteed to fill for a few reasons:

  • The market price (mark price, which is an aggregate of exchange prices) might not reach your trigger price.
  • Even if the price hits your mark, there might not be enough assets available to fulfill the order (liquidity issue).
  • Your desired position size with the triggered price might exceed the current maximum leverage allowed.

Stop-Loss / Take-Profit Orders

XODEX provides stop-loss and take-profit orders to help manage risk and secure profits. These advanced order types allow you to automatically close a position when a specific price is reached, minimizing potential losses or locking in gains.

  • Stop-Loss Orders: Automatically closes your position when the price moves against you and hits a pre-set level, helping limit your losses.
  • Take-Profit Orders: Automatically closes your position when the price reaches a favorable level, securing your profits.

Both order types can be set when opening a position or added to an existing position from the "Positions" tab. This provides traders with greater control and flexibility in managing their leveraged trades on XODEX.

Was this page helpful?