# Welcome to 100x

Trade perps without sacrificing speed or self-custody

<figure><img src="https://2140220404-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUK1YzLSNACALAqu31RkU%2Fuploads%2FrkzuqMHwxuWB2OUbGR0H%2FPage%20(1).png?alt=media&amp;token=59afa770-e5af-4de8-ac87-1dfb943fcb57" alt=""><figcaption></figcaption></figure>

### What is 100x?

100x is a decentralised exchange (DEX) offering zero fees, blazing-fast and CEX-like perpetual and spot trading from a self-custodial cross-margin account built on BLAST. 100x is built with capital efficiency in mind, using cross-margining for collateral management and taking advantage of BLAST native interest rates, providing an exceptional trading experience in every aspect.

#### Trade perps on your favourite assets with low fees

100x offers perpetual trading on all of your favourite assets and also pre-launch perpetuals on your soon-to-be favourite assets. All with deep liquidity and a user-friendly fee structure, with maker rebates available for all users who make the markets more liquid.

#### Earn at all times with Blast-native yield + Blast points + ████

BLAST is the L2 revolutionizing how funds are understood. It introduces a game-changing mechanism for deposits: USD and ETH generate yield without users having to do anything, meaning they are always earning while being on BLAST. This is further compounded by BLAST points (both user and developer points, 100% distributed among the community) and ████. When you compound lightning speed, native yield, BLAST points and ████, you get **100x**.

#### Trade first with Pre-launch Perps (👀 $BLAST)&#x20;

Trade perps on assets that haven't launched yet with pre-launch perps on 100x. Up your strategy by speculating on or hedging your exposure to protocols and brand new assets before they become available anywhere else.

#### Trade any price movement with MOVE contracts

Trade MOVE contracts, that *move* in proportion to the absolute value of movement in prices of an asset over time. This means you don't have to be right about whether price goes up or down, just that it *moves* with enough magnitude in any given direction.

#### Orderbook DEX for lightning fast execution and deep liquidity

The 100x exchange is architected as a Central Limit Order Book (CLOB) and built with speed in mind. This enables a CEX-like experience for traders without sacrificing the safety of self-custody. Deep liquidity and blazing-fast execution, on your own tokens.

#### Cross-margined and settled-on chain for best-in-class capital efficiency

The 100x exchange is completely self-custodial. Your funds cannot be moved without your permission, unless your margin account is unhealthy. The cross-margin system is designed to enable super capital efficient collateral management, allowing for your funds to go further than any other exchange.


# Technical Overview

### Off-chain orderbook and risk engine

The orderbook and matching engine component of the system lives off-chain. This component receives maker and taker orders combined with their associated signatures [One-click trading](/100x-exchange/one-click-trading) and matches orders appropriately. Once matched the orders are pushed to the on-chain smart contracts described below. All orders are evaluated based on their validity as an order and the sub-accounts ability to make the trade given their margin. The off-chain risk engine is responsible for being aware of a sub-accounts margin to determine whether new positions can be opened or if the subaccount is unhealthy and must be liquidated. The off-chain system is also responsible for posting accurate index prices, mark prices and funding amounts. The offchain engine has no control of user funds and a user can deposit and withdraw at any time. A withdrawal may not be processed if a user's margin account is unhealthy or withdrawing would make the user's margin account unhealthy.

For in-depth technical details of the API and Infrastructure deployments refer to [API reference](/developers/api-reference)

### On-chain settlement and risk engine

Within the 100x smart contracts, all of the user state is stored. This represents the ground truth on which the entire system operates, thus it is not possible for the system to misrepresent or move funds without permission of the user or unless health requirements are violated. All final settlements and balance changes ultimately occur on chain facilitated by orders and actions pushed up by the off-chain engine.

For in-depth technical details of the smart contracts refer to: [Smart Contracts](/developers/smart-contracts)


# Trading

Trading on 100x is low-latency and frictionless with modes allowing for one click trading. The latency of matching is below 30ms and the e2e latency of order reception to on-chain committing will be provided closer to launch date, but will be constantly optimised. So long as a trade matches it is treated as confirmed whether it has been pushed to chain or not, this enables a CEX like experience when trading.

### Order types:

