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

# Unwrap

The user supplies XMRn. An LP sends XMR and proves payment.

| Status            | Who acts              | Action and asset movement                                                            |
| ----------------- | --------------------- | ------------------------------------------------------------------------------------ |
| Open              | LP or user            | requestUnwrap holds the user's XMRn. An LP can take the order; the user can cancel.  |
| Intended          | Unwrap LP / taker     | submitUnwrapIntent pays the witness fee. The LP sends XMR, then commits and reveals. |
| Filled            | Witness               | Check the disclosed payment proof and attest success or fail.                        |
| Witnessed Success | User, if harmed       | XMRn goes to the LP. The user can dispute an incorrect success result.               |
| Witnessed Fail    | Unwrap LP, if harmed  | XMRn returns to the user. The LP can dispute an incorrect failure result.            |
| Disputed          | Bridge contract owner | Review evidence and resolve the dispute.                                             |
| Finalized         | No order action       | The witness bond has been released or slashed.                                       |
| Cancelled         | No order action       | The user's held XMRn has been returned.                                              |

Commit and reveal must finish by takerIntentTime + intentCancellationTime. Read the current parameter before taking an order.

Only the LP can remove its intent within that window. After it ends, the user can also remove it.

1. Call removeUnwrapIntent when eligible. This reopens the order and awards the paid witness fee to the user.
2. Re-read the order. The user then calls cancel while it is Open to recover the held XMRn.

These are two separate transactions. Removing the intent does not cancel the order. Another LP can take the reopened order.

Read [Status reference](/noiho/architecture/order-lifecycle/order-status-reference.md) and [Commit-reveal](/noiho/architecture/order-lifecycle/commit-reveal.md) for exact values and proof requirements.
