# OLM Factories

### Introduction

The OLM Factory contracts allows anyone to deploy new[ OLM ](/smart-contracts/option-system/options-liquidity-mining-olm.md)contracts without compiling and deploying them manually. When deployed, the owner of the OLM is set to the caller.&#x20;

There are two factories for the two OLM implementations: Manual Strike ([MOLMFactory](#molmfactory)) and Oracle Strike ([OOLMFactory](#oolmfactory)).

* Manual Strike: Owners must manually update the strike price to change it over time.
* Oracle Strike: Strike price is automatically updated based on an oracle and discount. A minimum strike price can be set on the Oracle Strike version to prevent it from going too low.&#x20;

### Deployment

Setting up an OLM requires three steps.

1. Deploy an OLM contract from a factory.
2. Fund the OLM contract with `payoutTokens` to pay rewards with (via a simple ERC20 transfer). Owners must monitor the balance of `payoutTokens` in the contract to ensure that users can claim their rewards.&#x20;
3. [Initialize](/smart-contracts/option-system/options-liquidity-mining-olm.md) the OLM contract, including inputting the remaining options and staking parameters.

Step one of this process is accomplished by interacting with one of these factory contracts.

## MOLMFactory

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

Factory for deploying Manual Strike OLM contracts

### State Variables

#### optionTeller

Option Teller to be used by OLM contracts

```solidity
IFixedStrikeOptionTeller public immutable optionTeller;
```

### Functions

#### deploy

Deploy a new Manual Strike OLM contract with the caller as the owner

```solidity
function deploy(ERC20 stakedToken_, ERC20 payoutToken_) external returns (ManualStrikeOLM);
```

**Parameters**

| Name           | Type    | Description                                            |
| -------------- | ------- | ------------------------------------------------------ |
| `stakedToken_` | `ERC20` | ERC20 token that will be staked to earn rewards        |
| `payoutToken_` | `ERC20` | ERC20 token that stakers will receive call options for |

**Returns**

| Name   | Type              | Description                     |
| ------ | ----------------- | ------------------------------- |
| `molm` | `ManualStrikeOLM` | Address of the new OLM contract |

## OOLMFactory

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

Factory for deploying Oracle Strike OLM contracts

### State Variables

#### optionTeller

Option Teller to be used by OLM contracts

```solidity
IFixedStrikeOptionTeller public immutable optionTeller;
```

### Functions

#### deploy

Deploy a new Oracle Strike OLM contract with the caller as the owner

```solidity
function deploy(ERC20 stakedToken_, ERC20 payoutToken_) external returns (OracleStrikeOLM);
```

**Parameters**

| Name           | Type    | Description                                            |
| -------------- | ------- | ------------------------------------------------------ |
| `stakedToken_` | `ERC20` | ERC20 token that will be staked to earn rewards        |
| `payoutToken_` | `ERC20` | ERC20 token that stakers will receive call options for |

**Returns**

| Name   | Type              | Description                     |
| ------ | ----------------- | ------------------------------- |
| `oolm` | `OracleStrikeOLM` | Address of the new OLM contract |


---

# 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://dev.bondprotocol.finance/smart-contracts/option-system/olm-factories.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.