* LIMIT:  Buy or sell quantity at the specified price or better.
* LIMIT\_MAKER: LIMIT order that will be rejected if it immediately matches and trades as a taker.

  This order type is also known as a POST-ONLY order.
* MARKET: order where quantity parameter specifies the amount of the *base asset* you want to buy or sell. Actually executed quantity of the quote asset will be determined by available market liquidity.
* STOP LOSS: Execute a MARKET order for a given quantity when specified conditions are met.
* STOP LOSS LIMIT: Place a `LIMIT` order with given parameters when specified conditions are met.

### Time In Force:

* Good Til Cancelled (GTC) - Sits on the order book indefinitely until executed or cancelled by the order creator.
* Immediate or Cancel (IOC) - Executed immediately up to where the orderbook can fill within the specified price, remainder (if any) is dropped.
* Fill or Kill (FOK) - Executed immediately in its entirety or not at all.

### Pnl Settlements

All realised Pnls for a given subaccount get handled on the execution of a trade. For perp pnl this will be the difference between the entry and the execution price between trade entry and exit + any funding amounts. The off-chain system is constantly keeping track of unrealised pnl in order to account for health of a given subaccount.

### Market Making

If you are interested in market making on 100x reach out to us on <makemarkets@100x.finance>


# How to Trade

A step-by-step guide for beginners

#### 1. Bridge to Blast

The first step is to send funds to Blast. You need ETH to pay for transactions, so it's recommended to bridge that first. You can do so from Ethereum mainnet through the [official Blast bridge](https://blast.io/en/bridge), or from a number of other chains with other popular bridges such as [Stargate](https://stargate.finance/transfer), [Orbiter](https://www.orbiter.finance/?source=Ethereum\&dest=Blast\&token=ETH), [Synapse](https://www.synapseprotocol.com/?fromChainId=1\&toChainId=81457) and [Rhino.fi](https://app.rhino.fi/bridge?token=ETH\&chainOut=BLAST\&chain=ETHEREUM). Remember to *do your own research* before using these services.

#### 2. Connect to 100x

<div align="left"><figure><img src="https://2140220404-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUK1YzLSNACALAqu31RkU%2Fuploads%2FxSTUedehtQHZnLFXXBKS%2FScreenshot%202024-04-08%20at%2017.05.21.png?alt=media&amp;token=d2942b1a-3ade-4891-ad6d-6d04a8754916" alt="" width="372"><figcaption></figcaption></figure> <figure><img src="https://2140220404-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUK1YzLSNACALAqu31RkU%2Fuploads%2FmEbwlraRCkxnd4MiDUq4%2FScreenshot%202024-04-08%20at%2017.05.11.png?alt=media&amp;token=7e03120e-26c8-4bcc-9ec6-eb5ca088a9ae" alt="" width="373"><figcaption></figcaption></figure></div>

Connect your wallet of choice to 100x. Current supported wallets are Metamask, Rabby and Rainbow. After connecting, you will need to sign a contract to allow one-click trading.

The contract creates a session key that is able to sign transactions to trade on the platform on your behalf. Through this session key, one click trading is enabled on the frontend. The key can only act within the bounds of the contract, which means it can't withdraw or take any funds from the user wallet.

This allows you to trade with the funds you have deposited on 100x without the need to sign a transaction every time.

#### 3. Deposit on 100x

<div><figure><img src="https://2140220404-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUK1YzLSNACALAqu31RkU%2Fuploads%2FxQIjrzruiZhpz2XNh2aG%2FScreenshot%202024-04-08%20at%2017.06.51.png?alt=media&amp;token=099a0c7e-e61e-414f-aa53-d7fd51bbcebf" alt=""><figcaption></figcaption></figure> <figure><img src="https://2140220404-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUK1YzLSNACALAqu31RkU%2Fuploads%2FbpyU5UBtrBYmDKsdgJe5%2FScreenshot%202024-04-08%20at%2017.07.20.png?alt=media&amp;token=d4053bad-2ef0-40d2-a5bb-50acea0cc721" alt=""><figcaption></figcaption></figure></div>

