> For the complete documentation index, see [llms.txt](https://dev.bondprotocol.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.bondprotocol.finance/smart-contracts/option-system/options-liquidity-mining-olm/oracle-strike-olm.md).

# Oracle Strike OLM

[Git Source](https://github.com/Bond-Protocol/option-contracts/blob/master/src/fixed-strike/liquidity-mining/OLM.sol)

**Inherits:** [OLM](/smart-contracts/option-system/options-liquidity-mining-olm.md)

*The Oracle Strike OLM contract uses an oracle to determine the fixed strike price when a new option token is created on epoch transition. This should not be confused with Oracle Strike Option Tokens, whose strike price changes dynamically based on the oracle price.*

### State Variables

#### oracle

Oracle contract used to get a current strike price when creating a new option token

```solidity
IBondOracle public oracle;
```

#### oracleDiscount

Discount to the oracle price used to set the strike price when creating a new option token

```solidity
uint48 public oracleDiscount;
```

#### ONE\_HUNDRED\_PERCENT

```solidity
uint48 internal constant ONE_HUNDRED_PERCENT = 1e5;
```

#### minStrikePrice

Minimum strike price that can be set when creating a new option token, in number of quote tokens per payout token

```solidity
uint256 public minStrikePrice;
```

### Functions

#### \_initialize

Internal function, not callable directly. Called within `initialize` to implement Oracle Strike OLM specific initialization logic.

```solidity
function _initialize(bytes calldata params_) internal override;
```

**Parameters**

| Name              | Type          | Description                                                                                                                   |
| ----------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `oracle_`         | `IBondOracle` | ABI-encoded bytes containing the oracle, oracle discount, and minimum strike price                                            |
| `oracleDiscount_` | `uint48`      | Percent discount from oracle price to use for strike price, with 3 decimal places. i.e. `1e3 = 1000 = 1%`                     |
| `minStrikePrice_` | `uint256`     | Minimum strike price allowed to be used by the OLM. Provides a floor price in case of large market declines or oracle issues. |

**The parameters for this function are ABI-encoded into a** `bytes` **object and passed as the** `other_`**variable into the top-level OLM** `initialize` **function. For example:**

```solidity
bytes memory other = abi.encode(oracle, oracleDiscount, minStrikePrice);
```

#### nextStrikePrice

Returns the strike price that would be used if a new epoch started right now

```solidity
function nextStrikePrice() public view override returns (uint256);
```

#### setOracle

Set the oracle contract

Only owner

```solidity
function setOracle(IBondOracle oracle_) external onlyOwner requireInitialized;
```

**Parameters**

| Name      | Type          | Description                                                                         |
| --------- | ------------- | ----------------------------------------------------------------------------------- |
| `oracle_` | `IBondOracle` | Oracle contract used to get a current strike price when creating a new option token |

#### setOracleDiscount

Set the oracle discount

Only owner

```solidity
function setOracleDiscount(uint48 oracleDiscount_) external onlyOwner requireInitialized;
```

**Parameters**

| Name              | Type     | Description                                                                                |
| ----------------- | -------- | ------------------------------------------------------------------------------------------ |
| `oracleDiscount_` | `uint48` | Discount to the oracle price used to set the strike price when creating a new option token |

#### setMinStrikePrice

Set the minimum strike price

Only owner

```solidity
function setMinStrikePrice(uint256 minStrikePrice_) external onlyOwner requireInitialized;
```

**Parameters**

| Name              | Type      | Description                                                                                                       |
| ----------------- | --------- | ----------------------------------------------------------------------------------------------------------------- |
| `minStrikePrice_` | `uint256` | Minimum strike price that can be set when creating a new option token, in number of quote tokens per payout token |

#### setQuoteToken

Set the quote token that is used for the option tokens

```solidity
function setQuoteToken(ERC20 quoteToken_) external override onlyOwner requireInitialized;
```

**Parameters**

| Name          | Type    | Description                                                           |
| ------------- | ------- | --------------------------------------------------------------------- |
| `quoteToken_` | `ERC20` | Token that stakers must pay to exercise the call options they receive |


---

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

```
GET https://dev.bondprotocol.finance/smart-contracts/option-system/options-liquidity-mining-olm/oracle-strike-olm.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.
