๐ฌ Quoter contract
Contract for getting estimates or quotes for trades or LP operations, as well as to check for unhealthy positions that are ready to be liquidated.
getContractProvider
Returns ContractProvider contract
quoteTrade
Provides estimations for a trade with notional
amount in a particular future. The quote is returned for both risk directions simultaneously.
Input parameters:
notional
uint256
Notional amount of the assumed trade.
participant
address
The address whose state will be used to calculate the quote for.
oraclePackages
An array of packages containing the latest known index for the market. Packages are provided by an Oracle service on demand.
Output values:
TradeQuote
Object containing the trade details
quoteLiquidityProvision
Provides estimations for liquidity provision in specified Futures market and bounds.
Input parameters:
notional
uint256
The face value of the future trade.
participant
address
The address to calculate the quote for.
lowerBound
int256
Defines the lower point of the rate range. Format: fixed point signed 18-decimal number.
upperBound
int256
Defines the upper point of the rate range. Format: fixed point signed 18-decimal number.
oraclePackages
An array of packages containing the latest known index for the market. Packages are provided by an Oracle service on demand.
Output values:
quotePositionsOwnershipTransfer
Provides estimations for positions ownership transfer operation being carried out for owner
in specified Market.
Ensure that owner
's positions are liquidatable by calling Quoter.isLiquidatable
using owner
as a participant
.
Input parameters:
owner
address
Target owner of positions.
liquidator
address
Receiver of positions from the owner
oraclePackages
An array of packages containing the latest known index for the market. Packages are provided by an Oracle service on demand.
Output values:
uint256
transferAmount โ amount of collateral to be transferred fromowner
's margin account toliquidator
as a reward;uint256
depositAmount โ additional amount of collateral that is required to deposit toliquidator
's margin account.
isLiquidatable
Returns true
if participant
's margin for marketId
is below Liquidation Threshold and his positions can be liquidated or transferred.
Input parameters:
participant
address
The address to check
oraclePackages
An array of packages containing the latest known index for the market. Packages are provided by an Oracle service on demand.
Output values:
bool
true if participant can be liquidated.
isProvisionCancellable
Returns true
if maker
's positions in a given marketId
should be cancelled due to his margin being below Initial Margin Requirement.
Input parameters:
maker
address
The address to check
oraclePackages
An array of packages containing the latest known index for the market. Packages are provided by an Oracle service on demand.
Output values:
bool
true if maker is below his margin requirement
Structs
Documentation of structs mentioned in this page
TradeQuote
Struct with quote data for a trade
insufficientLiquidityForPayer
bool
True if there is not enough provided liquidity to place a trade with the Payer risk direction
exceededRateImpactLimitForPayer
bool
True if the market rate shift exceeds the limiting value for given trade with the Payer risk direction
insufficientLiquidityForReceiver
bool
True if there is not enough provided liquidity to place a trade with the Receiver risk direction
exceededRateImpactLimitForReceiver
bool
True if the market rate shift exceeds the limiting value for given trade with the Receiver risk direction
OneDirectionTradeQuote
Details on a trade quote on a particular direction (payer or receiver)
TradeInfo
struct containing trade detailstotalFutureOpenPositionNotional
Total notional available for trades in this directiontotalFutureOpenPositionDv01
Dollar duration for total notional available in this directionnewMargin
Details on user's margin state after this tradenewMarginThreshold
Updated user's margin thresholdtradeNotionalDv01
Dollar duration for the trade's notional
totalFutureOpenPositionNotional
uint256
Total notional available for trades in this direction
totalFutureOpenPositionDv01
uint256
Dollar duration for total notional available in this direction
newMarginThreshold
uint256
Updated user's margin threshold
tradeNotionalDv01
uint256
Dolar duration for the trade's notional
LiquidityProvisionQuote
Details on a quote for a liquidity provision.
totalFutureProvisionPayerDv01
uint256
Resulting DV01 towards the Payer side for the participant after provision
totalFutureProvisionReceiverDv01
uint256
Resulting DV01 towards the Receiver side for the participant after provision
newMarginThreshold
uint256
Resulting margin requirements
newProvisionDistribution
Resulting amounts of provision on Payer & Receiver sides as well as total
newProvisionNotionalDv01
uint256
Resulting overall DV01
Enums
LiquidityOperation
Defines the 2 options of maker operations: provide and remove liquidity
Last updated