> For the complete documentation index, see [llms.txt](https://noiho.gitbook.io/noiho/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://noiho.gitbook.io/noiho/architecture/order-lifecycle/order-status-reference.md).

# Status and action matrix

Every status, when it is entered, and who may act next.

| Value | Status               | Entered when                                     | Allowed next actor/action                                                                                                   |
| ----- | -------------------- | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- |
| 0     | Uninitiated          | No real order occupies the slot                  | None                                                                                                                        |
| 1     | Open                 | An unwrap user escrows XMRn                      | LP: submitUnwrapIntent; user: cancel                                                                                        |
| 2     | Intended             | A wrap is created, or an LP takes an unwrap      | Fulfiller: commitFulfillment then fulfillWrap/fulfillUnwrap; eligible party: cancel or remove intent under the timing rules |
| 3     | Filled               | The commitment is revealed with Monero proof     | Active witness: witnessOrder                                                                                                |
| 4     | Witnessed Success    | A witness confirms payment                       | The harmed maker may dispute; witness or owner may release after the hold period                                            |
| 5     | Witnessed Fail       | A witness rejects payment                        | Wrap orderer/recipient or unwrap LP may dispute; witness or owner may release after the hold period                         |
| 6     | Finalized            | The hold period expires and bond is released     | Terminal                                                                                                                    |
| 7     | Disputed             | An eligible party posts a dispute bond           | Owner: resolveDispute                                                                                                       |
| 8     | Finalized (Witness)  | Owner resolves that the witness was not at fault | Terminal                                                                                                                    |
| 9     | Finalized (Disputer) | Owner resolves that the witness was at fault     | Terminal; witness bond is slashed                                                                                           |
| 10    | Cancelled            | An eligible cancellation succeeds                | Terminal                                                                                                                    |
| 11    | Error                | Reserved exceptional state                       | Operator investigation                                                                                                      |

> **Note: Disputes may require an XMRn bond**
>
> Read disputeBondThreshold before calling dispute. When amountXMRn is above it, approve the diamond to pull 10% of amountXMRn. The bond goes to the witness if the witness is cleared, or comes back with the slash proceeds if the witness is at fault.
