> 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/wrap.md).

# Wrap

The user sends XMR. The LP supplies XMRn. A witness checks the payment.

| Status            | Who acts                        | Action and asset movement                                                                          |
| ----------------- | ------------------------------- | -------------------------------------------------------------------------------------------------- |
| Intended          | User / orderer                  | requestWrap holds LP liquidity and the witness fee. The user sends XMR, then commits and reveals.  |
| Filled            | Witness                         | Check the disclosed proof, destination, amount and confirmations. Attest success or fail.          |
| Witnessed Success | Wrap LP, if harmed              | XMRn goes to the recipient. The LP can dispute an incorrect success result during the hold period. |
| Witnessed Fail    | Orderer or recipient, if harmed | The LP liquidity is released. Either eligible party can dispute an incorrect failure result.       |
| Disputed          | Bridge contract owner           | Review evidence and resolve the dispute. The witness bond remains held.                            |
| Finalized         | No order action                 | The witness bond has been released or slashed.                                                     |
| Cancelled         | No order action                 | LP liquidity has been released. Cancellation does not reverse any XMR already sent.                |

There is no Open stage for a wrap. requestWrap creates an Intended order using the registered LP configuration.

Commit and reveal must finish by takerIntentTime + orderCancellationTime. Read the current parameter; do not hard-code a deadline.

Only the orderer can cancel within the cancellation window. After it ends, eligible order parties can cancel an Intended wrap.

A successful dispute slashes the held witness bond. For a failed wrap, principal compensation belongs to the intended XMRn recipient.

Read [Status reference](/noiho/architecture/order-lifecycle/order-status-reference.md), [Commit-reveal](/noiho/architecture/order-lifecycle/commit-reveal.md) and [Order party fields](/noiho/architecture/order-lifecycle/roles-in-an-order.md) for exact values and roles.
