> For the complete documentation index, see [llms.txt](https://docs.nondollar.life/autonomint/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nondollar.life/autonomint/blockchain-docs/core-contracts/options.md).

# 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.