Deposit your token of choice to 100x. Currently, only **USDB** is supported. Other tokens will be available in the future. The screen will update with your balance as soon as the deposit is complete, from where you're also able to withdraw.

#### 4. Place an Order

<div><figure><img src="https://2140220404-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUK1YzLSNACALAqu31RkU%2Fuploads%2FZQtSOFogk9Z2D6KwJI05%2FScreenshot%202024-04-08%20at%2017.07.45.png?alt=media&amp;token=493fa80c-0173-41e2-93f5-ce9afc4563ec" alt=""><figcaption></figcaption></figure> <figure><img src="https://2140220404-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUK1YzLSNACALAqu31RkU%2Fuploads%2FWm3sBYBMz5WzNEey54p0%2FScreenshot%202024-04-08%20at%2017.08.33.png?alt=media&amp;token=407bd290-558e-46b9-8eab-7af0f97d8e82" alt=""><figcaption></figcaption></figure></div>

After selecting a market (ETH, BTC, BLAST, etc.) you can choose to **Long** or **Short**. That can be done at the current market price, or with a limit order for a specific price. A **Market Order** will fill immediately with a price matching limit orders on the order book, and a **Limit Order** will be filled once the price is matched. Limit orders can be filled partially.

The estimated margin required is determined by the estimated total notional (size of the position) and how much leverage is available for that pair. You can&#x20;

#### 5. Track your order/position

<figure><img src="https://2140220404-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUK1YzLSNACALAqu31RkU%2Fuploads%2FHVDpYHAVmhL9I6GEs58B%2FScreenshot%202024-04-08%20at%2017.08.07.png?alt=media&amp;token=29ebc42e-8f40-460a-94d3-dfe1cf037259" alt=""><figcaption></figcaption></figure>

You can track open Positions by Asset, with\
`P&L = Size * (Entry price - Mark price)` and `ROE = P&L/Margin`.

Different positions opened for the same assets will be merged under the same line, with their size and entry price factored in. For example, two ETH longs, with 1 ETH at 3400 and 1 ETH at 3500 will become a 2 ETH long with an Entry Price of 3450. In this example, if the price moves to 3600, opening a 1 ETH short wouldn't change the Entry Price, but it would change the size of the position from 2 ETH back to 1 ETH. Accordingly, the P\&L would change from $ +150.00 to $ +75.00 as half of the position has been closed and the closed P\&L ($ 75.00) has been moved into your account.

<div><figure><img src="https://2140220404-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUK1YzLSNACALAqu31RkU%2Fuploads%2FtIM4C64sNJhtSzmWZpYG%2FScreenshot%202024-04-08%20at%2017.13.12.png?alt=media&amp;token=384dbd33-b537-458f-8264-02e7e4cbbf1f" alt="" width="375"><figcaption></figcaption></figure> <figure><img src="https://2140220404-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUK1YzLSNACALAqu31RkU%2Fuploads%2F9RZjbQ5Zf8V9opmx2cGd%2FScreenshot%202024-04-08%20at%2017.13.24.png?alt=media&amp;token=1c7903a7-54d7-4bdd-a5e6-3655587f7596" alt="" width="375"><figcaption></figcaption></figure></div>

Closing a Position works in the same way as opening an opposite trade as a Market Order or a Limit Order. You can choose to close it partially or completely as you choose its size (and price, if its a Limit Order). Choosing the "Mid" option places a Limit Order with a price at the middle of the spread between Long and Short Limit Orders, and is more likely to fill. If it is closed as a Market Order, it won't close at the current Mark price, but rather based on the matching limit orders on the order book. Larger positions have a larger impact on price.

Funding rates are periodic fees exchanged between long and short traders, helping maintain the contract's price close to the spot market. When a perp is higher than the spot price for the asset, funding rates are positive, and long traders pay short traders. When funding rates are negative, short traders pay long traders. You can find out more details about funding rates on 100x [here](/100x-exchange/funding-and-pricing).

<figure><img src="https://2140220404-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUK1YzLSNACALAqu31RkU%2Fuploads%2FOHglLS5Uxiied45aHYmi%2FScreenshot%202024-04-08%20at%2017.08.51.png?alt=media&amp;token=a94ae2da-d4bc-40e3-9faa-b598872ba762" alt=""><figcaption></figcaption></figure>

