> For the complete documentation index, see [llms.txt](https://gitbook.hashpower.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.hashpower.io/02.contract-specifications.md).

# Contract Specifications

This document describes the technical specifications and parameters of HPDX Hashprice Futures contracts. Current values can be found in the Contract Specs section of the [HPDX Futures application](https://hashpower.exchange/futures).

***

## Understanding Contract Specifications

These are the key values that define how each futures contract works. You'll see these values displayed in the trading interface.

### Contract Specifications

| Parameter              | What It Means                                                                                                                                                            |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Contract Unit**      | The amount of hashrate each contract represents (measured in hashes per second).                                                                                         |
| **Margin Requirement** | The percentage of contract value you must deposit as collateral. This protects both parties if prices move against you. Higher requirements mean more capital locked up. |
| **Maturity Time**      | The time at which the contract matures and becomes settleable. Stored on-chain as `deliveryAt`.                                                                          |

### Contract frequency

| Parameter                 | What It Means                                                                                                 |
| ------------------------- | ------------------------------------------------------------------------------------------------------------- |
| **Available Expirations** | How far into the future you can trade. For example, if set to 4 contracts, you can trade up to 4 weeks ahead. |
| **Expiration Interval**   | Interval between two closest delivery dates in days.                                                          |

### Pricing & Settlement

| Parameter               | What It Means                                                                                                                                               |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Settlement Currency** | The currency used for all payments (e.g., USDC). This is what you deposit as margin and receive during settlement.                                          |
| **Tick Size**           | The smallest price movement allowed. Orders must be placed at prices that are multiples of this step (e.g., if the step is $0.01, you cant bid at $0.015)   |
| **Tick Value**          | The value of a one-tick move for a single contract.                                                                                                         |
| **Contract Duration**   | The notional multiplier in days (`deliveryDurationDays`). Notional = price-per-day × duration; at maturity the full notional is marked to the oracle price. |

### Fees & Limits

| Parameter           | What It Means                                                                                           |
| ------------------- | ------------------------------------------------------------------------------------------------------- |
| **Order Fee**       | A small fee charged by marketplace when you place an order.                                             |
| **Max Open Orders** | The maximum number of orders you can have open at once (typically 100). This is a temporary limitation. |

***

## Settlement Functions, Events & Errors

As of contract version `2.15.0`, futures are **cash-settled** at maturity. The table below summarizes the settlement-related surface. See [Settlement](/05.delivery-settlement.md) for the full lifecycle.

### Functions

| Function                         | Status | What It Does                                                                                                                                                                                                                                           |
| -------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `settlePosition(bytes32)`        | Active | Permissionless. Once `block.timestamp >= deliveryAt`, pins the expiration's settlement price (first call), marks the full notional to that pinned price, routes PnL via the insurance fund, removes the position, and emits `LotClosed(..., SETTLED)`. |
| `settlePositions(bytes32[])`     | Active | Batch variant of `settlePosition`; reverts atomically if any id is unknown or not yet matured.                                                                                                                                                         |
| `recordSettlementPrice(uint256)` | Active | Permissionless. At/after `deliveryAt`, pins the expiration's settlement price (= `getMarketPrice()`) without settling any position; idempotent once set; emits `SettlementPriceRecorded`.                                                              |
| `settlementPrice(uint256)`       | Active | Mapping getter: the pinned per-day settlement price for an expiration (`0` until recorded).                                                                                                                                                            |
| `getMarketPrice()`               | Active | Returns the oracle mark price (per-day) used for pinning settlement and for margin.                                                                                                                                                                    |

### Events

| Event                                              | Status | Meaning                                                                                                           |
| -------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------- |
| `LotClosed(..., reason=SETTLED)`                   | Active | A matured position was cash-settled. `SETTLED` is `LotCloseReason` ordinal `3`.                                   |
| `SettlementPriceRecorded(uint256,uint256,address)` | Active | An expiration's settlement price was pinned (once per `deliveryAt`). Carries `deliveryAt`, `price`, `recordedBy`. |

### Errors

`settlePosition` reverts with `PositionNotExists()` (unknown id) or `PositionDeliveryNotStartedYet()` (called before `deliveryAt`). `recordSettlementPrice` reverts with `SettlementDateNotReached()` if called before `deliveryAt`.

***

## Read next

* [Margin System](/03.margin-system.md) - How collateral and liquidation work
* [Trading Guide](/04.trading-guide.md) - Creating and managing orders
* [Settlement](/05.delivery-settlement.md) - Cash settlement of positions at maturity
