> For the complete documentation index, see [llms.txt](https://docs.symm.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.symm.io/contract-documentation/symmio-options-v0.2.1/facets/force-actions-facet.md).

# Force Actions Facet

## Force Actions Facet (Options 0.2.1)

The **Force Actions Facet** serves as the safety net for traders dealing with an unresponsive counterparty. If PartyB goes silent due to any reason — a PartyA's funds could be locked indefinitely in a pending state. This aims to prevent that from happening by giving PartyA a way to unilaterally cancel stuck intents after a protocol-defined timeout has passed.

There are no role restrictions here. Any non-paused party can call these functions, as long as the relevant timeouts have elapsed.

> **Key Concepts:**
>
> * **Open Intent:** A request from PartyA to open a position that has been locked (matched to a PartyB) but not yet filled. If PartyB doesn't fill it within the required window, PartyA can force-cancel it.
> * **Close Intent:** A request from PartyA to close an existing position that PartyB has locked but not yet settled. If PartyB stalls on the close, PartyA can force-cancel it and the position remains open.
> * **Force Cancel Timeouts:** Two separate timeouts govern when force actions become available — `forceCancelOpenIntentTimeout` for open intents and `forceCancelCloseIntentTimeout` for close intents. Both are configured via the Control Facet.
> * **Non-Destructive on Close:** Force-cancelling a close intent does not close the position — it simply cancels the pending close request, returning the position to an open state so PartyA can try again or proceed differently.

***

#### forceCancelOpenIntent()

Force-cancels an open intent that has been locked by a PartyB but not filled within the required timeout window. Calling this returns the intent to a cancelled state and releases any collateral that was locked against it.

**Function Signature:**

```solidity
function forceCancelOpenIntent(
    uint256 intentId
) external whenPartyNotPaused(msg.sender);
```

**Parameters:**

* **intentId:** The unique identifier of the open intent to force-cancel.

**Example Usage:**

```solidity
// Example: PartyA force-cancels a stuck open intent after the timeout
uint256 stuckIntentId = 42;
diamond.forceCancelOpenIntent(stuckIntentId);
```

***

#### forceCancelCloseIntent()

Force-cancels a close intent that has been locked by a PartyB but not settled within the required timeout. This does **not** close the position — it cancels the pending close request and leaves the position open, giving PartyA the ability to submit a new close request.

**Function Signature:**

```solidity
function forceCancelCloseIntent(
    uint256 intentId
) external whenPartyNotPaused(msg.sender);
```

**Parameters:**

* **intentId:** The unique identifier of the close intent to force-cancel.

**Example Usage:**

```solidity
// Example: PartyA force-cancels a stuck close intent after the timeout
uint256 stuckIntentId = 87;
diamond.forceCancelCloseIntent(stuckIntentId);
```

**Internal Logic:**

1. `LibForceActions.forceCancelCloseIntent()` checks that enough time has passed since the close intent was locked, using `forceCancelCloseIntentTimeout`. Reverts if called too early.
2. The library confirms the caller is the PartyA of the relevant trade.
3. The close intent is cancelled. The underlying position reverts to its open state — the trade itself is untouched.

* **Event:** Emits `ForceCancelCloseIntent` with the intent ID.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.symm.io/contract-documentation/symmio-options-v0.2.1/facets/force-actions-facet.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
