# Options

## Read Functions

### [calculateStrikePriceGains](/autonomint/blockchain-docs/core-logics/options-logics.md#strike-price-gains-calculation)

```solidity
function calculateStrikePriceGains(
    uint128 depositedAmount,
    uint128 strikePrice,
    uint64 ethPrice )
```

| Param Name      | Type    | Description                         |
| --------------- | ------- | ----------------------------------- |
| depositedAmount | uint128 | Deposited collateral amount.        |
| strikePrice     | uint128 | Strike price chosen during deposit. |
| ethPrice        | uint64  | Current collateral price.           |

If the strike price smaller or equal to the current deposited amount value, then the user will get gains, else the gains is zero.

### [calculateOptionPrice](/autonomint/blockchain-docs/core-logics/options-logics.md#option-fees-calculation)

```solidity
function calculateOptionPrice(
    uint128 _ethPrice,
    uint256 _ethVolatility,
    uint256 _amount,
    StrikePrice _strikePrice )
```

| Param Name      | Type             | Description                             |
| --------------- | ---------------- | --------------------------------------- |
| \_ethPrice      | uint128          | Current ETH price.                      |
| \_ethVolatility | uint256          | ETH volatility.                         |
| \_amount        | uint256          | The borrower's depositing amount.       |
| \_strikePrice   | enum StrikePrice | Strike price percent chose by borrower. |

Returns the options fees to deduct from borrower based on strike price chose, ETH volatility, total CDS deposited amount, total collateral locked in treasury.


---

# 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.nondollar.life/autonomint/blockchain-docs/core-contracts/options.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.
