# Trading on Mainnet

## Overview

Welcome to DeriW, a decentralized perpetual contract trading platform built on AMM mechanism. The platform offers zero gas fees, low trading fees (0.02%), and leverage up to 100x. With non-custodial services, users maintain full control of their funds while accessing institutional-grade trading features.

## Getting Started

### Adding a Wallet

Before trading on DeriW, you need to connect a Web3 wallet. We currently support the following popular wallets below:

* [MetaMask](https://metamask.io/)
* [Wallet Connect](https://walletconnect.network/)
* [OKX Wallet](https://www.okx.com/)
* [CoinBase Wallet](https://www.coinbase.com/wallet)
* [Bitget Wallet](https://web3.bitget.com/en)
* [Kepler](https://www.keplr.app/)
* [Trust Wallet](https://trustwallet.com/download)
* [Rabby Wallet](https://rabby.io/)

If you don't have a wallet yet, you can download any of the above from their official websites.

### Connecting Your Wallet

<figure><img src="/files/7MWWR8xSkz4lNjW3MDZl" alt=""><figcaption></figcaption></figure>

1. Visit [www.deriw.com](http://www.deriw.com)
2. Click the "Connect" button in the top right corner
3. Select your preferred wallet from [the list](#adding-a-wallet)
4. Approve the connection in your wallet

Alternatively, you can manually add the DeriW network to your wallet:

* **Network Name:** DeriW Chain
* **RPC URL:** <https://rpc.deriw.com>
* **Chain ID:** 2886
* **Currency Symbol:** ETH
* **Block Explorer:** <https://explorer.deriw.com>

### Funding Your Account

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

To start trading, you need to bridge funds from Arbitrum to DeriW Chain:

1. Click the "Deposit" button on the [Trade page](https://www.deriw.com/trade)
2. Select USDT from your Arbitrum wallet
3. Enter the amount to bridge (minimum: $10)
4. Confirm the transaction and pay ETH gas fees
5. Wait for blockchain confirmation

**Important Notes:**

* You need ETH on Arbitrum to pay gas fees for bridging
* Minimum deposit: $10
* Funds will appear in your DeriW account balance after confirmation

To withdraw funds, click the "Withdraw" button and follow similar steps.

## Trading Interface

Visit the DeriW website and click on [**Trade**](https://www.deriw.com/trade).

<figure><img src="/files/2ocf8to6IM0d5f5z1LVx" alt=""><figcaption></figcaption></figure>

### **Price Chart**

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

DeriW displays market movements through candlestick charts with adjustable time intervals.

\
DeriW executes trades directly against its unified liquidity pools and references a reliable oracle index price, eliminating the need for an order book or external market makers. Individual order execution prices, which may include price impact for large orders, are calculated separately and are not reflected in the chart.

### Oracle Index Price Mechanism

\
DeriW uses a weighted average price from multiple exchanges as its oracle index price source. The current oracle price is composed of real-time market prices from four major exchanges: Binance, OKX, Bybit, and Gate.io.

\
The system performs weighted calculations based on each exchange's market depth and trading volume. Abnormal price fluctuations are automatically filtered out. A composite price is generated that is more stable, fair, and manipulation-resistant.

\
This effectively reduces the impact of single market volatility on contract prices, prevents price manipulation from any single exchange, ensures users receive a more transparent and reliable trading experience on DeriW, and Provides fair liquidation prices based on true market consensus.

\
This multi-exchange aggregation mechanism is a key feature that protects traders from extreme price wicks that may occur on individual exchanges.

### Trade Sidebar

The trade sidebar allows you to:

* Select position mode (Long/Short)
* Select order type (Market/Limit)
* Choose margin mode
* Adjust leverage (2x - 100x)

<figure><img src="/files/foqEadt0zChgoXdEElip" alt="" width="186"><figcaption></figcaption></figure>

### Position Section

In the position section, users can monitor their current positions, open orders, and order history.&#x20;

In "Positions", users can review their trade size, average price, mark price, estimated liquidation price, PnL, and other pertinent information related to their current positions. Additionally, user can also set a “Trigger” to automate order closures or “Close” them manually.

In  “Orders” users can check unexecuted orders; In “History”, users can check closed ones.

## **Opening a Position**

On the Trade page, click "Long" or "Short" based on your preference for opening a leverage position.&#x20;

And specify:

* Position size (in USDT)
* Leverage (2x - 100x)
* Order type (Market or Limit)

After confirming the transaction, your order will immediately appear in the Position section.&#x20;

**Please note:**

* For first time users, “Approve USDT” in the wallet before trading.&#x20;
* If the order sizeexceeds the available liquidity, you will not be able to open an order.

### Selecting Long or Short

* **Long Position:** Profits when price increases, loses when price decreases
* **Short Position:** Profits when price decreases, loses when price increases

### Selecting a Market

Choose the asset you want to trade (e.g., BTC/USDT, ETH/USDT, SOL/USDT)

### Leverage

DeriW supports up to **100x leverage** on both market and limit orders.

**Risk Warning:** Higher leverage amplifies both gains and losses. Use appropriate risk management and monitor your positions actively.

## Managing Positions

After opening a trade, you would be able to review it under your positions section review including trade size, average price, mark price, estimated liquidation price, PnL, margin and other pertinent information related to their current positions.

You can also click on "+" button to deposit or withdraw USDT to change its margin.

### **Average Price**&#x20;

The **average price** is the weighted average price at which your position was opened.

If you open a position in a single order, the average price equals your execution price. If you increase your position multiple times, the average price is recalculated based on all entries

**Example:**

> First entry: Buy 100 USDT worth of ETH at $2,000 = 0.05 ETH
>
> Second entry: Buy 100 USDT worth of ETH at $2,100 = 0.0476 ETH
>
> Average price = (100 + 100) ÷ (0.05 + 0.0476) = $2,049.18

**What it's used for:**

* Calculating your total position cost basis
* Determining your overall profit/loss percentage
* Displayed in your position row for reference

### **Mark Price**&#x20;

The **mark price** is the current oracle index price aggregated from multiple exchanges. For more details on this price mechanism, see [Oracle Index Price Mechanism](#oracle-index-price-mechanism).

**What it's used for:**

* Calculating your **unrealized PnL** (profit and loss)
* Determining if your position reaches the **liquidation price**
* Triggering **TP/SL orders**
* Displaying on the K-line chart

**Important Notes:**

* Mark price updates in real-time based on market movements
* Your liquidation is based on mark price, not execution price
* Mark price is independent of your average entry price

### Price Difference and PnL

Your **unrealized profit/loss** is calculated as:

```
PnL = (Mark Price - Average Price) × Position Size ÷ Average Price
```

**For Long Positions:**

* If Mark Price > Average Price → You're in profit
* If Mark Price < Average Price → You're in loss

**For Short Positions:**

* If Mark Price < Average Price → You're in profit
* If Mark Price > Average Price → You're in loss

## **Closing a Position**

Partial or complete position closure is possible by clicking "Close" in the position row. An automatic position closure is also possible by clicking "SL/TP".

## Order Types

### Market Orders

Market orders execute immediately at the current oracle price. There is limited price impact for opening positions according to the slippage setting. But large positions may incur slippage when opening to protect pool stability.

### Limit Orders

Limit orders allow you to set a specific price for entry. Limit orders attempt to execute when the oracle price reaches your limit price. Using the DeriW AMM Model, limit orders differ from those on orderbook exchanges. Since there is no orderbook for orders to "rest" on, a limit order executes by attempting to match the closest oracle price once its limit price is triggered. This mechanism means the execution will generally differ from your set limit price.

These orders appear in your position row and under the "Orders" tab. You can edit or cancel them at any time.

Limit orders are not always executed successfully. This usually happens in three main scenarios:

1. The price target wasn't quite met: The market price (or "mark price," which is the average across exchanges) never actually reached the specific price you set.
2. Not enough buyers or sellers: The mark price was met, but there wasn't enough trading volume (liquidity) available at that exact moment to fill your order.
3. Leverage limits exceeded: Executing the order would push your current leverage above the maximum allowed limit for that trade or position.

### **Stop-Loss / Take-Profit Orders**

Create trigger orders for stop-loss and take-profit by selecting the "Close" tab in the position row. Set your Stop Loss and/or Take Profit trigger prices and amounts.&#x20;

These orders appear in your position row and under the "Orders" tab. You can edit or cancel them at any time.

**Note:** TP/SL orders are not guaranteed to execute if:

* The mark price did not reach the specified trigger price
* There is insufficient liquidity at trigger time

## Liquidations

The liquidation price is defined as the price at which the token price exceeds or falls below the average price by a certain range—that is, when the loss plus transaction fees equals a certain percentage of the margin.&#x20;

It is calculated as follows:&#x20;

```
(Collateral - Losses - Total Fees) < Threshold % of Position Size
```

The liquidation threshold percentage ranges from **0.5% to 1.5%** of your position size, depending on market conditions and pool settings. If the token price falls below this point, the position will be automatically liquidated.

Total Fees include opening/closing fees, and funding rates. Leverage is the leverage multiplier chosen by the user.

### Liquidation Price

Your liquidation price is displayed in the position section and indicates the price level at which your position will be automatically closed.&#x20;

Your liquidation price is **not static**. It changes over time due to accruing funding rates, or changes in your collateral value.&#x20;

For positions with high leverage held for more than a few days, actively monitor your liquidation price. When the position is liquidated, the actual execution price may fluctuate relative to the displayed forced liquidation price, and may not be directly reflected on the K-line chart.&#x20;

It is important to understand that your liquidation price is not fixed, especially when you use leverage over 10 times and hold the position for many days, requiring close attention/monitoring.&#x20;

In order to lower the liquidation risk, you can deposit additional USDT collateral through the "Margin" button in the position row, which can effectively raise (lower) the liquidation price.&#x20;

Finally, if your position is liquidated, after considering losses, liquidation fees, and other payable fees, the remaining collateral will be automatically returned to your wallet.

## Slippage

DeriW utilizes the Pendulum AMM (Automated Market Maker) mechanism, meaning you trade directly with the liquidity pool instead of with other traders. Slippage refers to the difference between the expected execution price when you submit an order and the actual price at which the order is filled, which is caused by price volatility during the period the order is pending.

The slippage setting is applied at the time the position is opened. Fluctuations occur both upon opening the position and after the on-chain execution.

<figure><img src="/files/Xhkj7il4OkiHRAbrzEil" alt="" width="375"><figcaption></figcaption></figure>

The default slippage is 0.1%, which can be adjusted in the settings or in the trading box when placing a trade.

<figure><img src="/files/Mz4bQhfFw6Qso1AqexVb" alt="" width="375"><figcaption></figcaption></figure>

### Liquidity Pool Slippage Mechanism

When the market becomes heavily one-sided and exceeds the liquidity pool's capacity, the system automatically applies a slight slippage to newly opened positions in that direction to protect overall fair trading

Slippage is triggered when net exposure (difference between longs and shorts) becomes heavily one-sided and this exposure exceeds **70% of the liquidity pool capacity**

**Example Scenario:**

```
Current Positions:
- Total Long Positions: 1,000 USDT
- Total Short Positions: 700 USDT
- Net Long Difference: 300 USDT

Liquidity Pool: 280 USDT

Result:
- Net exposure (300 USDT) > 70% of pool (196 USDT)
- Opening new long positions WILL trigger slippage
- Opening short positions will NOT be affected
```

### **Slippage Calculation**

The platform uses a dynamic calculation model. The slippage percentage depends on your position size, current net exposure in that direction, available liquidity pool balance, and total market position size in that direction.

For Long Positions:

```
Long Slippage = (User Long Size + (Net Long - 70% of Pool)) ÷ Total Longs × 2%
```

For Short Positions:

```
Short Slippage = (User Short Size + (Net Short - 70% of Pool)) ÷ Total Shorts × 2%
```

## Fees and Rebates <a href="#fees-and-rebates" id="fees-and-rebates"></a>

### Trading Fees

DeriW offers industry-leading low fees:

> Opening Fee = Position Size × Leverage × 0.02%> \
> Closing Fee = Position Size × Leverage × 0.02%

Fees are charged once on open and once on close.

**Example:**

> Position size: 10,000 USDT
>
> Opening fee: 10,000 × 0.02% = 2 USDT
>
> Closing fee: 10,000 × 0.02% = 2 USDT
>
> Total fees: 4 USDT

OG/VIP users receive real-time rebates. (Read more [DeriW OG Program](/community/deriw-og-program.md)).

#### VIP Fee Rebates (OG Program)

Users holding DER points receive real-time fee rebates:

| DER Points Held | VIP Level | Fee Rebate |
| --------------- | --------- | ---------- |
| ≥ 5,000 DER     | VIP 2     | 20%        |
| ≥ 400 DER       | VIP 1     | 10%        |

Rebates are applied instantly upon trade execution. For more details, see the [DeriW OG Program](/community/deriw-og-program.md)).

## **Stablecoin Pricing**

During stablecoin depegging, short positions incur collateral costs based on a spread from 1 USD to the official price. Profits for short positions are paid out based on a price of 1 USD or the current official price, whichever is higher. Swaps using depegged stablecoins also have a spread.

Long positions remain unaffected, but a warning is displayed if a large spread exists when swapping from a depegged stablecoin to long collateral. Alternative swap platforms can be considered to execute the swap before opening a long position.

## Risk Management Advisory: Choosing Your Leverage

To better protect the security of your assets, we recommend choosing a reasonable leverage multiplier when trading.

Although high leverage magnifies profits, it equally magnifies risks, which can easily lead to unnecessary losses during periods of rapid market fluctuation.

Please operate according to your own risk tolerance, reasonably control your position size, and trade steadily.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.deriw.com/trading/trading-on-mainnet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
