Autonomint
Blockchain Docs
Blockchain Docs
  • GETTING STARTED
    • Overview
    • Contracts Overview
  • Core Contracts
    • Borrowing
    • CDS
    • Treasury
    • Options
    • MultiSign
    • BorrowLiquidation
    • GlobalVariables
  • Core Logics
    • Borrowing Logics
    • CDS Logics
    • Treasury Logics
    • Options Logics
    • BorrowLiquidation Logics
  • Deployed Contracts Addresses
Powered by GitBook
On this page
  • Read Functions
  • calculateStrikePriceGains
  • calculateOptionPrice
  1. Core Contracts

Options

The options fees to deduct from user and call options gains are calculated here.

PreviousTreasuryNextMultiSign

Last updated 5 months ago

Read Functions

function calculateStrikePriceGains(
    uint128 depositedAmount,
    uint128 strikePrice,
    uint64 ethPrice )
Param Name
Type
Description

depositedAmount

uint128

Deposited collateral amount.

strikePrice

uint128

Strike price chosen during deposit.

ethPrice

uint64

Current collateral price.

If the strike price smaller or equal to the current deposited amount value, then the user will get gains, else the gains is zero.

function calculateOptionPrice(
    uint128 _ethPrice,
    uint256 _ethVolatility,
    uint256 _amount,
    StrikePrice _strikePrice )
Param Name
Type
Description

_ethPrice

uint128

Current ETH price.

_ethVolatility

uint256

ETH volatility.

_amount

uint256

The borrower's depositing amount.

_strikePrice

enum StrikePrice

Strike price percent chose by borrower.

Returns the options fees to deduct from borrower based on strike price chose, ETH volatility, total CDS deposited amount, total collateral locked in treasury.

calculateStrikePriceGains
calculateOptionPrice