# Settle and Close Position

Settling (redeeming expired ITM options) or closing a position (selling back to the AMM) is executed differently on each protocol and the smart contracts are built in a different way. Grix uses a [<mark style="color:purple;">library of adapters</mark>](https://docs.grix.finance/grix/for-developers/adapters) to integrate with each protocol and to give the user a great experience of managing their options portfolio in one place. It is important to remember that Grix is not responsible for the pricing differences or security of each DeFi options protocol it integrates with.

#### Settle Position:

Settling and exercising an ITM option works as follows:

1. Once the option is able to be exercised (depending on the type of option and the exercise date), the “Exercise” option on the Portfolio Management page is clickable.
2. When utilizing the Exercise button, the Grix UI is simply calling the exercise function (each protocol might have a slightly different name) from the protocol’s smart contract.
3. The relevant fees are deducted and funds move straight from the option’s writing protocol to the user. Grix is only acting as a web3 interface between the protocol’s smart contract and the user.

#### Close Position:

Selling an open position back to the protocol's pool/AMM (not as a limit sell order) works as follows:

1. Once the option is purchased and held by the user, most protocols enable market sell back to the options AMM. The “Sell” option on the Portfolio Management page appears as soon as the option is in the connected wallet.
2. When utilizing the Sell button, the Grix UI is simply calling the sell function (each protocol might have a slightly different name) from the protocol’s smart contract.
3. The relevant fees are deducted and funds move straight from the option’s writing protocol to the user. Grix is only acting as a web3 interface between the protocol’s smart contract and the user.


---

# Agent Instructions: 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:

```
GET https://docs.grix.finance/grix/grix-protocol/grix-trading/settle-and-close-position.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
