> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fairground.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# Error Selector Reference

> Decode on-chain revert reasons from their 4-byte hex.

On-chain contract calls can revert with a **4-byte error selector** (error signature). The table below maps each selector to a human-readable message.

| Signature    | Message                                                            |
| ------------ | ------------------------------------------------------------------ |
| `0x00eb943e` | Margin to extract exceeds PnL                                      |
| `0x01735734` | Cannot open opposite side order while position exists              |
| `0x0313b285` | Market already exists                                              |
| `0x0428f2af` | Position must be filled to reduce                                  |
| `0x0490d80a` | Invalid max IF fraction                                            |
| `0x05baf701` | Margin to reduce exceeds initial margin                            |
| `0x075d545b` | Margin cannot be zero                                              |
| `0x09ee12d5` | Not a contract                                                     |
| `0x0a62b8f3` | No position found                                                  |
| `0x0a8ed92c` | Denominator is zero                                                |
| `0x0ae3681c` | Cannot add selectors to zero address                               |
| `0x0db557d4` | Trade fee overflow                                                 |
| `0x0dc149f0` | Position already initialized                                       |
| `0x0dfa289a` | Invalid side                                                       |
| `0x0e7186fb` | Oracle data required                                               |
| `0x11d7116c` | Fill size exceeds open order position size                         |
| `0x1265b6c8` | Invalid shock factor                                               |
| `0x14abe8cd` | Executable queue size cannot be zero                               |
| `0x1602e9e9` | Invalid seizure threshold                                          |
| `0x16d402d1` | Only fully filled orders can be added to                           |
| `0x192105d7` | Initialization function reverted                                   |
| `0x1d351536` | Stale manual reduce order pointer                                  |
| `0x20cada95` | New position size is zero                                          |
| `0x21511763` | Batch array lengths must be equal                                  |
| `0x21c35dd1` | Reduce order does not belong to position                           |
| `0x23d88bc0` | No pending open order to release                                   |
| `0x25153723` | Stop loss order already exists                                     |
| `0x25e2f413` | Order must be pending or partially filled to cancel                |
| `0x2683d346` | Total reduce size exceeds available size                           |
| `0x29d842c0` | Only trader can cancel their order                                 |
| `0x2b870c24` | Maximum leverage must exceed minimum leverage                      |
| `0x321794aa` | Not protocol admin                                                 |
| `0x358d9d1a` | Cannot replace function with the same function from the same facet |
| `0x3728b83d` | Invalid amount                                                     |
| `0x37668688` | Native token not accepted                                          |
| `0x376ab111` | Array too large                                                    |
| `0x3789a26b` | Size is zero                                                       |
| `0x38be0951` | Notional value overflow                                            |
| `0x39060dc5` | Reduce order must be in terminal state                             |
| `0x396476ce` | Invalid stop loss or take profit prices                            |
| `0x3e43f616` | Margin to extract exceeds available margin                         |
| `0x3ee5aeb5` | Reentrancy guard reentrant call                                    |
| `0x43898c0a` | Duplicate order ID                                                 |
| `0x46361ddd` | Scale factor result overflow                                       |
| `0x48a4298b` | Not in matching session                                            |
| `0x4aeccc1b` | Lambda exceeds one                                                 |
| `0x4c3cbf04` | Not proposed protocol admin                                        |
| `0x4d2acfe8` | Trade size must be multiple of lot size                            |
| `0x4e23d035` | Index out of bounds                                                |
| `0x520300da` | Cannot replace immutable function                                  |
| `0x52313c09` | Insurance fund allocation overflow                                 |
| `0x5274afe7` | SafeERC20 operation failed                                         |
| `0x5416eb98` | Function not found                                                 |
| `0x581a7f65` | Net balance should be negative                                     |
| `0x59caa480` | Price threshold cannot be zero                                     |
| `0x5c86708f` | Margin operations not allowed on pending position                  |
| `0x5cddff42` | Cannot replace function that does not exist                        |
| `0x5ce28caf` | No position or pending order found for stop loss/take profit       |
| `0x5d706033` | Invalid order ID                                                   |
| `0x5dc35903` | Initial margin must be greater than zero                           |
| `0x60f8f321` | Eth not accepted                                                   |
| `0x6223f681` | Take profit price must be better than mark price                   |
| `0x651a6fee` | Position must be partially or fully filled                         |
| `0x66634bf7` | Facet call returned no data                                        |
| `0x69b1189f` | Only fully filled orders can be extracted                          |
| `0x6fafeb08` | Cannot remove immutable function                                   |
| `0x71303cf3` | Entitlement percentage exceeds BPS scale                           |
| `0x71ec6e28` | Position in liquidation                                            |
| `0x741df939` | Market is paused                                                   |
| `0x7451ecdf` | Pending orders on opposite side                                    |
| `0x76028bdf` | Reduce size exceeds available size                                 |
| `0x7a08a22d` | Cannot remove function that does not exist                         |
| `0x7b67157c` | Minimum leverage too low                                           |
| `0x7d92e766` | Order book is full                                                 |
| `0x7e86a579` | Maximum pending reduce orders exceeded                             |
| `0x7fe9a41e` | Incorrect facet cut action                                         |
| `0x806c8697` | Lot size cannot be zero                                            |
| `0x80e54607` | Market has open positions                                          |
| `0x82b42900` | Unauthorized                                                       |
| `0x84540995` | Facet has no code or has been destroyed                            |
| `0x8568428e` | Reduce size must be greater than zero                              |
| `0x85de96b8` | Invalid oracle price data                                          |
| `0x89af5fc3` | Invalid market ID hash                                             |
| `0x8d1665da` | Trader liquidation corrupted                                       |
| `0x919834b9` | No bytecode at address                                             |
| `0x91f63592` | Queue overflow                                                     |
| `0x93a4b908` | Reduce order size exceeds open order position size                 |
| `0x94280d62` | Invalid ERC20 spender                                              |
| `0x96c6fd1e` | Invalid ERC20 sender                                               |
| `0x9dba39bc` | Revenue overflow                                                   |
| `0xa6429e9f` | Notional cannot be zero                                            |
| `0xab77128e` | Take profit order already exists                                   |
| `0xad6857d1` | Manual reduce order already exists                                 |
| `0xad9757f4` | Invalid stop loss price                                            |
| `0xaf31444f` | Open interest exists across markets                                |
| `0xb036286e` | Fill size exceeds remaining reduce order size                      |
| `0xb04f990b` | Market scale factor is zero                                        |
| `0xb0cfa447` | Market does not exist                                              |
| `0xb113638a` | Value does not exist                                               |
| `0xb1eecba4` | Matching oracle price mismatch                                     |
| `0xb3215542` | Margin extraction would exceed maximum leverage                    |
| `0xb419e811` | Trade size out of allowed range                                    |
| `0xb50b6422` | Merged position would be underwater                                |
| `0xb61fbe34` | Position scale factor snapshot is zero                             |
| `0xb6c49a15` | Open interest is zero                                              |
| `0xb6f63d65` | Empty name not allowed                                             |
| `0xbb33e6ac` | Value already exists                                               |
| `0xbe543a82` | Only trader can reduce their order                                 |
| `0xbf36e93f` | Market IF fraction too high                                        |
| `0xc541a95b` | Open order has zero size, cannot reduce                            |
| `0xc8444e18` | Insurance fund has existing position                               |
| `0xcb64ae8d` | Leverage must be whole number                                      |
| `0xcbd5b1d2` | Margin to add must be greater than zero                            |
| `0xcc6595f7` | Invalid ADL threshold                                              |
| `0xccd52fbc` | Pointer out of bounds                                              |
| `0xcd98a96f` | Cannot replace functions from facet with zero address              |
| `0xcf4ce7bc` | Invalid take profit price                                          |
| `0xd060c572` | Open order must be partially or fully filled                       |
| `0xd091bc81` | Remove facet address must be zero address                          |
| `0xd36d8965` | Order not found                                                    |
| `0xd8eadcb5` | Only trader can update their order                                 |
| `0xd92e233d` | Zero address not allowed                                           |
| `0xda177f42` | Leverage exceeds max allowed                                       |
| `0xda5f1a6a` | Leverage out of allowed range                                      |
| `0xe1140add` | Filled size overflow                                               |
| `0xe450d38c` | Insufficient ERC20 balance                                         |
| `0xe570110f` | SafeERC20 failed to decrease allowance                             |
| `0xe602df05` | Invalid ERC20 approver                                             |
| `0xe672ee91` | Fill size must be greater than zero                                |
| `0xe6e66ac8` | Order must be pending to update                                    |
| `0xe73ffde8` | Position must be decreased                                         |
| `0xe767f91f` | No selectors provided for facet for cut                            |
| `0xe7d507dc` | Invalid max size                                                   |
| `0xeb4f513d` | Shock percentage is too high                                       |
| `0xeb6ba048` | No selectors given to add                                          |
| `0xebb8ab27` | Position must be increased                                         |
| `0xebbf5d07` | Cannot add function to diamond that already exists                 |
| `0xec442f05` | Invalid ERC20 receiver                                             |
| `0xed0cfdf0` | Stop loss price must be worse than mark price                      |
| `0xed732d0c` | Tree is full                                                       |
| `0xefac47f8` | Market name cannot be updated                                      |
| `0xf4d678b8` | Insufficient balance                                               |
| `0xf4dcf37e` | Invalid maintenance margin ratio                                   |
| `0xf5c787f1` | Price overflow                                                     |
| `0xf9b42874` | Price oracle not set                                               |
| `0xfab43128` | Liquidation order not in queue                                     |
| `0xfb3ab2be` | Opposite side open interest is zero                                |
| `0xfb57fb37` | Margin addition would overflow                                     |
| `0xfb8f41b2` | Insufficient ERC20 allowance                                       |
| `0xff4127cb` | Not contract owner                                                 |
