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
  • Overview
  • FixedStrikeOptionToken Contract
  • Immutable Args
  • Functions
  • Errors
  1. Smart Contracts
  2. Option System

Fixed Strike oTokens

ERC20-compatible option token implementation with fixed strike prices

PreviousOption SystemNextFixed Strike Option Teller

Overview

Option Tokens (oTokens) are issued by a Option Teller to represent American-style options on the underlying token. Call option tokens can be exercised for the underlying token 1:1 by paying the amount * strike price in the quote token at any time between the eligible and expiry timestamps. Put option tokens can be exercised for the underlying token 1:1 by paying the amount of the underlying token to receive the amount * strike price in the quote token at any time between the eligible and expiry timestamps.

The Fixed Strike Option Token contract is a specific implementation of oTokens where the strike price is specified and fixed on creation.

oTokens are unique to the combination of parameters that they are deployed with. Eligible and expiry timestamps are rounded down to the nearest day (using UTC) to reduce the possible number of tokens.

This contract uses to save gas on deployment and is based on .

FixedStrikeOptionToken Contract

Immutable Args

payout

The token that the option is on

function payout() public pure returns (ERC20 _payout);

quote

The token that the option is quoted in

function quote() public pure returns (ERC20 _quote);

eligible

Timestamp at which the Option token can first be exercised

function eligible() public pure returns (uint48 _eligible);

expiry

Timestamp at which the Option token cannot be exercised after

function expiry() public pure returns (uint48 _expiry);

receiver

Address that will receive the proceeds when option tokens are exercised. Also, the only address that can reclaim collateral from expired oTokens.

function receiver() public pure returns (address _receiver);

call

Whether the option is a call (true) or a put (false)

function call() public pure returns (bool _call);

teller

Address of the Teller that created the token

function teller() public pure returns (address _teller);

strike

The strike price of the option (in quote token units)

function strike() public pure returns (uint256 _strike);

Functions

mint

Mint option tokens

Only callable by the Teller that created the token

function mint(address to, uint256 amount) external;

Parameters

Name
Type
Description

to

address

The address to mint to

amount

uint256

The amount to mint

burn

Burn option tokens

Only callable by the Teller that created the token

function burn(address from, uint256 amount) external;

Parameters

Name
Type
Description

from

address

The address to burn from

amount

uint256

The amount to burtn

getOptionParameters

Get collection of option parameters in a single call

function getOptionParameters()
    external
    pure
    returns (
        uint8 decimals_,
        ERC20 payout_,
        ERC20 quote_,
        uint48 eligible_,
        uint48 expiry_,
        address receiver_,
        bool call_,
        uint256 strike_
    );

Returns

Name
Type
Description

decimals_

uint8

The number of decimals for the option token (same as payout token)

payout_

ERC20

The address of the payout token

quote_

ERC20

The address of the quote token

eligible_

uint48

The option exercise eligibility timestamp

expiry_

uint48

The option exercise expiry timestamp

receiver_

address

The address of the receiver

call_

bool

Whether the option is a call (true) or a put (false)

strike_

uint256

The option strike price specified in the amount of quote tokens per underlying token

Errors

OptionToken_OnlyTeller

error OptionToken_OnlyTeller();

Git Source
Clones With Immutable Args
VestedERC20