# Platform Specifications

This section outlines Stella Trade's trading features, covering supported order types, collateral requirements, margin modes, leverage limits, and funding mechanisms.

### Order Types

Stella Trade provides users with straightforward order mechanisms focused on ensuring efficient order fulfillment and liquidity access. The supported order types include:

* Limit Orders\
  Market-fill orders that execute upon reaching a specified trigger price. This setup allows users to set price conditions for triggering trades.
* Market Orders\
  Traditional “taker” orders are executed against available liquidity from market makers. These orders are filled immediately at the best available price.

### Collateral Types

Stella Trade exclusively supports USDC as collateral for all positions. Users should be able to seamlessly swap into USDC through native DEX routing provided on the platform, allowing easy integration of multiple asset types with consistent margin and settlement.

### Margin Modes

Both traders and market makers utilize a cross-margin system, where all open positions within an account share the same margin pool. Cross-margining accounts for the combined unrealized PnL of all positions when determining liquidation thresholds.

<br>

This configuration improves capital efficiency and simplifies risk management:

* Trader’s Account Health: Determined by the initial margin and the cumulative unrealized PnL of all active positions in the sub-account.
* Market Maker Position Monitoring: Handled via an internal platform engine that ensures margin adequacy for active trades.\ <br>

Users can create multiple sub-accounts, each maintaining its own isolated margin, ensuring that positions and risks are confined within that specific sub-account and unaffected by others.

### Leverage Allowance

Stella Trade supports leverage to enhance capital efficiency and user experience:

* Traders: Up to 100x leverage, depending on the asset pair.
* Market Makers: Leverage aligned with Binance’s limits for equivalent assets. Non-standard pairs are subject to protocol-defined limits.

### Funding Rate Mechanism

Funding fees are applied periodically to ensure alignment between contract prices and the underlying index. The key funding rate settings and calculations are as follows:

* Funding Interval: Every 8 hours.
* Payment Timing: Applied automatically at each funding interval.
* Fixed Interest Rate: 0.01% (1 basis point), aligned with industry standards like Binance Futures.

#### Funding Rate Formula

The funding rate is calculated based on the following formula:

This formula includes a clamp function that limits the effective funding rate within a predetermined range to prevent excessive fluctuations.

```
FundingRate = clamp(AveragePI + clamp(InterestRate - averagePI, -clampValue, -floor, cap)
```

#### Premium Index

The Premium Index represents the discrepancy between Stella Trade’s internal trading prices and the reference Index Price from external markets. It is calculated using the difference between the Impact Bid/Ask Prices (average execution prices within Stella Trade) and the Index Price. This index helps to determine the relative premium or discount at which the asset is traded on Stella Trade, forming a critical part of the funding rate calculation.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXddzMbb3Z4CIKwllNtfRmYzepefUSkIj1WW306t5ffP_pY12lW6_OTO8x8pHEtdqPUY-1CXU43kObGrCCRZTKBgbXDWOiHX5W9YJe7mbAmSH63LAceg97B03hY78d066iqC5b9dSQ?key=nww_aAPHyctpyJKaG2bvKw" alt=""><figcaption></figcaption></figure>

Sampled every interval and averaged over an hour, this index ensures a fair and balanced funding rate by smoothing out short-term price variations and preventing exploitation from minor price fluctuations.

#### Maximum Range

| Type  | Value |
| ----- | ----- |
| Floor | -2%   |
| Cap   | +2%   |

\| Note: The funding rate range applies to all supported trading asset pairs, regardless of the maximum leverage.

#### Payment Mechanism

Funding payments are deducted from the margin balance at each interval:

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeXNbLvoL9T-TnmLXAHVoSX43QQgNt4VRUU2Mv4myC8IM9mCS_CUxWsPRAb_t2XY6odDWoBgDBwNLRR8TmTf0BSGwgGApWcWc16VND5fbvDC5R-5uSNkH2js3Y8mSISsOvb5P_I?key=nww_aAPHyctpyJKaG2bvKw" alt=""><figcaption></figcaption></figure>

<br>


---

# 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.stellaxyz.io/stella-doc/platform-specifications.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.
