# Welcome to Surge

## Welcome to Surge

Surge is the first perpetual DEX built on the Radix network, launched in November 2024. The platform enables users to trade cryptocurrency pairs with leverage using cross-margin collateral, all denominated in USD terms.

### Core Features

* USD-Denominated Trading: All pairs, accounts and settlements are measured in USD terms
* Cross-Margin Trading: Trade multiple positions using a unified collateral pool
* Single Liquidity Pool: A central USD pool that manages all positions and risk
* Supported Trading Pairs against the USD: BTC, ETH, SOL, XRD, SUI, DOGE, ADA, BNB&#x20;
* Initial Leverage: Up to 20x and increase gradually over coming months.
* Multiple Order Types: Support for market, limit and stop limit orders

### Collateral Options

Traders can currently use the following as collateral:

* sUSDC (Surge USD a wrapped version of xUSDC)
* xWBTC
* xETH
* XRD
* LSULP (Liquidity token for the LSU Pool)

Additional tokens will be evaluated and added as collateral options as the Radix ecosystem grows.

### Platform Status

As a newly launched platform, Surge is in its early stages with core functionality in place. The team is actively working on expanding features and capabilities, including:

* Additional trading pairs
* Increased leverage options
* Enhanced UI features
* Referral system
* Bridge integrations

### Risk Notice

Surge, launched in November 2024, is an experimental perpetual DEX in its early stages of development. As a new platform on the Radix network, users must understand they are interacting with emerging technology that carries substantial risks. While the platform's smart contracts have undergone audits, they may contain unknown vulnerabilities. The risk management systems, liquidation mechanisms and oracle integrations are being tested in live market conditions substantially. Trading on Surge involves leveraged positions which can result in immediate and total loss of funds. The platform's features, parameters and risk controls may be adjusted as we gather data and optimize for safety and efficiency. Market volatility, combined with leverage, can lead to sudden liquidations, and the cross-margin nature of accounts means that all positions affect your overall risk profile. Users should approach this platform with extreme caution, starting with small positions to understand the mechanics and never trading with funds they cannot afford to lose. By using Surge, you acknowledge that you are participating in an experimental protocol where both technology and market risks are significantly amplified compared to traditional trading venues. \
\
*This notice is not exhaustive. Users should thoroughly review all documentation and understand the mechanics of perpetual futures trading before participating.*


# Creating a Trading Account

### Preliminaries: Radix Wallet & Connector Installation

In order to use Surge, you will need to download and install the Radix Wallet and Connector Extension. The Radix mobile wallet is available for iOS and Android and can be downloaded via the following link:

{% embed url="<https://wallet.radixdlt.com/>" %}

The link above also includes instructions for installing the Radix Connector extension, which is required to communicate between the Surge app and the mobile wallet.  This extension is currently only available for Chrome browsers.

After downloading the Radix wallet and extension, you will need to create a new account and record your seed phrase safely.

### Connecting your Wallet to Surge

At the top right of the page, select the "Connect Wallet" button which will send a transaction to your Radix wallet.  Approve the transaction and select an existing (or create a new) Persona in the Radix wallet in order to login to the Surge platform.

<figure><img src="/files/rTwW5aqFK87rraei3mU2" alt="" width="344"><figcaption></figcaption></figure>

If you experience any issues connecting and logging in, please note that a restart of your browser and Radix Wallet resolve these issues in most cases.  For additional support, please contact <support@surge.trade>

Once you have reached this point, you are ready to create a trading account.

### Creating a Trading Account

You are now ready to create and fund a Trading Account to begin opening and closing positions.

A trading account is used to open trading positions and holds collateral (margin) against those positions.

Once logged in, select the "Create Surge Account" button:

<figure><img src="/files/g95xMbRs73CpOyJEj4lJ" alt=""><figcaption></figcaption></figure>

A window will appear allowing you to create and fund your Surge account in one-step. &#x20;

Select the amount of eligible collateral (margin) you would like to deposit and then select "Create and Deposit", signing the transaction in the Radix Wallet when prompted.

<figure><img src="/files/sOcBG1Ovl1Exn8FDIsGA" alt=""><figcaption></figcaption></figure>

### Multiple Accounts

You can create multiple accounts which can be funded separately. This way particular trades, and their associated collateral, can be segregated from each other.

<figure><img src="/files/uhdf7nSDEwxokjYUDGp0" alt="" width="348"><figcaption><p>New accounts can be added</p></figcaption></figure>

The next section discusses collateral further.


# Collateral Management

Fund your account

### Eligible Collateral

Surge currently accepts the following tokens to fund trading accounts:

* xwBTC
* xETH
* sUSD
* XRD
* LSULP

For further details, please refer to the [Collateral](/about-surge/collateral) section.

### Adding / Removing Collateral

Collateral can be added when creating a new account (previous section) or can be added at a later time. Collateral can also be removed to your wallet at any time (depending on your open positions). This can be done by clicking the bank icon:

<figure><img src="/files/M4rHYaWLkFfgROzHhQxl" alt="" width="429"><figcaption><p>Click the bank icon to add / remove collateral</p></figcaption></figure>

Or by looking at the collateral tab in the trading table (including historical movements).

<figure><img src="/files/NFFmBUuO6Zv6znZ6BTwU" alt=""><figcaption><p>View and manage your collateral</p></figcaption></figure>

The value of your account (active open positions and collateral) is shown in the top right corner of the platform.

<figure><img src="/files/Ks72GJvym0dpvHFnWwZr" alt="" width="563"><figcaption><p>Account value</p></figcaption></figure>


# Basic Opening & Closing Trades

Get started trading

