Option Contract
Last updated
Last updated
event BuyOption(uint256 orderNo, uint256[3] inData, address buyer)
**Users buy options **
order_no
order_no
inData[0]
position
inData[1]
buy amount
inData[2]
fee
buyer
buyer address
SellOption(uint256 orderNo, uint256[3] outData, address seller)
Users sell options
order_no
order_no
outData[0]
position
outData[1]
sell amount
outData[2]
fee
seller
seller address
UserExercise(uint256 orderNo,uint256[3] outData,bool isKnockout,address user)
Users exercise or knockout liquidation
order_no
order_no
outData[0]
position
outData[1]
user profit
outData[2]
fee
isKnockout
Exercise or knockout liquidation at maturity
user
user address
MakerKnockOut(uint256[] orderNoArr)
The order of Market maker liquidation
orderNoArr
The list of liquidation
MakerExercise(uint256[] orderNoArr)
The order of market maker exercise at expiration
orderNoArr
The list of exercise at expiration
uint256 public knockOutRebake
After knockout, users can get the percentage of rebake for the purchase price, rate=knockOutRebake/10000*100%
Get the knockout scale and exercise cycle for the specified poolId
uint256[2][16] public basePoolsInfo;
node
IERC20 public immutable payToken;
**Address of payment token ** node
uint256 public immutable payTokenDecimals
the accuracy of token,e.g., usdt is 1e6
address public signDataPublic
The sign address when users buy and sell options
uint256 public signValidTime
** The maximum validity period for a signature **
address public feeReceiver
**Developers' address to receive platform fees **
uint256 public sellPriceRate
When you sell an option, multiply ratio on the basis of the quantitative price model, the initial ratio is 70%,ratio=sellPriceRate/10000*100%
**View options details **
order_no
uint256
order_no
indexNo
uint256
index no
poolId
uint8
pool id
payToken
address
pay token
startPrice
uint256
Start price,is also strike price
exerciseTime
uint256
option exercise time
isCall
bool
is call option
balance
uint256
The balance of option contract
margin
uint256
Margin of market maker
makerIncome
uint256
Income of market maker
price
uint256
Price of open positions
status
uint8
0:Opened position, 1: Exercised,2:Knockouted
node
mapping(uint256 => mapping(uint256 => uint256)) public exercisePrice
index_no
uint256
index_no
exerciseTime
uint256
option exercise time
index_price
uint256
index price at exercise time
uint256[5] public userRate
User buy and sell options rate
node
userRate[0]:Open put position rate userRate[1]:Option call position rate userRate[2]:Close put positon rate userRate[3]:Close call position rate userRate[4]:Exercise rate
Sell option
User exercise
User Knockout
Buy options Please refer to
Please refer to