Oracle Strike OLM
Inherits: OLM
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
oracleDiscount
Discount to the oracle price used to set the strike price when creating a new option token
ONE_HUNDRED_PERCENT
minStrikePrice
Minimum strike price that can be set when creating a new option token, in number of quote tokens per payout token
Functions
_initialize
Internal function, not callable directly. Called within initialize
to implement Oracle Strike OLM specific initialization logic.
Parameters
Name | Type | Description |
---|---|---|
|
| ABI-encoded bytes containing the oracle, oracle discount, and minimum strike price |
|
| Percent discount from oracle price to use for strike price, with 3 decimal places. i.e. |
|
| 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:
nextStrikePrice
Returns the strike price that would be used if a new epoch started right now
setOracle
Set the oracle contract
Only owner
Parameters
Name | Type | Description |
---|---|---|
|
| Oracle contract used to get a current strike price when creating a new option token |
setOracleDiscount
Set the oracle discount
Only owner
Parameters
Name | Type | Description |
---|---|---|
|
| 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
Parameters
Name | Type | Description |
---|---|---|
|
| 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
Parameters
Name | Type | Description |
---|---|---|
|
| Token that stakers must pay to exercise the call options they receive |