Skip to content

BinaryOptionMarket

Description

Source: contracts/BinaryOptionMarket.sol

Architecture

Libraries

Inheritance Graph

graph TD BinaryOptionMarket[BinaryOptionMarket] --> MixinResolver[MixinResolver] MixinResolver[MixinResolver] --> Owned[Owned]

Structs

Options

Source

Field Type Description
long contract BinaryOption TBA
short contract BinaryOption TBA

OracleDetails

Source

Field Type Description
key bytes32 TBA
strikePrice uint256 TBA
finalPrice uint256 TBA

Prices

Source

Field Type Description
long uint256 TBA
short uint256 TBA

Times

Source

Field Type Description
biddingEnd uint256 TBA
maturity uint256 TBA
expiry uint256 TBA

Variables

creator

Source

Type: address

creatorLimits

Source

Type: struct BinaryOptionMarketManager.CreatorLimits

deposited

Source

Type: uint256

fees

Source

Type: struct BinaryOptionMarketManager.Fees

options

Source

Type: struct BinaryOptionMarket.Options

oracleDetails

Source

Type: struct BinaryOptionMarket.OracleDetails

prices

Source

Type: struct BinaryOptionMarket.Prices

resolved

Source

Type: bool

times

Source

Type: struct BinaryOptionMarket.Times

Constructor

constructor

Source

Details

Signature

(address _owner, address _creator, uint256[2] _creatorLimits, bytes32 _oracleKey, uint256 _strikePrice, uint256[3] _times, uint256[2] _bids, uint256[3] _fees)

Visibility

public

State Mutability

nonpayable

Views

balancesOf

Source

Details

Signature

balancesOf(address account) returns (uint256, uint256)

Visibility

external

State Mutability

view

bidOrRefundForPrice

Source

Details

Signature

bidOrRefundForPrice(enum IBinaryOptionMarket.Side bidSide, enum IBinaryOptionMarket.Side priceSide, uint256 price, bool refund) returns (uint256)

Visibility

external

State Mutability

view

bidsOf

Source

Details

Signature

bidsOf(address account) returns (uint256, uint256)

Visibility

external

State Mutability

view

canResolve

Source

Details

Signature

canResolve() returns (bool)

Visibility

external

State Mutability

view

claimableBalancesOf

Source

Details

Signature

claimableBalancesOf(address account) returns (uint256, uint256)

Visibility

external

State Mutability

view

exercisableDeposits

Source

Details

Signature

exercisableDeposits() returns (uint256)

Visibility

external

State Mutability

view

oraclePriceAndTimestamp

Source

Details

Signature

oraclePriceAndTimestamp() returns (uint256, uint256)

Visibility

external

State Mutability

view

phase

Source

Details

Signature

phase() returns (enum IBinaryOptionMarket.Phase)

Visibility

external

State Mutability

view

pricesAfterBidOrRefund

Source

Details

Signature

pricesAfterBidOrRefund(enum IBinaryOptionMarket.Side side, uint256 value, bool refund) returns (uint256, uint256)

Visibility

external

State Mutability

view

requireActiveAndUnpaused

Source

Details

Signature

requireActiveAndUnpaused()

Visibility

external

State Mutability

view

Requires

result

Source

Details

Signature

result() returns (enum IBinaryOptionMarket.Side)

Visibility

external

State Mutability

view

senderPriceAndExercisableDeposits

Source

Details

Signature

senderPriceAndExercisableDeposits() returns (uint256, uint256)

Visibility

external

State Mutability

view

totalBids

Source

Details

Signature

totalBids() returns (uint256, uint256)

Visibility

external

State Mutability

view

totalClaimableSupplies

Source

Details

Signature

totalClaimableSupplies() returns (uint256, uint256)

Visibility

external

State Mutability

view

totalSupplies

Source

Details

Signature

totalSupplies() returns (uint256, uint256)

Visibility

external

State Mutability

view

Restricted Functions

expire

Source

Details

Signature

expire(address payable beneficiary)

Visibility

external

State Mutability

nonpayable

Requires

Modifiers

resolve

Source

Details

Signature

resolve()

Visibility

external

State Mutability

nonpayable

Requires

Modifiers

Emits

Internal Functions

_balancesOf

Source

Details

Signature

_balancesOf(address account) returns (uint256, uint256)

Visibility

internal

State Mutability

view

_biddingEnded

Source

Details

Signature

_biddingEnded() returns (bool)

Visibility

internal

State Mutability

view

_bidsOf

Source

Details

Signature

_bidsOf(address account) returns (uint256, uint256)

Visibility

internal

State Mutability

view

_checkCreatorLimits

Source

Details

Signature

_checkCreatorLimits(uint256 longBid, uint256 shortBid)

Visibility

internal

State Mutability

view

Requires

_chooseSide

Source

Details

Signature