There are several options for opening and closing trades on Surge.  This guide will explain how to open a simple Market order and close a position.

### Creating a Market Order

Using the Trade panel at the top right of the screen, select the Market tab.  Beneath this, there is an option to specify the amount of leverage you would like to use for this trade.  Select the type of position (Long or Short):

<figure><img src="/files/jGjXAW8KXnDIIK1xtLBR" alt=""><figcaption></figcaption></figure>

You will notice that the Max. amount displayed will adjust accordingly to the leverage selected.  In this example, a Long position is being opened at 50x leverage, using 250,000 XRD (from a maximum available 430,861).  Click BUY to send the transaction to the Radix Wallet and sign:

<figure><img src="/files/Z4Ukppxnd75pucqMnKgk" alt=""><figcaption></figcaption></figure>

Once the transaction is confirmed, you should now see your position in the POSITIONS tab underneath the chart:

<div data-full-width="true"><figure><img src="/files/LjdINYgmghoM4xK5AFJ9" alt=""><figcaption></figcaption></figure></div>

This table provides key information on your position at the current time:

**Pair** - Trading Pair of order (XRD/USD in this case).

**Amount** - Position size (in XRD).

**Value (USD)** - USD equivalent of the size.

**Entry Price** - Price at which the position was executed.

**Mark Price** - Expected True Value of the contract at this moment in time.

**Liq Price** - Price at which this position will automatically be closed and collateral liquidated.

**PnL (USD)** - Profit & Loss for this particular position.

**ROI** - Return on Investment (%)

**TP/SL** - Take Profit / Stop Loss information (clickable)

The process described above is identical for both a Long or Short position.  In the example above we specified a Market order type, which opens a position at the current price.&#x20;

### Closing an Open Position

Let's assume you have a position long 1.5 SOL which you want to close.

<figure><img src="/files/R0QaIVxkul7DEftgqkMz" alt=""><figcaption><p>Long 1.5 SOL position</p></figcaption></figure>

If you want to close it entirely you could either:

* Press the X at the end of the position row for SOL and your Radix wallet will request a signature
* Do the exact opposite trade using the trade widget of selling 1.5 SOL

So either press this:

<figure><img src="/files/kiddGrLgD4Gc7aVzcE9r" alt=""><figcaption><p>Press this X to close the entire position</p></figcaption></figure>

Or do a Market Order to sell exactly what you are long, example here we are selling 1.5 SOL:

<figure><img src="/files/NOxC7FeRIYQ5gINxRaCn" alt=""><figcaption><p>Selling 1.5 SOL in a Market Order<br></p></figcaption></figure>

Both of these are identical and will reduce the SOL position to zero


# What is Surge?

Leveraged trading on Radix

**Surge** is Radix's first decentralized exchange for perpetual futures, enabling leveraged trading on major crypto markets.

[Traders](/about-surge/traders) can take long or short positions across various tokens, with the flexibility to use high-quality collateral for margin. They can also set up separate accounts to segregate [collateral](/about-surge/collateral) and organize trades, giving them tailored control over their exposure.

For [liquidity providers](/about-surge/liquidity-providers) (LPs), Surge offers an opportunity to support the platform by staking xUSDC, allowing them to earn a share of trading fees generated from platform activity in return for taking the other side of traders' positions.

Surge’s pricing relies on an [Oracle](/about-surge/oracle) system, ensuring accurate and reliable market prices, supported by a system of [Keepers](/about-surge/keepers).


# Traders

Surge enables traders to take both long and short positions on a selection of liquid tokens. Unlike traditional spot DEXs, where tokens are directly exchanged, Surge allows traders to speculate on price movements without an actual token swap. Traders can use margin accounts funded with high-quality [collateral](/about-surge/collateral) to support their trades. This setup allows traders to benefit from both rising markets (by going long) and falling markets (by going short), creating opportunities for profit in diverse market conditions.

Key features include:

* **Leveraged Positions**: Gain amplified exposure to token price movements.
* **Short Selling**: Profit from market declines by taking short positions.
* **Collateral Flexibility**: Use a variety of high-quality assets to back trades.
* **Account Segregation**: Set up separate accounts to organize collateral and manage risk across trades.

Pricing on Surge is derived from a reliable [Oracle](/about-surge/oracle) system that ensures trades reflect accurate, real-time market data.

Surge provides various [order types](/about-surge/order-types) for flexible trading approaches, including Market, Limit, and Stop Limit orders. Take Profit and Stop Loss settings can be added to orders, allowing traders to manage risk and optimize returns.

Traders on Surge can use leverage to amplify their positions, but they must carefully manage collateral, as high leverage increases the risk of [liquidation](/about-surge/liquidations). If the collateral supporting a trade drops below required levels, Surge will automatically liquidate the position to prevent further losses. This process protects traders and the platform by ensuring that open positions have adequate backing.


# Liquidity Providers

Surge operates on a robust liquidity model centred around its USD pool, designed to ensure seamless trading experiences for users.

### **How the Pool Works**

The central USD pool serves as the backbone of the platform, acting as the counterparty for every trade executed on the platform. This means that when a trader opens a position, the pool takes the opposite side of that trade, allowing for real-time execution and providing traders with the necessary liquidity to enter and exit positions efficiently.

### **Earning Fees**

The USD pool earns fees through the opening/closing of trades and funding paid by traders. This structure not only compensates liquidity providers but also enhances the overall sustainability of the exchange. As trading activity increases, the volume of fees generated rises, directly benefiting LPs through potential rewards.\
\
For more details on the Surge USD central pool, see here:\
<https://www.surge.trade/liquidity>

