# How Perps Trading Works

## **How perps trading works on Vordex**

Vordex is a **decentralized perpetual exchange** that allows traders to **open leveraged positions** using collateral from the Loan Pool.

Unlike traditional spot trading, **perpetual trading** on Vordex enables users to:

✔️ **Trade with leverage** – Increase market exposure using borrowed funds.\
✔️ **Long or Short assets** – Profit from both rising and falling markets.\
✔️ **Manually manage positions** – Since automated TP/SL orders are not supported, traders must **actively monitor their trades**.

#### How is pricing ensured?

To make sure that perpetual trades are based on **accurate and up-to-date prices**, Vordex relies on its **internal price oracle**. This oracle updates in real time with every trade made on the platform, allowing fair liquidations and proper margin management.

👉 Learn more about the Oracle [here](../vordex-price-oracle)

***

### **1. Position management**

#### **Long Positions**

A **long position** profits when the price of the asset **increases**.

✔️ **Traders deposit collateral** (only ALPH).\
✔️ **Additional funds are borrowed** from the Loan Pool to **increase position size**.\
✔️ **Profits are paid in the longed asset** upon closing the position.

🔹 **Example:**

* You open a **long ALPH-USDT** position at **$2.50**.
* If ALPH **rises to $3.50**, you profit from the **price increase**.

#### **Short Positions**

A **short position** profits when the price of the asset **decreases**.

✔️ **Traders deposit collateral** (only ALPH).\
✔️ **Additional funds are borrowed** to sell the asset at the current market price.\
✔️ **Profits are paid in the stablecoin collateral** when closing the position.

🔹 **Example:**

* You open a **short ALPH-USDT** position at **$3.50**.
* If ALPH **drops to $2.50**, you profit from the **price decline**.

***

### **2. Managing collateral and liquidation risk**

Traders can **adjust their collateral** to manage margin requirements and avoid liquidation.

✔️ **Adding collateral** → **Reduces liquidation risk** by increasing margin.\
✔️ **Withdrawing collateral** → **Increases liquidation risk** by lowering margin.

📌 **Liquidation Price Calculation:**

* **Longs** → Liquidation occurs if **ALPH price drops below the liquidation price**.
* **Shorts** → Liquidation occurs if **ALPH price rises above the liquidation price**.

⚠️ **Leverage amplifies risk** → Regularly monitor your **liquidation price** and **adjust collateral** as needed.

***

### **3. Manual position management (No TP/SL Orders)**

On **Vordex, Take-Profit (TP) and Stop-Loss (SL) orders cannot be automated** due to the **limitations of RALPH, the Alephium smart contract language**.

✔️ **Traders must actively monitor the market** and manually close positions to lock in profits or limit losses.

📌 **Example of Manual Position Management:**

* You open a **long ALPH at $2.50**.
* If your target price is **$3.50**, you must **manually close your position** when ALPH reaches this level.
* If the price drops and you want to limit losses, you need to **exit manually before liquidation**.

⚠️ **Since Vordex does not support automated TP/SL orders, it is essential to track your trades regularly and react quickly to market movements.**

***

### **4. Fees and Costs on Vordex Perps**

When you trade on Vordex, four types of fees apply. Here’s what to expect:

1️⃣ **Transaction Fees (Gas)**\
→ You’ll pay standard on-chain gas fees required to execute trades on the Alephium blockchain.

2️⃣ **Liquidity Provider Fee**\
→ A fixed **0.3% fee** is applied on each trade.\
💡 This fee is distributed to **liquidity providers** for supporting trading activity.

3️⃣ **Opening/Closing Fee**\
→ A **0.06% fee** is applied based on your position size.\
💡 This applies **when opening or closing** a position on the perpetual markets.

4️⃣ **Borrow Fee**\
→ Charged **hourly** on borrowed funds used to open leveraged positions.\
💰 The rate is **dynamic** and depends on the **Loan Pool utilization** at the time of borrowing.

***

#### 📌 **Example Borrow Fee Calculation**

* **Position Size:** $10,000
* **Hourly Borrow Rate:** 0.0034%
* **Hourly Cost:** $10,000 × 0.0034% = **$0.34**
* **Daily Cost:** $0.34 × 24 = **$8.16**

These fees ensure fair compensation for liquidity providers and maintain the sustainability of the Vordex perpetual trading model.

***

### **5. Risk Management and Liquidation**

To ensure the long-term sustainability of the protocol and fairly compensate liquidity providers, **positions on Vordex are automatically liquidated when the trader’s loss reaches -75% of their initial collateral**.

#### **Why Liquidate at -75%?**

✔️ To **protect the Loan Pool** from bad debt and ensure it remains solvent.\
✔️ To allow recovery of the borrowed funds plus interest.\
✔️ To **reward Loan Pool contributors** by using the remaining 25% of the collateral to cover interest and maintain yield.

***

#### **When Does Liquidation Occur?**

✔️ When the **position’s unrealized PnL reaches -75%** of the collateral.\
✔️ When the **asset price hits the liquidation threshold**, based on leverage and market conditions.\
✔️ When the **collateral is no longer sufficient** to maintain the minimum margin requirements.

📌 **Example Liquidation:**

You open a **$10,000 long position** using **$1,000 in collateral** (10x leverage).\
If ALPH drops by **7.5%**, your unrealized PnL is **-75%**, and the position is **liquidated**.\
The remaining **25%** of your collateral is retained by the protocol to repay the borrowed amount and interest to liquidity providers.

***

#### ⚠️ **Mitigating Liquidation Risk**

✔️ **Use lower leverage** → Reduces liquidation exposure.\
✔️ **Monitor your liquidation price** → Add more collateral if needed.\
✔️ **Close trades manually** → Vordex does not support automatic take-profit or stop-loss orders. Traders must **actively manage open positions**.

This system maintains a fair and efficient trading environment, protecting both traders and the Loan Pool while incentivizing healthy liquidity participation.

***

### **6. Example trade**

🔹 **Scenario: Opening a 5x Long on ALPH**

* You deposit **$500 in ABD** as collateral.
* You apply **5x leverage**, borrowing additional **$2,000 in ABD** from the Loan Pool.
* Your total **position size** = **$2,500**.
* You enter at **$2.50 ALPH price**.

📌 **Profit Calculation:**

* If ALPH rises **10%** → **Your position value increases by $250**.
* After **borrow fees & closing fees**, you **keep $230 profit**.

📌 **Liquidation Calculation:**

* If ALPH **drops to $2.00**, your position **gets liquidated**.

***