_chooseSide(enum IBinaryOptionMarket.Side side, uint256 longValue, uint256 shortValue) returns (uint256)

Visibility

internal

State Mutability

pure

_claimOptions

Source

Details

Signature

_claimOptions() returns (uint256, uint256)

Visibility

internal

State Mutability

nonpayable

Requires

Modifiers

Emits

_claimableBalancesOf

Source

Details

Signature

_claimableBalancesOf(address account) returns (uint256, uint256)

Visibility

internal

State Mutability

view

_computePrices

Source

Details

Signature

_computePrices(uint256 longBids, uint256 shortBids, uint256 _deposited) returns (uint256, uint256)

Visibility

internal

State Mutability

view

Requires

_decrementDeposited

Source

Details

Signature

_decrementDeposited(uint256 value) returns (uint256)

Visibility

internal

State Mutability

nonpayable

_exchangeRates

Source

Details

Signature

_exchangeRates() returns (contract IExchangeRates)

Visibility

internal

State Mutability

view

_exercisableDeposits

Source

Details

Signature

_exercisableDeposits(uint256 _deposited) returns (uint256)

Visibility

internal

State Mutability

view

_expired

Source

Details

Signature

_expired() returns (bool)

Visibility

internal

State Mutability

view

_feePool

Source

Details

Signature

_feePool() returns (contract IFeePool)

Visibility

internal

State Mutability

view

_incrementDeposited

Source

Details

Signature

_incrementDeposited(uint256 value) returns (uint256)

Visibility

internal

State Mutability

nonpayable

_isFreshPriceUpdateTime

Source

Details

Signature

_isFreshPriceUpdateTime(uint256 timestamp) returns (bool)

Visibility

internal

State Mutability

view

_manager

Source

Details

Signature

_manager() returns (contract BinaryOptionMarketManager)

Visibility

internal

State Mutability

view

_matured

Source

Details

Signature

_matured() returns (bool)

Visibility

internal

State Mutability

view

_option

Source

Details

Signature

_option(enum IBinaryOptionMarket.Side side) returns (contract BinaryOption)

Visibility

internal

State Mutability

view

_oraclePriceAndTimestamp

Source

Details

Signature

_oraclePriceAndTimestamp() returns (uint256, uint256)

Visibility

internal

State Mutability

view

_requireManagerNotPaused

Source

Details

Signature

_requireManagerNotPaused()

Visibility

internal

State Mutability

view

Requires

_result

Source

Details

Signature

_result() returns (enum IBinaryOptionMarket.Side)

Visibility

internal

State Mutability

view

_sUSD

Source

Details

Signature

_sUSD() returns (contract IERC20)

Visibility

internal

State Mutability

view

_subToZero

Source

Details

Signature

_subToZero(uint256 a, uint256 b) returns (uint256)

Visibility

internal

State Mutability

pure

_systemStatus

Source

Details

Signature

_systemStatus() returns (contract ISystemStatus)

Visibility

internal

State Mutability

view

_totalBids

Source

Details

Signature

_totalBids() returns (uint256, uint256)

Visibility

internal

State Mutability

view

_updatePrices

Source

Details

Signature

_updatePrices(uint256 longBids, uint256 shortBids, uint256 _deposited)

Visibility

internal

State Mutability

nonpayable

Emits

External Functions

bid

Source

Details

Signature

bid(enum IBinaryOptionMarket.Side side, uint256 value)

Visibility

external

State Mutability

nonpayable

Modifiers

Emits

claimOptions

Source

Details

Signature

claimOptions() returns (uint256, uint256)

Visibility

external

State Mutability

nonpayable

exerciseOptions

Source

Details

Signature

exerciseOptions() returns (uint256)

Visibility

external

State Mutability

nonpayable

Requires

Emits

refund

Source

Details

Signature

refund(enum IBinaryOptionMarket.Side side, uint256 value) returns (uint256)

Visibility

external

State Mutability

nonpayable

Modifiers

Emits

Modifiers

afterBidding

Source

afterMaturity

Source

duringBidding

Source

managerNotPaused

Source

systemActive

Source

Events

Bid

Source

Signature: Bid(enum IBinaryOptionMarket.Side side, address account, uint256 value)

MarketResolved

Source

Signature: MarketResolved(enum IBinaryOptionMarket.Side result, uint256 oraclePrice, uint256 oracleTimestamp, uint256 deposited, uint256 poolFees, uint256 creatorFees)

OptionsClaimed

Source

Signature: OptionsClaimed(address account, uint256 longOptions, uint256 shortOptions)

OptionsExercised

Source

Signature: OptionsExercised(address account, uint256 value)

PricesUpdated

Source

Signature: PricesUpdated(uint256 longPrice, uint256 shortPrice)

Refund

Source

Signature: Refund(enum IBinaryOptionMarket.Side side, address account, uint256 value, uint256 fee)