> For the complete documentation index, see [llms.txt](https://docs.reya.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.reya.xyz/trading/perpetual-futures.md).

# Perpetual Futures

Reya runs a central-limit order book for perpetual futures. Reya's matching engine matches orders off-chain, and every resulting trade is then validated and settled on-chain on Reya Network, which remains the source of truth for positions and balances. Collateral is held by Reya's smart contracts, not by an operator.

All positions in a margin account draw on one shared margin balance, and that balance includes unrealised PnL. Profits on one position can therefore support the margin of the others without being closed first.

For order types, fees and the trading API, see the [developer documentation](https://docs.reya.xyz/developers).

### Perpetual Futures <a href="#perpetual-futures" id="perpetual-futures"></a>

Perpetual futures are derivatives contracts where traders can have a PnL matching that of a given token without actually buying that token. For example, a trader that holding a long position for a unit of ETH will have the same PnL that they would have if they actually held one unit of ETH: when the ETH price goes up from 3,000rUSD to 3,100rUSD they will earn 100rUSD; on the other hand, if the price goes down to 2,900rUSD, they will have to pay 100rUSD. These amounts are interchanges with accounts holding short positions, in other words, traders that earn when the price goes down and vice versa.

Additionally to the PnL from price variations, longs and shorts will also interchange a funding rate. This funding rate is used to incentivize balancing of long and short open interest, and to keep the perpetual futures in line with the spot market.

When a trader enters a perpetual futures contract, they need to deposit collateral to ensure that they will be able to cover losses that they suffer in their positions. Reya's smart contracts enforce these collateral requirements through the [margin system](/trading/margin-system.md), account for PnL and funding, and resolve accounts whose balance becomes insufficient through the [liquidation engine](/trading/liquidation-engine.md).