Different than Positions, Open orders will be displayed separately and can be canceled independently. Open orders will not only display separately on the Positions and Orders screen, but also on the order book, alongside orders from other traders, and on the chart. You can cancel them from any of the three.


# Perpetual Specifications

Perpetuals are a derivative akin to a future, except without an expiration. A funding rate mechanism helps keep perpetual futures prices close to the spot price of the underlying asset, see [Funding and Pricing](/100x-exchange/funding-and-pricing).

100x margins perps within the cross margin framework, where perps are assigned a quote asset value which forms the portfolio of a given sub account. The margin value in the table belows refers to the margin factor of an individual perp, but the margin of a perp can be improved if it is a component of a spread, meaning it is a short perp position completely offset by a long spot position.

The generic specifications are below and there are product specific values in the [#product-specific-specs](#product-specific-specs "mention") table:

<table data-header-hidden><thead><tr><th width="255"></th><th></th></tr></thead><tbody><tr><td>Contract Type</td><td>ETH Perpetual Futures</td></tr><tr><td>Underlying Asset</td><td>100x index price (derived from STORK oracle price)</td></tr><tr><td>Quote Asset</td><td><a data-mention href="/100x-exchange/chain-blast-l2#usdb">Chain / BLAST L2</a></td></tr><tr><td>Contract Size</td><td>1 contract = 1 ASSET</td></tr><tr><td>Funding Rate</td><td>See <a data-mention href="/100x-exchange/funding-and-pricing">Funding and Pricing</a></td></tr><tr><td>Funding Period</td><td>1 hour</td></tr><tr><td>Mark Pricing</td><td>See <a data-mention href="/100x-exchange/funding-and-pricing">Funding and Pricing</a></td></tr><tr><td>Minimum Order Value</td><td>See <a data-mention href="#product-specific-specs">#product-specific-specs</a></td></tr><tr><td>Trading Fees</td><td>See <a data-mention href="#product-specific-specs">#product-specific-specs</a></td></tr><tr><td>Initial Margin</td><td>See <a data-mention href="#product-specific-specs">#product-specific-specs</a></td></tr><tr><td>Maintenance Margin</td><td>See <a data-mention href="#product-specific-specs">#product-specific-specs</a></td></tr><tr><td>Max Leverage</td><td>See <a data-mention href="#product-specific-specs">#product-specific-specs</a></td></tr><tr><td>Liquidation Fee</td><td>See <a data-mention href="/100x-exchange/liquidations">Liquidations</a></td></tr></tbody></table>

### Product Specific specs

TBD

Taker/Maker fees for most products will be 2/-1 BPS.


# Funding and Pricing

**funding** **mark**

* `ImpactMid = (avgImpactBid(ImpactNotional) + avgImpactAsk(ImpactNotional)) / 2`
  * computed every `TickInterval`
    * set to `5` seconds
  * `avgImpactBid`, `avgImpactAsk` are average cost per contract when buying/selling `ImpactNotional` worth of contracts
    * `ImpactNotional` is in the base asset (usually USDB)
      * for large pairs set to `$10,000` to `$100,000`
      * for small pairs set to `$1,000` to `$10,000`
* `FundingMark = ema(ImpactMids, Weight)`
  * computed every `TickInterval`
  * `ema` is exponential moving average
    * `Weight` is the EMA weighting
      * set to `2 / 7`
    * `ImpactMids` is list of previous `ImpactMid` every `TickInterval`

**funding rate**

* `Premium = (twap(FundingMarks) - twap(Indexs)) / Index`
  * computed every `SettleInterval`
    * set to `1` hour
  * `Index` is oracle price
    * stork oracle
    * for prelaunch perpetuals, it is a computed value
  * `twap` is time weighted average price
    * `FundingMarks` is list of previous `FundingMark` over the last `SettleInterval`
    * `Indexs` is list of previous `Index` over the last `SettleInterval`
  * `Premium` is considered as an amount per `FundingInterval`
    * set to `8` hours
* `FundingRate = BaseRate + clamp(Premium / (FundingInterval / SettleInterval), -Clamp, Clamp)`
  * computed every `SettleInterval`
  * `BaseRate` is underlying interest rate of perpetual future per `SettleInterval`
    * set to `0`
  * `clamp(a, y, z)` clamps `a` between `y` and `z`
    * defined as
      * `a` if `y < a < z`
      * `y` if `a ≤ y`
      * `z` if `z ≤ a`
  * `Clamp` is maximum magnitude funding can take (before underlying interest) per `SettleInterval`
    * set to `0.005 = 0.5%`
  * `FundingRate` is considered as an amount per `SettleInterval`

**funding amount**

* `FundingAmount = FundingRate * Index`
  * computed every `SettleInterval`
  * the `FundingAmount` is the notional amount longs pay shorts per contract per `SettleInterval`

Note: Funding settlement occurs every `SettleInterval`. No settlement occurs at open/close of positions.


# Pre-launch perps

The prelaunch funding model differs from regular products in how the index is provided. Rather than an oracle, it is computed. The other parts of the model are the same apart from the following constant values.

* `FundingInterval` set to `24` hours
* `Clamp` set to `0.005 = 0.5%`
* `BaseRate` set to `0.00025 = 0.025%`

**Prelaunch index**

* `Index = ema(FundingMarks, PrelaunchWeight)`
  * computed every `TickInterval`
  * `ema` is exponential moving average
    * `PrelaunchWeight` is the EMA weighting
      * set to `2 / 2881`
    * `FundingMarks` is list of previous `FundingMark` every `TickInterval`


# BLAST prelaunch tokenomics

* If you LONG the prelaunch at $1, then you are longing at 1b FDV. If the FDV of BLAST is 5b on settlement, then your LONG position will be in a profit of $4 per contract traded.
* If you SHORT the prelaunch at $5, then you are shorting at 5b FDV. Suppose the supply of BLAST is 100b tokens, and it trades at $0.09 on settlement. Then its FDV will be 9b, and your SHORT position will be in a loss of $4 per contract traded.

**Examples**

* If the supply of BLAST is 1 billion:
  * a smooth transition into a vanilla perpetual will occur
    * the source of the Index Oracle will change
    * the funding parameters will change to that of vanilla perpetuals
* If the supply of BLAST is 100 billion:
  * a smooth transition into a vanilla perpetual that tracks 100 times the price of BLAST will occur
    * the source of the Index Oracle will change
    * the funding parameters will change to that of vanilla perpetuals
  * the product will be named **100xBLAST**
* If the supply of BLAST is **NEITHER** 1 billion NOR 100 billion:
  * all positions will close at the settlement price 24 hours after TGE.
  * a vanilla BLAST perpetual which tracks the token price will be launched separately.

**Settlement**

This is NOT the price of one token, unless the supply is 1b.

BLAST prelaunch perpetual is a market cap index which tracks the FDV of BLAST at launch in billions. Each contract is worth a billionth of the FDV (so FDV/1e9).

\
Then its FDV will be 9b, and your SHORT position will be in a loss of $4 per contract traded.


# Chain / BLAST L2

The 100x's on-chain settlement protocol is deployed to [BLAST](https://blast.io/en) .

Blast is an Ethereum L2 that has natively yielding USD and ETH. Based on the OP Stack. Being an Optimistic Rollup allows for cheap gas and speed compared to Ethereum mainnet. To learn more about adding blast as a network to an evm wallet see the blast docs [here](https://docs.blast.io/using-blast).

Unlike other L2s, Blast provides a risk free rate, for usdb the rate is the US T-bill rate and for eth the rate is the Ethereum mainnet staking rate. This feature alone allows user's of the 100x exchange to generate yield on their collateral.  Blast also provides exceptional incentives to all users, meaning 100x users benefit from these.

Blast is the perfect place for 100x, giving user's a seamless experience with clear opportunities for generating yield at all times!&#x20;

💯x💥

### USDB

Blast native usd. Backed by sDAI in the BLAST bridge contract.&#x20;

{% embed url="<https://docs.blast.io/about-blast#t-bill-yield>" %}


# Cross Margin

Each 100x account can create 256 subaccounts, each of which behaves like a completely discrete account with its own margin.

Each subaccount is cross-margined, where each asset and position they hold contributes to an overall subaccount health. There are two types of health, maintenance and initial.&#x20;

When a subaccount's initial health drops below 0, they are not allowed to open any positions which reduce their health further (closing positions or swapping to less risky ones).&#x20;

When a subaccount's maintenance health drops below 0, they become liquidatable, meaning their positions can be forceably closed by liquidators and/or the off-chain engine.

### Margin Calculation

All of a subaccount's asset balances and all open derivative positions are taken into account. The function determines whether a subaccount has any spreads, defined by a short perp position offset entirely by a balance in the same spot asset. The function then calculates and sums the health on each of the spread, spot and derivative positions and deducts any core collateral debt to obtain the subaccount's health. The calculation of each of these constituents is described below:

### Perp Health

Perpetual future health is calculated as follows

$$perpHealth = quantity(markPrice \* riskWeight - avgEntryPrice) + funding$$

where quantity is a negative value for short positions.

**For example, lets calculate the maintenance health on a 5 BTC-Perp short position that was entered at $38,000. The price of BTC is now $40,000 and the position has earned $500 in funding:**

* <mark style="color:yellow;">initialLongWeight = 0.9</mark>
* <mark style="color:yellow;">maintenanceLongWeight = 0.95</mark>
* <mark style="color:yellow;">initialShortWeight = 1.1</mark>
* <mark style="color:yellow;">maintenanceShortWeight = 1.05</mark>

$$
initialHealth = -5(40000 \* 1.05 - 38000) + 500 = -$19,500
$$

#### Max Leverage:

Because of these weights, there is a limit to the max leverage a subAccount can achieve on an asset:

$$maxLongLeverage = 1/(1- riskWeight)$$

$$maxShortLeverage = 1/(riskWeight -1)$$

So for BTC-Perps, the max initial leverage would be $$1/(1-0.9) = 10x$$.&#x20;

### Sneak peek...

### Spot Health

A balance in any spot asset deemed valid collateral will contribute to a subaccount's health as follows:

$$spotHealth = quantity \* riskWeight \* markPrice$$

**For example, for a balance of 5 BTC at $40,000 , if the risk weights are as follows:**

* <mark style="color:yellow;">initialLongWeight = 0.8</mark>
* <mark style="color:yellow;">maintenanceLongWeight = 0.9</mark>

$$
initialHealth =  5 \* 0.8 \* 40000 = $160,000
$$

Note that invalid collateral assets will have weight values of 0.

### Spread Health

Spreads are delta-neutral positions where a short perp position in an asset is offset entirely by a spot position in that same asset. Because of this, spreads are less risky than their two constituent components in isolation. We therefore calculate health on spreads using different penalties that are more forgiving to the sub-account.

$$spreadHealth = quantity(spotPrice - perpPrice + perpEntryPrice -spreadPenalty((spotPrice + perpPrice) /2)) + funding$$

* <mark style="color:yellow;">initialSpreadPenalty = 0.02</mark>
* <mark style="color:yellow;">maintenanceSpreadPenalty = 0.01</mark>

**So using the above spot and perp examples, the initial health on this same spread would be:**

$$initialHealth = 5(40000 - 40000 + 38000 - 0.02(40000)) + 500 = $186,500$$

As calculated above, the initial health on the sum of the two individual positions without spread weightings would be:

$$
​
i
n
i
t
i
a
l
H
e
a
l
t
h
=

180000
−
19500
=====

$
160
,
500
$$


# Force Matching

This feature is a risk management measure that allows the off-chain engine to close positions on a sub-account's behalf in order to protect the protocol and limit loss to unhealthy sub-accounts. It can only be invoked if one of the two following invariants are true:

1. Sub-account Core Collateral Debt < 0
2. Sub-account Maintenance Health < 0

In the event that one of these invariants is true for a given sub-account the off-chain engine will create a market order on a certain position (the position selection criteria are provided in the sections below). This will then be matched on the Order book and settled on-chain as a regular swap, this allows the user to avoid costly liquidation fees.&#x20;

### Sub-account Core Collateral Debt&#x20;

This will occur if the sub-account being force matched has accrued a negative core collateral debt but are still healthy from a margin perspective. If this is the case then the offchain engine will swap one of their other positions into core collateral in order to reduce their core collateral debt to 0 or a threshold above 0. The position that are force matched to retrieve core collateral are selected based on the liquidation order described in [Liquidations](/100x-exchange/liquidations)

### Sub-account Maintenance Health&#x20;

This will occur if the sub-account is below maintenance health and are deemed unhealthy. If this is the case then the offchain engine will swap one of their positions to improve their health so that it is above maintenance but below initial margin. The position that are force matched to improve health are selected based on the liquidation order described in [Liquidations](/100x-exchange/liquidations)


# Liquidations

Liquidations occur when a sub-account's Maintenance Health falls below 0. They are necessary to ensure that a user does not go into negative equity, thereby causing the 100x protocol to inherit bad debt. The 100x health system uses health risk weights for each product to ensure that there is a buffer between a sub-account becoming liquidatable, and that same sub-account going into debt.

Liquidations are done on a per-position basis in the following order:

* Naked Perp positions
* Spreads
* Spot assets

Within this order, positions are liquidated in order of their risk parameters, with the most risky positions within a given product class being liquidated first.

A liquidator can liquidate positions up to the point that the liquidatee's Initial Health = 0. This stops the liquidatee from being "over-liquidated".

### Liquidation Price

When liquidators attempt to liquidate a subaccount, they specify the product and the amount they want to liquidate. The liquidation price for assets is set between the mark price and the price determined by the maintenance weight.

The **net price** at which the product is liquidated is calculated as follows:

* **Long: mark\_price \* (maintenanceLongWeight + 4) / 5**
* **Short: mark\_price \* (maintenanceShortWeight + 4) / 5**

The gross profit of liquidators equals:

* **Long**: **mark\_price \* (1 - maintenanceLongWeight) / 5**
* **Short**: **mark\_price \* (maintenanceShortWeight - 1) / 5**

However, the insurance fund receives 25% of the profit that liquidators generate to protect protocol health moving forward. Thus, the net profit of liquidators equals:

* **Long**: **oracle\_price \* ((1 - maintenanceLongWeight) / 5 )\* 0.75**
* **Short**: **oracle\_price \* ((maintenanceShortWeight - 1) / 5 )\* 0.75**


# Fees

### 100x fee structure

$$
takerFee = 0.01
$$

$$
makerFee = 0
$$


# One-click trading

## Signature-based verification

The 100x exchange uses an EIP712 signature pattern to allow for one-click trading. To trade, deposit, withdraw on 100x you simply sign a transaction that represents your intended action. This will then be interpreted by the exchange and then processed by the Orderbook and if matched will be settled on-chain. Signatures have an associated nonce, which ensures that signatures can never be re-used maliciously by the exchange.

This feature allows traders to trade without having to worry about whether their wallet has enough gas.

## Approved Signers

To take it a step further, if you want to avoid having to sign transactions yourself. You are able approve another address to sign transactions on your behalf, this does not give the signer the ability to withdraw any of your funds to their account but they (whoever or whatever you choose) can sign trades on your behalf, making the trade experience even more seamless.


# Incentives

* BLAST GOLD: Distributed to users periodically (48-72hrs) to users that contributed to 100x success and growth retroactively. GOLD distribution criteria are updated on a regular basis. GOLD distrubution ends on June 25
* Blast Points: Distributed real time to users based on funds deposited into 100x app
* 100xP: more details here: <https://medium.com/100xfinance/make-it-with-xp-988b2cd0834f>


# FAQs

#### How to trade on mobile?

Trading on mobile is currently only supported directly by in-app wallet browsers. This means users must first open the mobile wallet app (Metamask, Rabby or Rainbow), go to the in-app browser and from there access the 100x Finance app.\
Opening the 100x Finance app directly from a mobile browser app such as Safari won't work.

#### More questions?

Tweet us questions <https://twitter.com/100xfinance> or ask on [Discord](https://discord.gg/100xdex) and help us populate this!


# API reference

<https://100x.readme.io/reference/100x-api-introduction>

* The 100x team has targeted parity with the Binance API where possible. Integration should be straightforward if you are already familiar with Binance trading. The team will be completely available to any integrators.


# Smart Contracts

* The 100x team have collectively written 4 novel derivative protocols in their careers from start to finish and have extensive experience with best practice smart contract design and security practices. The smart contracts written by the team in the past have held upwards of $5m and have enabled over $200 million in volume with 0 incidents.

| Contract Name         | Contract Address                           |
| --------------------- | ------------------------------------------ |
| USDB                  | 0x4300000000000000000000000000000000000003 |
| WETH                  | 0x4300000000000000000000000000000000000004 |
| AddressManifest       | 0x8894dB17336E174F3B55c8Fa6CC5234Af708B6F2 |
| Ciao                  | 0x1BaEbEE6B00B3f559B0Ff0719B47E0aF22A6bfC4 |
| Ciao implementation   | 0x48bcdCBf2d15C27f8b86b2678A575d147B6bbFd4 |
| Furnace               | 0xD3Ba07031551ccBDa21Ab35Ff381353E815910f0 |
| ProductCatalogue      | 0xb4187635531aa2b33E0FC5d36e0101756e98E908 |
| OrderDispatch         | 0x691a5fc3a81a144e36c6C4fBCa1fC82843c80d0d |
| OrderDispatch impl    | 0x508eEbe7E55bbf8188aAB4D0C1E66b4136162c3E |
| Liquidation           | 0xf13e53011Da85F6D5fF4e306627a3057A703C12f |
| SpotCrucible          | 0x225e950C26C74cc641874434e1E026701a7c0c08 |
| SpotCrucible impl     | 0xD54E9C1CE413294c37cC34a1881ee96c0397d2aF |
| PerpCrucible          | 0x93E7EcA45ADd572475d8C6307Dd8689cCF09cE37 |
| PerpCrucible impl     | 0x8C8bcb6D2c0E31c5789253EcC8431cA6209B4E35 |
| FeeRecipient          | 0x9440a32Df8b21C8F00D62678bA0420f3B4Aa53BA |
| Insurance             | 0xBf21404E0cF634b22eCf054912Bf50bdA58ef4E3 |
| Reader                | 0xf73f37d622DA3045D3F87986F5C91D08263c2e26 |
| Blast Points Operator | 0x10416fa95e076513DC7BaDC357Ca56b639BEA835 |


# Security

Protocol was audited by Sherlock and Dedaub.

### Sherlock Audit Report: March 2024

<https://github.com/sherlock-protocol/sherlock-reports/blob/main/audits/2024.02.13%20-%20Final%20-%20100x%20Audit%20Report.pdf>

### Dedaub Audit Report: January 2024

{% file src="/files/5AYrQd3yS4Jpkx7bwjs0" %}

### Bug Bounty

* The protocol will be backed by an Immunefi bug bounty program which will be kept up to date at 10% of protocol TVL at all times.


# Brand Kit

<figure><img src="https://2140220404-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUK1YzLSNACALAqu31RkU%2Fuploads%2Fz7nflolUles84VPBxetl%2F100x_logo.png?alt=media&amp;token=7a8eb3de-0212-4d43-b16c-15d97a4ec2bf" alt=""><figcaption><p>Logo Blue</p></figcaption></figure>

<figure><img src="https://2140220404-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUK1YzLSNACALAqu31RkU%2Fuploads%2FyCY5xQ1ghamRNzEPBGQO%2F100x_logo_dark.png?alt=media&amp;token=e803dbb2-3acf-4b18-8b12-2aeedcabb26f" alt=""><figcaption><p>Logo dark</p></figcaption></figure>

<figure><img src="https://2140220404-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUK1YzLSNACALAqu31RkU%2Fuploads%2FuXgpekEmcWMSwFOBgUhK%2F100x_logo_white.png?alt=media&amp;token=70f9fe25-370e-4116-b407-58e473e99b4f" alt=""><figcaption><p>Logo white</p></figcaption></figure>

<figure><img src="https://2140220404-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUK1YzLSNACALAqu31RkU%2Fuploads%2FEkBV8SYdzI4gDWCkz5On%2F100x_typemark.png?alt=media&amp;token=8352d05b-e5f7-454f-a934-37fea5147ee4" alt=""><figcaption><p>Typemark</p></figcaption></figure>


