LogoLogo
WebsiteGithubCommunity Docs
  • Developer Docs
  • Smart Contracts
    • Bond System
      • Auctioneer
        • Auctioneer Interfaces
        • Sequential Dutch Auctioneer (SDA)
          • Auction Pricing
          • Fixed-Term SDA
          • Fixed-Expiry SDA
        • Fixed Price Auctioneer (FPA)
          • Fixed-Term FPA
          • Fixed-Expiry FPA
        • Oracle-based Auctioneers
          • Oracle Interface
        • Oracle Fixed Discount Auctioneer (OFDA)
          • Fixed-Term OFDA
          • Fixed-Expiry OFDA
        • Oracle Sequential Dutch Auctioneer (OSDA)
          • Fixed-Term OSDA
          • Fixed-Expiry OSDA
      • Teller
        • Teller Interfaces
        • Base Teller
        • Fixed-Expiry Teller
        • Fixed-Term Teller
      • Callback
        • Callback Interface
        • Base Callback
        • Sample Callback Contract
      • Aggregator
        • Aggregator Interface
        • Aggregator Contract
      • Intended User Actions
      • Limit Orders
    • Option System
      • Fixed Strike oTokens
      • Fixed Strike Option Teller
      • Options Liquidity Mining (OLM)
        • Manual Strike OLM
        • Oracle Strike OLM
      • OLM Factories
  • Developers
    • Subgraph
    • Market Calculations
    • Purchases & Redemptions
    • User Balances
    • Options Library
      • Helper Functions
      • Types
  • References
    • Technical Resources
      • Audits
    • Community Resources
    • Brand Assets
    • Contact Us
Powered by GitBook
On this page
  • Introduction
  • Deployment
  • MOLMFactory
  • State Variables
  • Functions
  • OOLMFactory
  • State Variables
  • Functions
  1. Smart Contracts
  2. Option System

OLM Factories

Factory contracts for easy deployment of OLM contracts

PreviousOracle Strike OLMNextSubgraph

Introduction

The OLM Factory contracts allows anyone to deploy newcontracts without compiling and deploying them manually. When deployed, the owner of the OLM is set to the caller.

There are two factories for the two OLM implementations: Manual Strike () and Oracle Strike ().

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

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.

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

Factory for deploying Manual Strike OLM contracts

State Variables

optionTeller

Option Teller to be used by OLM contracts

IFixedStrikeOptionTeller public immutable optionTeller;

Functions

deploy

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

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

Factory for deploying Oracle Strike OLM contracts

State Variables

optionTeller

Option Teller to be used by OLM contracts

IFixedStrikeOptionTeller public immutable optionTeller;

Functions

deploy

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

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

Git Source
OLM
Initialize
Git Source
MOLMFactory
OOLMFactory