# Clear

Clearing a piggy is the first step in the settlement process of a piggy, in which the price of the underlying is retrieved and saved into the piggy. This step is needed before the piggy can be "settled". Settling the piggy is the step where the payout is calculated and distributed. Clearing, then, is the prior step of capturing the clearing price. Because the blockchain is a user-initiated, push technology, a user or other agent initiates actions which change the state of the data on the blockchain. With this view, SmartPiggies requires a two step process for clearing a piggy, and therefore retrieving the price which is used to determine the payout.

There are a few condition in which a user can "clear" a piggy:

* American Style - holder can clear at any point
* American Style (matured) - anyone can clear
* European Style - anyone can clear only post maturity&#x20;

For example, if a user owns an American style piggy, she can clear the piggy whenever it is to her advantage, pre or post expiry. If she can secure a payout by requesting the price of the underlying before the piggy expires, she may do so. Prior to expiry, the price retrieved and delivered by the oracle is stored within the piggy, and that price is used to calculate the payout. **This is a one time action and cannot be undone.** If the price continues to move in the owner's favor, another oracle call (via clearing the piggy) will fail. The clearing price is locked at this point. If for any reason the returned price is unacceptable (do to a garbage value or otherwise corrupted data returned from the oracle) the **arbitration** process is available to reconcile a breakdown in the natural process of settling a piggy.

To **Clear** a piggy click the "clear" button on the piggy:

![](/files/-McG8juEnWNRranIpsWQ)

Once a "clear" transaction has been processed, and the price returned from the oracle is saved in the piggy, the **Settle** step can be executed.

In traditional options markets, options are rarely executed. Although piggies can be settled via a third-party oracle, and all execution can be done without the need for the writer to participate in the settlement process, SmartPiggies would expect that clearing piggies is a rare practice, as selling a piggy back to the writer may be more advantageous among the counterparties. When the counterparties do not agree on some aspect of the settlement process, the oracle may be engaged to conclude the contract. But as this incurs extra costs, we would recommend piggies be sold back to the writers for payout when necessary, rather than settled via oracle execution.&#x20;

&#x20;


---

# 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.smartpiggies.com/lifecycle-of-a-piggy/clear.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.