<figure><img src="/files/m2e5AA466WRyhhPABTCw" alt=""><figcaption><p>An example of USD Pool position and funding it earns.</p></figcaption></figure>

### **Adding and Removing Liquidity**

Liquidity providers can easily add or remove liquidity from the Surge USD pool. To add liquidity, users deposit xUSDC or sUSD into the pool, receiving Surge Liquidity Provider (SLP) tokens in return, which represent their share of the pool. When LPs wish to withdraw their funds, they can redeem their SLP tokens for the equivalent amount of xUSDC, plus any accrued fees. This straightforward process ensures that LPs can efficiently manage their investments while supporting the platform's liquidity.

Add USD Liquidity here: <https://www.surge.trade/liquidity>

<figure><img src="/files/kVMiwUYITYxmGP3KYedU" alt=""><figcaption><p>Adding 400 xUSDC Liquidity to Surge USD Pool</p></figcaption></figure>

Equally removing USD liquidity can be done in xUSDC or sUSD

### Understanding removing USD Liquidity

There are a few key points on removing your USD liquidity from the Surge USD pool:

* The USD value of your Liquidity Providing may have increased or decreased so you may get less back than you put in.
* When removing you are charged 0.10% to prevent Liquidity Providers from trying to use LP as means of trading
* On rare occasions the pool is at maximum [skew risk](/about-surge/skew) and needs all the USD in the pool to operate safely so the protocol will not allow you remove your USD liquidity until this risk as been reduced.

### **Initial Airdrop for Liquidity Providers**

