AlphaOptionHandler.sol
AlphaOptionHandler
executeOrder(orderId) external
Direct NonTrustedAccessible
executeOrder(orderId) external
Direct NonTrustedAccessibleThis function gets a custom order using a orderId, this will revert if the sender is not the authorised buyer of the order. First the spot price will be checked against the customOrderBounds to make sure there hasnt been a big spot price move. If the order falls outside any of the allowed bounds then the transaction will revert. If all conditions are met then the option will be minted to the buyer. At the end of the transaction the order is invalidated.
executeBuyBackOrder(orderId) external
Direct NonTrustedAccessible
executeBuyBackOrder(orderId) external
Direct NonTrustedAccessibleThis function gets a custom order using a orderId, this will revert if the sender is not the authorised buyer of the order. First the spot price will be checked against the customOrderBounds to make sure there hasnt been a big spot price move. If the order falls outside any of the allowed bounds then the transaction will revert. If all conditions are met then the option will be burned and usdc will be returned to the buyer. At the end of the transaction the order is invalidated.
executeStrangle(orderId1, orderId2) external
Direct NonTrustedAccessible
executeStrangle(orderId1, orderId2) external
Direct NonTrustedAccessibleThis function executes two order executions and is intended for use with a strangle.
createOrder() external onlyRole
createOrder() external onlyRole
This function creates a custom option order receipt which contains the option series, the amount, the price at which the order is settled at, the time after which the custom order expires and the authorised buyer of the custom order. This is managed by a manager and governance and is used for large market orders with participants such as market makers. This returns an orderId which is used by the market participant to access their custom order in executeOrder. Create order also requires passing in whether the order is a buyback or not.
createStrangle() external onlyRole
createStrangle() external onlyRole
This function creates two custom orders, one put order and one call order. This is so delta neutral positions can be sold to certain market participants.
Contract used for all user facing options interactions
Interacts with liquidityPool to write options and quote their prices.
liquidityPool
immutable variables ///
protocol
strikeAsset
underlyingAsset
collateralAsset
orderIdCounter
dynamic variables ///
orderStores
customOrderBounds
governance settable variables ///
MAX_BPS
constant variables ///
maxOrderExpiry
CustomOrderBounds
OrderCreated
OrderExecuted
constructor
setCustomOrderBounds
set new custom order parameters
createOrder
creates an order for a number of options from the pool to a specified user. The function is intended to be used to issue options to market makers/ OTC market participants in order to have flexibility and customisability on option issuance and market participant UX.
createStrangle
creates a strangle order. One custom put and one custom call order to be executed simultaneously.
executeOrder
fulfills an order for a number of options from the pool to a specified user. The function is intended to be used to issue options to market makers/ OTC market participants in order to have flexibility and customisability on option issuance and market participant UX.
executeBuyBackOrder
fulfills a buyback order for a number of options from the pool to a specified user. The function is intended to be used to issue options to market makers/ OTC market participants in order to have flexibility and customisability on option issuance and market participant UX.
executeStrangle
fulfills a stored strangle order consisting of a stores call and a stored put. This is intended to be called by market makers/OTC market participants.
getOptionRegistry
get the option registry used for storing and managing the options
getPortfolioValuesFeed
get the portfolio values feed used by the liquidity pool
_getUnderlyingPrice
get the underlying price with just the underlying asset and strike asset
Last updated