> For the complete documentation index, see [llms.txt](https://hertzflow.gitbook.io/hertzflow-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hertzflow.gitbook.io/hertzflow-docs/trade-on-hertzflow/position-management.md).

# Position Management

Monitor, adjust, and close positions — collateral, leverage, fees, and liquidation.

## Position Lifecycle

Once your position is open, you can monitor it in real time. Each position shows:

* **Notional Size** — total position value
* **Net Value** — your collateral + unrealized PnL - accrued fees
* **Entry Price** — where you entered
* **Mark Price** — current oracle price
* **Liquidation Price** — the price at which your position auto-closes
* **TP / SL** — any active take profit or stop loss triggers

### Increasing a Position

You can add to an existing position by opening another order in the same direction on the same market. The system automatically merges them:

* Your **entry price** recalculates as a weighted average
* Your **leverage** adjusts based on the new collateral-to-size ratio
* Existing **TP/SL orders** are checked for validity against the updated position

### Reducing a Position

When you reduce a position, you choose one of two modes:

**Keep Leverage Off (default)** — reduces your position size while keeping all collateral in place. This effectively deleverages your position. You receive only the realized PnL from the closed portion; your collateral stays locked.

> **Example:** You have a $10,000 position with $1,000 collateral (10x leverage). You close 50% with Keep Leverage Off. Your position becomes $5,000 with $1,000 collateral (now 5x leverage). You receive the realized PnL on the $5,000 you closed.

**Keep Leverage On** — reduces both position size and collateral proportionally, maintaining your leverage ratio. You receive realized PnL plus proportional collateral back to your wallet.

> **Example:** Same setup. You close 50% with Keep Leverage On. Your position becomes $5,000 with $500 collateral (still 10x leverage). You receive $500 collateral + realized PnL.

### Editing Collateral

You can add or remove collateral without changing your position size:

| Action                | Effect                                                                                           |
| --------------------- | ------------------------------------------------------------------------------------------------ |
| **Add collateral**    | Moves liquidation price further away, increases leverage headroom, widens valid TP/SL boundaries |
| **Remove collateral** | Moves liquidation price closer to mark price, may invalidate existing TP/SL orders               |

{% hint style="warning" %}
When you remove collateral:

* **TP orders** beyond the new maximum are automatically adjusted to the new cap price
* **SL orders** outside the new -80% boundary are marked invalid — you'll see a warning and need to update them
* You cannot remove collateral below 10 USDT minimum or exceed max leverage limits
  {% endhint %}

## Order Parameters

When placing an order, you configure:

| Parameter         | Details                                                                                                                                                                                |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Side**          | Long (expect price to rise) or Short (expect price to fall)                                                                                                                            |
| **Order Type**    | Market / Limit / Trigger                                                                                                                                                               |
| **Collateral**    | USDT, minimum 10 USDT                                                                                                                                                                  |
| **Leverage**      | From 1.1x up to each market's cap — the exact ceiling is per market and shown live in the trade panel (see [Market Structure](/hertzflow-docs/trade-on-hertzflow/market-structure.md)) |
| **Position Size** | Automatically calculated: Collateral × Leverage                                                                                                                                        |
| **Slippage**      | Configurable per trade — orders exceeding tolerance will revert                                                                                                                        |
| **Entry Price**   | Market price for market orders; your set price for limit orders                                                                                                                        |
| **TP / SL**       | Optional exit triggers, bounded between -80% and +2500% PnL                                                                                                                            |

## Closing a Position

You can close via **market order** (immediate) or **TP/SL trigger** (automatic when price is reached):

* **Positive PnL:** You receive your collateral + profit, paid from the liquidity pool
* **Negative PnL:** You receive remaining collateral after losses; the loss goes to the liquidity pool
* **Partial close:** PnL is realized proportionally based on the closed portion

## Fee Structure

### Trading Fees

| Fee              | When Charged              | Rate                                                           |
| ---------------- | ------------------------- | -------------------------------------------------------------- |
| **Open Fee**     | When you open a position  | Varies by market                                               |
| **Close Fee**    | When you close a position | Varies by market                                               |
| **Price Impact** | Settles at close          | Dynamic, based on pool imbalance (can be positive or negative) |

### Holding Fees (per hour)

| Fee             | What It Is                                               |
| --------------- | -------------------------------------------------------- |
| **Funding Fee** | Paid between long and short traders based on market skew |
| **Borrow Fee**  | Paid to liquidity providers for borrowed capital         |

The **Net Rate** combines both into a single annualized percentage. Hover over the net rate in Market Info to see:

* **8-hour rate** — projected over 8 hours
* **24-hour rate** — projected daily rate
* **365-day rate** — projected annual rate (APR)
* **Hourly breakdown** — separate funding and borrow fee components

Your market orders include a configurable slippage tolerance — the maximum deviation you'll accept between the quoted price and actual execution:

* **Market orders:** execute within `Mark Price × (1 ± Slippage)`
* **Limit orders:** fill at your limit price or better — no slippage component
* **TP/SL orders:** trigger at your set price, then execute as a market close — the slippage setting doesn't apply

The default 0.5% tolerance balances execution certainty with price precision; increase it during volatile periods if your market orders are reverting. Price impact is separate: it isn't charged at open and settles into your PnL at close (see [Order Execution](/hertzflow-docs/trade-on-hertzflow/order-execution.md)).

### Network Fee (BSC Chain gas fee, NOT charged by HertzFlow)

This is the general blockchain gas fee paid to miners or validators, NOT HertzFlow, and does not impact your collateral.

Opening a position is a **two-step, on-chain process**:

1. **You submit** — you sign a transaction that places your order on-chain.
2. **The Keeper executes** — once conditions are met, the Keeper sends a second transaction that fills your order.

Because there are two transactions, there are **two separate fees**. People often blend them into one "the fee is expensive," so here's the difference:

<table data-header-hidden><thead><tr><th width="173.58203125"></th><th></th><th></th></tr></thead><tbody><tr><td></td><td><strong>Gas Fee</strong> (Network Fee)</td><td><strong>Execution Fee</strong></td></tr><tr><td>What it is</td><td>The network fee to put your order on-chain</td><td>Prepaid to the Keeper to submit and run the 2nd transaction</td></tr><tr><td>When it's charged</td><td>Step 1 — on submission</td><td>Step 2 — on successful execution</td></tr><tr><td>Who it goes to</td><td>BSC validators</td><td>The Keeper</td></tr><tr><td>Who sets it</td><td><strong>You</strong>, in your wallet (gas price × gas used)</td><td><strong>We estimate it</strong>, from the current on-chain average</td></tr><tr><td>Refunded if it fails?</td><td><strong>No</strong> — a failed transaction still burns gas (an EVM rule)</td><td><strong>Yes</strong> — too little fails the order; any excess is returned</td></tr></tbody></table>

**In one line:**&#x47;as goes to the chain, is set by your wallet, and is not refunded if a transaction fails. The Execution Fee goes to the Keeper, is estimated by us, and works on a **refund-the-excess, top-up-if-short** basis.

In **Order Details**, **Max Network Fee** is the cap we reserve for Keeper execution (it includes a **gas buffer which can be adjusted in settings**). Whatever isn't used is returned to you after execution — that's the **Estimated Fee Refund** line in your fee breakdown.

{% hint style="info" %}
**A common question asked: Why is my gas so high — or why did my order fail?**

To answer, let's look at a real example: a user paid about **$0.23** in gas on a single action, while the chain average was about **$0.05**.

**The cause:** they set a **very high gas price** in their wallet. BSC's average is around **0.05 gwei**, but they set **0.11 gwei** (sometimes higher). This is common among snipers and new-listing hunters who assume higher gas = faster and safer.

**Why it can fail:** when we create your order, we **prepay an Execution Fee** for the Keeper, estimated as:

**`on-chain average gas price × (1 + Network Fee Buffer)`**, where the default buffer = **180%**.

The rule is simple: As long as **`(your gas price ÷ chain average − 1) ≤ Network Fee Buffer`**, the prepaid Execution Fee is enough and your order goes through. If it exceeds the buffer, the prepay falls short and the order fails.

* **0.11 gwei** → 0.11 / 0.05 − 1 = **120%** < 180% → enough&#x20;
* **0.23 tier** → 0.23 / 0.05 − 1 = **360%** > 180% → not enough → fails&#x20;

**What to do:**

* BSC blocks are very fast. **0.05–0.11 gwei is already fast enough** — setting it higher won't make you faster, but it can exceed the default buffer, leave the prepaid Execution Fee short, and cause your order to fail.
* If you genuinely need a very high wallet gas price (e.g. sniping new listings), **raise the Network Fee Buffer in the App** to match, so that **(gas price ÷ average − 1) ≤ Buffer** still holds.
  {% endhint %}

## Loss Rebate (Normal Mode Only)

If you open a Normal mode position on the **weaker side** of the open interest skew (e.g., going short when longs are dominant), you may qualify for a **Loss Rebate** — a partial reimbursement of your losses when you close.

### How It Works

* You qualify only when you open on the **weaker side** of the OI skew — and your order doesn't over-flip the imbalance to the other side. Eligibility is set when you **open** (and re-checked on each add).
* The rebate **accrues from your eligible collateral × the market's rebate factor** (a per-market rate, up to 20%) — it is **not** a percentage of your loss or your position size.
* Once accrued, the amount **does not change** if the skew rebalances while your position is open.
* It only pays out when you **close at a loss** — it offsets your loss up to the accrued amount, at most bringing you back to break-even (never into profit). Profitable closes receive no rebate. Any rebate is returned to your wallet at close.

### Rebate Factor

The rebate factor is configured **per market**, from 0% up to 20%. There are no live skew tiers to track: if you open on the weaker side (without over-flipping the imbalance), the market's factor applies to your eligible collateral.

**Example:** A market's rebate factor is 20%. You open a short on ETH with **$100 collateral** while shorts are the weaker side, so you accrue a rebate of `$100 × 20% = $20`. If you later close **at a loss**, up to $20 is refunded — a $500 loss becomes -$480; a $12 loss becomes $0 (the refund never exceeds your loss). Close in profit and you receive nothing.

{% hint style="info" %}
Loss Rebate is **not available** in Hyper Lev mode. It only applies to Normal mode positions that open on the weaker side of OI skew.
{% endhint %}

***

## Liquidation

Your position is automatically liquidated when the mark price reaches your liquidation price, preventing your account from going negative.

### Liquidation Price

Your liquidation price depends on your leverage, accrued fees, and the market's maintenance margin requirement.

**Example:** You open a 100x ETH long at $2,000 with $100 collateral ($10,000 position). Your liquidation price is approximately $1,982 — just \~0.9% below entry. At 10x leverage with the same entry, your liquidation price drops to approximately $1,810 — giving you significantly more room.

### What Happens When You're Liquidated

1. Your position closes automatically at market price
2. Remaining collateral (if any) returns to your wallet
3. A liquidation fee of **20 bps (0.20%)** of position size is charged
4. Any active TP/SL orders on the position are canceled

{% hint style="warning" %}
Monitor your liquidation price closely, especially with leverage above 50x. Consider adding collateral or setting a stop loss before your position gets too close to liquidation.
{% endhint %}

***

## Automatic Deleveraging (ADL)

ADL is a protocol safeguard that activates when aggregate trader unrealized profits become too large relative to pool AUM, threatening LP solvency.

### How ADL Works

| Parameter                                | Threshold       |
| ---------------------------------------- | --------------- |
| **Trader max profit (relative to pool)** | 90% of pool AUM |
| **ADL trigger**                          | 85% of pool AUM |
| **ADL completion floor**                 | 77% of pool AUM |

When total unrealized profits on one side (long or short) exceed 85% of pool AUM, the protocol automatically reduces the most profitable positions until aggregate unrealized PnL drops to 77%.

### What Happens During ADL

1. The protocol identifies the most profitable open positions on the affected side
2. Those positions are partially or fully closed at current mark price
3. Realized PnL is settled to the affected traders' wallets
4. The process continues until total unrealized PnL falls below the 77% floor

{% hint style="warning" %}
ADL is rare and only occurs during extreme directional moves. If your position is affected, you receive your realized PnL — no penalty is applied, but your position size is reduced without your action.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hertzflow.gitbook.io/hertzflow-docs/trade-on-hertzflow/position-management.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
