Buffer Options
Admin only function used to set config
function configure(
uint16 _baseSettlementFeePercentageForAbove,
uint16 _baseSettlementFeePercentageForBelow,
uint8[4] calldata _nftTierStep
)
Admin only function to pause/Unpause the option creation
function toggleCreation()
Returns the fees for buying an option
function fees(
uint256 amount,
address user,
bool isAbove,
string calldata referralCode,
uint256 traderNFTId
)
Returns true if the strike price at which the trade is opened lies within the slippage bounds
function isStrikeValid(
uint256 slippage,
uint256 strike,
uint256 expectedStrike
)
Checks if the market is open at the time of option creation and execution.
function isInCreationWindow(uint256 period)
Runs the basic checks for option creation
function runInitialChecks(
uint256 slippage,
uint256 period,
uint256 totalFee
)
Returns max option amount based on the pool's capacity
function getMaxUtilization()
Runs all the checks on the option parameters and returns the revised amount and fee
function checkParams(OptionParams calldata optionParams)
Returns the discount to be applied on settlement fee based on NFT and referrer tiers
function _getSettlementFeeDiscount(
address referrer,
address user,
uint256 traderNFTId
)
Last modified 2mo ago