Options Logics
Here the logics used in options contract are explained.
Strike Price Gains calculation
function calculateStrikePriceGains(
uint128 depositedAmount,
uint128 strikePrice,
uint64 ethPrice
)if(currentEthValue > strikePrice){
ethToReturn = (currentEthValue - strikePrice)/currentEthPrice;
}else{
ethToReturn = 0;
}Option Fees Calculation
Last updated