To encourage active participation and deepen the liquidity within the USD pool, Surge is launching an initial airdrop program. A total of 2 million SRG tokens will be allocated to LPs contributing xUSDC during the first 180 days of the exchange’s launch. Rewards will be distributed shortly after this period, providing a significant incentive for liquidity providers to support the platform. More details can be found on this[ blog post](https://surgetrade.medium.com/surge-usd-bootstrapping-overview-f285d4a5661d).

By participating as a liquidity provider, users not only support the Surge Perpetual Exchange’s operations but also stand to benefit from transaction fees and the initial airdrop.

### Risks of Liquidity Provision

{% hint style="warning" %}
Risks of Liquidity Provision:\
Note that LPs providing liquidity to the pool take the opposite side of trades.

Against this, LPs earn fees from trading activity.

LPs could incur losses if traders, on aggregate, are very profitable and the fees generated are not sufficient compensation.
{% endhint %}


# Collateral

Surge provides traders the ability to utilise leverage, thus amplifying their trade sizes relative to the assets they hold.  The amount of leverage which can be deployed is denoted by the Max Leverage drop-down menu shown below, which varies for each trading pair depending on overall exchange risk.  At the time of writing, the XRD/USD pair currently allows a maximum 10x leverage which is expected to increase as the liquidity pool matures and exchange risk is reduced.

<img src="/files/U6TBBza4L3MdiKJq4s1Y" alt="" data-size="original">

&#x20;The assets that a user deposits to the exchange are referred to as Collateral.  Surge currently allows the following assets to be deposited as collateral:

* sUSD
* xUSDC
* xwBTC
* xETH
* XRD
* LSULP

The amount of collateral along with the selected leverage defines the maximum size of any trade.  For example, assume a user deposits $500 of xUSDC to Surge as collateral.  Assuming they have no other positions currently open, they proceed to the XRD/USD pair and open a Market Long, selecting 10x as their Max Leverage.  This allows the user to open a position worth $5000 with only $500 deposited initially.

As the trader's position is amplified by 10x, any gains (or losses) are also magnified.  Leverage therefore provides traders the opportunity to increase risk (and potential reward) without requiring the up-front capital.

The collateral provided is used to provide security against this leveraged position being opened.  In the example above, utilising 10x leverage means that in the event that the market moves against the traders position by more than 10%, their entire collateral would be at risk of [Liquidations](/about-surge/liquidations).

### Cross Margin Collateral

A variety of assets can be deposited to provide security against leveraged positions.  Surge aggregates traders' total deposited collateral to support multiple positions.  This means that a trader does not need to explicitly provide collateral for individual positions.  Surge will automatically take into consideration the total collateral provided, along with any open positions when considering margin requirements.

This provides greater flexibility and efficiency in managing margin across multiple trades, without needing to open separate accounts.

### Collateral Value & Discount

To determine the asset value of any collateral provided, Surge may apply a discount, which is denoted in the Collateral table:

<figure><img src="/files/XqKG5WI4jbtM7pzBZbEM" alt=""><figcaption></figcaption></figure>

For the purposes of valuing collateral, the indicated discount is applied to the current market value which represents the risk of the collateral and potential cost of liquidation.  This allows a variety of collateral with different risk and liquidity to be utilised as security against a leveraged position.  In the table above, USD carries no discount due to it's quality and high liquidity.  XRD on the other hand, is discounted to 90% to account for it's relative risk.


# Funding

Funding rates are designed to help balance the positions between longs and shorts.  Dynamically adjusted depending on overall positions in a trading pair, they can either be positive (resulting in traders paying a funding rate) or negative (traders receive the funding rate).

The current funding rates for each trading pair are displayed above the chart, as per the example here:

<figure><img src="/files/bdtPWrkxxzBkEKg1Pzwg" alt=""><figcaption></figcaption></figure>

In this example, for the BTC/USD pair, at the time of writing, the current funding rates are 0.23% / -0.45%.  Traders who are Long will therefore pay a 0.23% fee on their positions in each 24 hour period.  By contrast, traders who take a Short position will earn a funding rate of 0.45% on their positions in each 24 hour period.

The funding rate should therefore be taken into consideration when opening a position, particularly in respect of time, as the total funding which is paid (or earned) is dependent on the length of time a position is held.&#x20;

### Funding settlement

When you open a trade exactly at that point your position is subject to funding. Every time there is an action on the Surge protocol your funding is updated making it in essence realtime. The settlement of the funding (either the pool owes you USD or you owe the pool USD) only happens when you trade any amount in that specific pair.\
\
Example position, Long 1.5 SOL

<figure><img src="/files/pUSE7VhNQiecaCfIqxLc" alt=""><figcaption><p>Position of Long 1.5 SOL</p></figcaption></figure>

The funding at the top says i'm paying 0.66% per day:

<figure><img src="/files/OYIflI9TNdyBniZzeRlX" alt=""><figcaption><p>Example 24h Funding </p></figcaption></figure>

Next if you do a trade in SOL/USD it will square up the funding. In this case the account will pay some funding. For simplicity in this example, we close the entire position...<br>

<figure><img src="/files/1R9Q9jO5MQ5Uim1KUGJL" alt=""><figcaption><p>Funding settlement can bee seen on the Trade History tab</p></figcaption></figure>

Now we can see the closing trade (top line), but more importantly (in this example) it can be seen that the Funding has been settled -0.11 USD which is 1 hour of funding at 0.6646% per day

### Funding for the Pool

Carefully looking at the numbers we can see it doesn't add up!

* BTC Longs 0.90762 (87,724 USD) are paying 0.2659% over 24 hours = 233 USD
* BTC Shorts 0.97282 (94,026 USD) are earning 0.2045% over 24 hours = 192 USD

<figure><img src="/files/FrvSiaApZI89GgluGkaM" alt=""><figcaption></figcaption></figure>

So where are the other 41 USD going? Eh Viola, the Surge USD pool is earning it...

<figure><img src="/files/YkXzUjfKTiTT95DedI4H" alt=""><figcaption></figcaption></figure>


# Skew

As explained in the [Funding](/about-surge/funding) section, Surge creates a feedback loop via the funding rate to attempt to balance the long and short positions taken by the central pool.  In some instances, despite attractive funding rates to incentivise arbitrageurs, there may be an imbalance between the total longs and shorts, referred to as Skew.

An increase in Skew can be problematic, as it puts a greater strain on the liquidity provided by the central pool.  If the Skew reaches beyond certain limits, the platform may prevent further skew-increasing trades from being executed, until such a time that traders take the opposing side to bring the Skew back into safe limits.

### Skew Risk

Skew risk is displayed above the chart as below for the BTCUSD pair (note, you may need to expand the status via the "+" symbol if this information is hidden).

<figure><img src="/files/1h3SyxDq5PN2dM3ubydm" alt=""><figcaption></figcaption></figure>

In the example above, you can see the Skew Risk is quoted as 99.93%.  This means that there is a particularly high degree of Skew in the central pool (in this case longs are outweighing the shorts) and traders will find it very difficult to open further longs or close short positions.

The maximum amount of Skew permitted by Surge is calculated as 15% of the pool's total liquidity.  We can determine the pool liquidity by referring to the "Earn" page:

<figure><img src="/files/GvZenS6DW2JMHErLBVVN" alt=""><figcaption></figcaption></figure>

As above the pool liquidity currently stands at $467,330.  Considering a permissible Skew of 15%, this gives a maximum Skew value of $70,099.5 ($467,330\*0.15)

Referring back to the first image above, Skew Risk is currently at 99.93%.  This means there is only 0.07% of available Skew, equating to a maximum skew-increasing trade of $49.

In the circumstance above, a trader intending to open a long position will find that any order above a size of $49 will not be executed by Surge as it would exceed the maximum Skew of 15%.

### Reducing Skew Risk

There are 2 ways in which the Skew Risk can be reduced:

1. An increase in pool liquidity.
2. An increase in positions which are skew-reducing (shorts in the example above)

Both of the above are incentivised by Surge, to naturally bring about an equilibrium in Skew.  The liquidity pool provides an APY as described in the [Liquidity Providers](/about-surge/liquidity-providers) section and positions which reduce Skew tend to provide attractive funding rates, as described in the [Funding](/about-surge/funding) section.


# Order Types

Surge supports the following order types:

* Market
* Limit
* Stop Limit

Some order types are also discussed [here](/getting-started/basic-opening-and-closing-trades).

All entry levels on trades are adjusted to include fees.

### Market Order

A market order means that you will enter a long (buy) or short (sell) position at the next oracle price once a keeper processes your order.

{% embed url="<https://youtu.be/G75-MOHOabM>" %}

### Limit Order

A limit order has an associated price level. Once the oracle price breaches the limit order level, the keeper will process your long / short order.

Limit orders are typically used to enter trades at better levels than the current prevailing market rate. In this sense they are a bit like a mean-reverting trade.

Example limit orders where BTCUSD is currently 70,000.

* Place a long (buy) order with a limit price at 65,000 (below the current market price)
* Place a short (sell) order with a limit price at 75,000 (above the current market price)

However, it's possible that the price never breaches the limit order level and the trade is not filled.

{% embed url="<https://youtu.be/R9kH7vI9pE4>" %}

### Stop Limit Order

Stop limit orders also have an associated price level but the direction of trade entry is different. They are used to enter a long (short) once the price has risen (fallen) to a certain level. In this sense they are a bit like following a trend in price.

Example stop limit orders where BTCUSD is currently 70,000.

* Place a long (buy) order with a limit price at 72,000 (above the current market price)
* Place a short (sell) order with a limit price at 68,000 (below the current market price)

{% embed url="<https://youtu.be/09hun9sE6Kg>" %}

### Take Profit / Stop Loss

As described [here](/about-surge/order-types/tp-sl-take-profit-and-stop-loss), Take Profits and Stop Losses can be added to order types.


# Limit Order

### Creating a Limit Order

Select the LIMIT tab in the Trade panel.  In the [#creating-a-market-order](#creating-a-market-order "mention")section above we created a Long Market Order using 50x leverage, so will use the same leverage in this example, and specify a Short position type (in this case our limit order will close our existing Long position if the specified price is reached).

<figure><img src="/files/wpiwjVjJ8YhZZDGVd7JG" alt=""><figcaption></figcaption></figure>

Specify the price for the order and the position size.  In this example we have set a price of 0.03 USD and specified a size of 250,000 XRD.  This will close the Long order we opened in the [#creating-a-market-order](#creating-a-market-order "mention") example in it's entirety if a price of 0.03 USD is reached.  Click SELL to send a transaction to the Radix Wallet and sign it.

<figure><img src="/files/UJM5oqu8CZ7UBkeFqgNz" alt=""><figcaption></figcaption></figure>

Once the transaction is confirmed, you can see the Limit Order in the ORDERS tab of the table below the chart:

<figure><img src="/files/bBDKwxVNOMKVtTWOoih6" alt=""><figcaption></figcaption></figure>

In the examples above we have used a Market order to open a long position, and a Limit order to close the position if our desired price is met.  However note that both Market and Limit orders can be used to open and close positions.


# TP/SL : Take Profit & Stop Loss

Automatically manage your exposure

Surge allows you to add a **Take Profit** and/or a **Stop Loss** to a trade. These allow for a trade to be automatically closed at the prevailing [Oracle](/about-surge/oracle) price once a threshold price has been achieved (in or out of the money). TP and SL levels are prices (like the market price).

<figure><img src="/files/Pv56UQmgfAlfB8fCxX5j" alt="" width="539"><figcaption></figcaption></figure>

### Take Profit

A take profit price level is typically used to lock in profits on a trade and would be set above (below) the entry price for a long (short) trade. Once the take profit level is reached then the open trade could be closed by [Keepers](/about-surge/keepers).

### Stop Loss

A stop loss is typically used to limit the losses on a trade and would be set below (above) the entry price for a long (short) trade. Once the stop loss level is reached then the open trade could be closed by a *keeper*.

### Example

Here is a market order to go long BTCUSD with a TP at 72,000 and SL at 71,600. Entry price on the trade is 71,811.

<figure><img src="/files/M0BeWHswrk9rrsIciwJe" alt="" width="546"><figcaption></figcaption></figure>

<figure><img src="/files/bdANCmlHZPXd2PmJNsX6" alt=""><figcaption></figcaption></figure>

In this trade (long at 71,811):

* If BTCUSD goes higher, above 72,000 then a *keeper* could work to sell out the position. This should lock in profits on the trade\*
* If BTCUSD goes lower, below 71,600 then a *keeper* could work to sell out the position. This will lock in a loss on the trade.

\*If a TP level is very close to the entry price then it is possible that trading fees could erode the profit on a trade.


# Oracle

Surge is dependent on highly accurate, low latency pricing information for all the assets that are available for trading.  This data is provided by an Oracle.  At present, Surge utilises Pyth as it's Oracle, but has been designed in such a way that in future, alternative providers may be substituted in the event that a superior service is identified.

The job of the Oracle is to ensure that price information of all assets on Surge are robust and reliable, as all trades and actions are dependent on the accuracy of these prices.

Surge [Keepers](/about-surge/keepers) are responsible for regularly passing the latest pricing information from the Oracle to the Surge exchange.

### Pyth Oracle

The Pyth Oracle provides real-time price feeds based on data provided by over 95 reputable providers including exchanges such as Binance, Kucoin and Gate, along with some of the most prominent market making firms.  This data is then aggregated multiple times per second.

Over 450 price feeds are currently available to Surge, covering a multitude of asset classes such as US equities, commodities and cryptocurrencies. &#x20;

Pyth not only provides price data but also a proof of the price, incorporating a digital signature and timestamp which assures the authenticity and timeliness of the data.


# Keepers

Keepers wield no direct power, yet they are 100% essential for the seamless operation of the Surge protocol.

Keepers are a critical component of the Surge perpetual DEX, ensuring smooth and decentralized operation by executing key functions and maintaining protocol stability. They act as independent entities that monitor the Surge system and facilitate necessary actions without holding any special authority over trades or user accounts.<br>

## Responsibilities of Keepers

### Processing User Requests:

Keepers observe user-submitted requests, such as opening or closing a position, and relay these actions to the Surge exchange component for verification and execution.

### Executing Limit Orders:

Keepers monitor pending limit orders and trigger them when the conditions are met, based on the latest oracle price updates.

### Updating Oracle Prices:

Keepers regularly update the exchange with price data from the oracle, ensuring trades and positions are valued accurately.

### Auto-Deleverage Support:

In rare cases where the system’s risk exceeds predefined thresholds, keepers assist the protocol by highlighting auto-deleverage actions possible to stabilize the platform.

## Decentralized by Design

### No Special Authority:

Keepers cannot directly execute trades or modify user accounts. They simply highlight actionable items for the Surge exchange component, which performs all verification and execution.

Anyone can become a keeper, provided they have the technical ability to run the necessary software. This ensures a decentralized and robust network of participants maintaining the protocol.

### How Keepers Work:

1. A user submits a request (e.g., to open a long position on BTC/USD).
2. Keepers observe this request in the system and wait for the next oracle price update.
3. Once the oracle provides a signed price update, the keeper forwards the user request and price data to the Surge exchange component.
4. The Surge exchange component validates the request, checks risk limits, and executes the trade if all criteria are met.
5. The keeper ensures all updates are recorded and continues monitoring for subsequent actions.


# Liquidations

Surge allows traders to utilise leverage to amplify the size of their positions, as detailed in the [Traders](/about-surge/traders) and [Collateral](/about-surge/collateral) sections.  Collateral provided is used as security to open a leveraged position.  In the event that the market moves unfavourably against a traders position, the value of the collateral may be at risk of providing inadequate security to cover any losses, at which point this collateral may be liquidated automatically by Surge.

### Initial Margin

Surge requires a minimum amount of equity to be held by a user in order to open and maintain a leveraged position and avoid liquidation.  In the example below, assume a long position is opened with 20x leverage.  The total position size is $256.89 as shown:

<figure><img src="/files/ZFq38zjKissVbX2bqKfH" alt=""><figcaption></figcaption></figure>

Hovering over the coloured bar displays the 'Risk Meter' which represents the initial margin utilisation.  For this position and considering 20x leverage, a minimum of $256.89 / 20 must be available as equity to open the position, which in this case equates to $12.84.  As can be seen in the image above, we have $13.20 available so the Risk Meter displays a value of less than 100% indicating that we currently have assets greater than the initial margin requirement.

If the market moves against this position, the balance shown (taking into account the current profit/loss) will reduce, and in the event this drops below the initial margin requirement, will be reflected in the Risk Meter showing a value in excess of 100%.

If this happens, the position is at considerable risk, but not yet liquidated.

### Maintenance Margin

In addition to the initial margin described above, Surge requires a minimum amount of margin to prevent liquidation, referred to as Maintenance Margin.  This is currently set by Surge to be 1%.

In the example above, assuming a position size of $256.89, a minimum equity of $2.57 must be available to keep the position open.  In the event that the account drops below this value, [Keepers](/about-surge/keepers) will automatically liquidate the collateral to prevent the account from running at a loss.

Adjacent to the "Risk Meter" shown in the image above is a coloured bar which starts at green and rises through to red as the account approaches the Maintenance Margin limit and liquidation.

It is important to remember that Surge utilises [Collateral](/about-surge/collateral#cross-margin-collateral) which aggregates margin across positions, allowing losses in some positions to be offset by profit in others when calculating margin requirements.  Surge also may apply a discounted value to collateral when calculating margin requirements, as described in the [Collateral](/about-surge/collateral#collateral-value-and-discount) section.


# Automatic Deleveraging

The stability and solvency of the platform is of paramount importance.  The health of the central pool ensures that trades can be executed at any size, and that risks are mitigated.

Surge incorporates a fail-safe mechanism that protects the pool in the event that these risk thresholds are breached.  For example, assume a number of leveraged positions are particularly profitable at a period in time.  The pool requires adequate capital to ensure that if those positions are closed, the profits can be paid to traders and the platform can continue to function with sufficient liquidity.

In the rare event that open positions create a situation where the liquidity of the pool might be at risk, the system (via [Keepers](/about-surge/keepers)) may force-close some positions.

The criteria for automatically deleveraging a position are as follows:

1. The market imbalance (skew risk) exceeds 100%.
2. The position's return on investment (ROI) is above the threshold, which decreases as skew risk increases.
3. Closing the position reduces risk to the central pool.


# Debt Settling


# Overview

The Surge token (SRG) provides holders the ability to have a say in the future direction of the Surge protocol.  As the platform matures, the token will convey voting rights to holders to make governance decisions on a variety of issues, such as fee structures and burn rates.

In addition to governance, 20% of all opening and closing trade fees are directed to the SRG treasury component.  By default the fees accumulating in this component are used to periodically buy back SRG from the market and burn the token to reduce it's supply.

In future, dependent on the preference as decided by a governance vote, the SRG token may also follow a staking model, allowing SRG holders to earn a yield from the collected fees.

The key Tokenomics are as follows:

* Token Supply : 100,000,000
* Token Generation Event : November 13th, 2024

Here’s a detailed breakdown of the token distribution and pending unlocks:

<figure><img src="/files/AMmRZKF3Jb8tfnr7P01w" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**SRG Resource Address:**\
&#x20;[resource\_rdx1tka3kqqkjxcpddvcx0u300qt66z3tlzv7swqx9rklp60m5yqry6yzk](https://www.caviarnine.com/tokens/resource_rdx1tka3kqqkjxcpddvcx0u300qt66z3tlzv7swqx9rklp60m5yqry6yzk)
{% endhint %}


# Burning

Currently, 20% of all opening and closing trade fees are directed to the SRG treasury vault.  These funds are used to buy back and burn the SRG token, diminishing its supply over time.

The SRG fee vault address is as follows:

{% hint style="info" %}
**SRG Treasury Vault:** \
component\_rdx1czwd96pvxsuy2ydd25fulz242x36h257thn45tscp4rkxkrfy99958
{% endhint %}

The ability to burn the SRG token is coded into the tokens attributes.  Whilst the platform is in it's infancy, the SRG vault will accrue fees and be periodically utilised for a buy back and burn of the SRG token. Surge displays the balance of the SRG treasury vault in real-time on the site and enables anybody from the community to initiate the burn via the UI for the sUSD in the treasury.<br>

<figure><img src="/files/CrudFkhmjAdHeNwgeM12" alt=""><figcaption><p>Example of the burning mechanism</p></figcaption></figure>


# Terms of Use

## Surge Trade Terms & Conditions

### 1. IMPORTANT INFORMATION

By using surge.trade and its associated features, you agree to abide by these Terms & Conditions (T\&Cs). Please read them carefully. If you do not agree to these terms, you should not use surge.trade.

### 2. SERVICES

surge.trade provides tools for speculating on cryptocurrency assets, as well as liquidity provision. The website and its functionality, including smart contract capabilities, were developed by Surge and partners.

### 3. LIMITATION OF LIABILITY

While smart contracts on surge.trade have undergone external audits, it's vital to understand that audits do not guarantee the absence of unforeseen issues in the future.\
Users are solely responsible for any potential loss, damages, or liability arising from the use of Surge products. Neither Surge nor any of its partners will be held liable for any losses, whether direct or consequential, stemming from the use of the website and its services.

### 4. THIRD-PARTY INTERACTIONS

Users acknowledge that both Surge and any of its partners are not liable for the actions or liabilities of third parties, including Radix L1, external decentralized exchanges (DEXs), or associated smart contract interactions.

### 5. USER RESPONSIBILITIES

* **Risk Management:** Users should only engage with surge.trade using assets they are willing to risk.
* **Compliance:** Users must abide by all relevant local, state, national, and international laws and regulations. This includes, but is not limited to, regulatory requirements and constraints based on the user's jurisdiction.

### 6. INDEMNIFICATION

By using surge.trade, users agree to indemnify and hold harmless Surge, any of its partners, and its affiliates from any claims, damages, or losses arising from their use of the platform.

### 7. INTELLECTUAL PROPERTY

All content on surge.trade, including but not limited to text, graphics, logos, and software, is the property of Surge and is protected by international copyright laws.

### 8. CHANGES TO T\&Cs

These T\&Cs may be updated periodically. The latest version will always be available on surge.trade. It is the responsibility of the users to check these terms regularly for any changes.

### 9. CONTACT

For any questions regarding these T\&Cs, please contact:\
**Email:** <support@surge.trade>

### 10. ACCOUNT SUSPENSION, RESTRICTION, MODIFICATION, AND TERMINATION

Surge Protocol reserves the right, at its sole discretion, to restrict, modify, suspend, or terminate any user account or any part of the services provided by Surge, for any reason, including—but not limited to—the following:

* **Violation of Laws:** Engaging in activities that violate applicable laws and regulations, including but not limited to anti-money laundering or anti-terrorism laws.
* **Intellectual Property Infringement:** Infringing on trademarks, copyrights, or using Surge’s intellectual property without proper authorization.
* **Abusive Trading Practices:** Participating in fraud, front-running, market manipulation, or "money pass" schemes (i.e., transferring funds between accounts to create false market activity).
* **Interference with Services:** Disrupting, interfering with, or negatively affecting the proper functioning of Surge’s services or the experience of other users.
* **Unauthorized Use of Automated Tools:** Utilizing unauthorized automated tools or software to extract data or to introduce harmful software, including malware or viruses.
* **Misleading Information:** Providing false or misleading information, or engaging in fraudulent activities.
* **Criminal Activity:** Transmitting, exchanging, or otherwise using digital assets derived from illegal or fraudulent activities, including those related to terrorism financing or tax evasion.
* **Objectionable Content:** Posting or transmitting offensive, abusive, discriminatory, or otherwise objectionable content.
* **Jurisdictional Restrictions:** Accessing or using Surge’s services from jurisdictions where such activities are prohibited.
* **Impersonation:** Misrepresenting oneself as another person or entity.
* **Assisting Prohibited Activities:** Encouraging, assisting, or facilitating others to engage in any of the above or any other prohibited activities.

This list is not exhaustive. Surge Protocol may take action against any account or service usage it deems, in its sole discretion, to be in violation of these Terms & Conditions or otherwise harmful to the platform, its users, or third parties. If a user is uncertain about whether a particular activity is permitted, they should contact Surge Protocol for clarification before proceeding.


# Disclaimer

Before using any services or applications on surge.trade, including trading, liquidity provisioning and smart contracts, you must carefully read and understand the following terms and conditions:

Surge services and its associated features, including smart contracts, are provided "as is". While our smart contracts have undergone external audits, an audit does not guarantee that unforeseen issues won't arise in the future. By using Surge products, you acknowledge and understand that the utilization of the website, software, smart contracts, and all associated services is wholly at your discretion and risk.

Any potential loss, damages, or liability arising from the use of Surge products, including those related to smart contracts, is entirely the user's responsibility. Neither Surge, nor our partners assume liability for any such loss, damages, or liability, whether direct or consequential, arising from your engagement with surge.trade.

Surge and partners are not responsible for the actions or liabilities of third parties, including but not limited to Radix L1, any external DEXs, or associated smart contract interactions. Any losses or liabilities stemming from third-party actions or contract executions are the sole responsibility of the user.

The Surge Team earnestly advises users to engage with surge.trade using only assets they can afford to risk, and to exercise prudence and due diligence when navigating the website, associated software, and smart contracts.

Surge and partners provide no guarantee regarding the accuracy, timeliness, suitability, or completeness of any information on this site and shall not be accountable for errors, delays, or inadequacies in this information or any consequences resulting from its display or use. Any links to third-party sites are purely informational; we neither control nor endorse such sites and bear no responsibility for the content's accuracy therein.

Any potential losses, including but not limited to the loss of tokens, data, or profits arising from surge.trade, including smart contract engagements, lie squarely with the user.

Users should be aware that engaging with surge.trade, including its smart contracts and associated financial services, may be subject to specific legal or regulatory constraints depending on their jurisdiction. In particular, residents or citizens of the United States should exercise extra caution due to regulatory uncertainties.

It is the user's obligation to familiarise themselves with and strictly abide by all relevant local, state, national, and international laws, regulations, and policies pertaining to their specific use of surge.trade. If you are uncertain about the legal status of any activity or transaction, we strongly advise consulting with legal counsel in your jurisdiction before using our platform.

By using surge.trade, you consent to indemnify, defend, and exempt the Surge team and its affiliates from any claims, damages, losses, or expenses (including attorney fees) resulting from your usage of the website, software, or smart contracts.

Your use of surge.trade signifies your understanding and acceptance of this disclaimer and all its terms and conditions.

Be advised that these terms and conditions may undergo periodic revisions, with the updated version consistently available on surge.trade. Users are tasked with reviewing the current terms regularly to remain updated on any alterations.


# Surge Manifests

Building Atomic Transactions with Radix

A Radix transaction manifest is a human-readable blueprint for building atomic transactions, allowing multiple actions, resource movements, and authorization checks (via badges) to be composed and executed seamlessly. It ensures predictable outcomes by specifying fees and resource constraints, enabling developers and users to clearly understand and trust the transaction they are signing. Once ready, the manifest is translated into a cryptographically signed binary format for efficient network submission and processing by the Radix Engine.

## How user requests are handled

User requests, such as MarginOrders and RemoveCollateral, are promptly recorded in their Surge trading accounts for potential execution by the Surge exchange, contingent on approval. The keeper network diligently monitors these requests, both new and pending, and relays them to the Surge Exchange, accompanied by the latest Oracle prices. While keepers lack direct authority, they are indispensable for conducting off-chain computations and continuous monitoring. Upon a user placing a request, it is swiftly logged in their trading account. Within seconds, the keeper assesses the request's feasibility and, if deemed viable, submits it to the exchange for execution, utilizing the most recent oracle data. This efficient process explains the brief "Pending Request" notification on the user interface, soon followed by "Trade executed."<br>

## Requesting a MarginOrder Trade

Placing a request for a MarginOrder, be it a market order, limit, stop limit with or without take profits or stop losses, log or short, with or without delays...

```
CALL_METHOD
    Address("{EXCHANGE_COMPONENT}")    <- Exchange component
    "margin_order_tp_sl_request"
    Enum<0u8>()                        <- Fee oath (not enabled yet)
    {DELAY}u64                         <- Delay
    {EXPIRY}u64                        <- Expiry
    Address("{TRADING_ACCOUNT}")       <- Trading account
    "{PAIR}"                           <- Pair
    Decimal("{AMOUNT}")                <- Amount
    false                              <- Reduce only
    Enum<0u8>()                        <- Price limit
    Enum<0u8>()                        <- Slippage limit
    Enum<0u8>()                        <- Take profit
    Enum<0u8>()                        <- Stop loss
;
```

***

#### Exchange

* **Description**: The exchange component responsible for processing the order.
* **Example**: `component_rdx1czpfv5d9wwwpnv283vsstt4qdg7mnp6p9a9p5jfa3fykd2cqjaqnza`
* **Note**: This address changes when the exchange is upgraded, as indicated by the `EventSignalUpgrade` structure:

  ```rust
  struct EventSignalUpgrade {
      new_exchange: ComponentAddress,
  }
  ```

#### Delay

* **Description**: The number of seconds before the order becomes valid for execution.
* **Example**: `0`

#### Expiry

* **Description**: The number of seconds after the order becomes valid, at which point the order expires.
* **Example**: `3153600000`

#### Trading Account

* **Description**: The trading account used to place the order.
* **Example**: `component_rdx1cq02dya605d6y4w6zlz82kcdcqsx66hx6w0zel4nwvxk7l9jxzxl92`
* **Note**: The correct proof associated with the trading account's level 3 authorization must be present.

#### Pair

* **Description**: The trading pair for the order.
* **Example**: `SUI/USD`

#### Amount

* **Description**: The size of the order.
  * Positive value indicates a long position.
  * Negative value indicates a short position.

#### Reduce Only

* **Description**: Determines if the order can only decrease a position.
  * `false`: Can both increase or decrease a position.
  * `true`: Can only decrease a position.

#### Price Limit

* **Description**: Specifies the price limit for the order.
  * `Enum<0u8>()`: None (market order).
  * `Enum<1u8>(Decimal("{limit_price}"))`: Oracle price must be greater than or equal to limit price (short limit or long stop limit).
  * `Enum<2u8>(Decimal("{limit_price}"))`: Oracle price must be less than or equal to limit price (long limit or short stop limit).

#### Slippage Limit

* **Description**: Defines the slippage limit, which is equivalent to the fee.
  * `Enum<0u8>(Decimal("{limit_slippage}"))`: None.
  * `Enum<1u8>(Decimal("{limit_slippage}"))`: Fee must be less than or equal to `limit_slippage * trade_value / 100` (percentage limit).
  * `Enum<2u8>(Decimal("{limit_slippage}"))`: Fee must be less than or equal to `limit_slippage` (absolute limit).
* **Note**: Maximum fee is 1%.

#### Take Profit

* **Description**: Sets a take profit condition.
  * `Enum<0u8>()`: None.
  * `Enum<1u8>(Decimal("{tp_price}"))`: Opposing limit order at `tp_price`.

#### Stop Loss

* **Description**: Sets a stop loss condition.
  * `Enum<0u8>()`: None.
  * `Enum<1u8>(Decimal("{sl_price}"))`: Opposing stop limit order at `sl_price`.
* **Note**: Take profit (TP) and stop loss (SL) are separate OCO (One Cancels the Other) reduce-only orders that start dormant and are activated by the execution of the main order.

***


