๐ฌ 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.
Last updated
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.
Last updated
Returns ContractProvider contract
Provides estimations for a trade with notional
amount in a particular future. The quote is returned for both risk directions simultaneously.
Input parameters:
Parameter Name | Type | Description |
---|---|---|
Output values:
TradeQuote
Object containing the trade details
Provides estimations for liquidity provision in specified Futures market and bounds.
Input parameters:
Output values:
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:
Output values:
uint256
transferAmount โ amount of collateral to be transferred from owner
's margin account to liquidator
as a reward;
uint256
depositAmount โ additional amount of collateral that is required to deposit to liquidator
's margin account.
Returns true
if participant
's margin for marketId
is below Liquidation Threshold and his positions can be liquidated or transferred.
Input parameters:
Output values:
bool
true if participant can be liquidated.
Returns true
if maker
's positions in a given marketId
should be cancelled due to his margin being below Initial Margin Requirement.
Input parameters:
Output values:
bool
true if maker is below his margin requirement
Documentation of structs mentioned in this page
Struct with quote data for a trade
Details on a trade quote on a particular direction (payer or receiver)
TradeInfo
struct containing trade details
totalFutureOpenPositionNotional
Total notional available for trades in this direction
totalFutureOpenPositionDv01
Dollar duration for total notional available in this direction
newMargin
Details on user's margin state after this trade
newMarginThreshold
Updated user's margin threshold
tradeNotionalDv01
Dollar duration for the trade's notional
Details on a quote for a liquidity provision.
Defines the 2 options of maker operations: provide and remove liquidity
Parameter Name | Type | Description |
---|---|---|
Parameter Name | Type | Description |
---|---|---|
Parameter Name | Type | Description |
---|---|---|
Parameter Name | Type | Description |
---|---|---|
Property name | Property Type | Description |
---|---|---|
Property name | Property Type | Description |
---|---|---|
Property name | Property Type | Description |
---|---|---|
futureId
Target Future identifier.
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.
futureId
Future identifier.
notional
uint256
The face value of the future trade.
participant
address
The address to calculate the quote for.
operation
Either Provide
or Remove
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.
marketId
Target Market identifier.
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.
marketId
Target Market identifier.
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.
marketId
Target Market identifier.
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.
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
payerQuote
Quote details for a trade with Payer direction
receiverQuote
Quote details for a trade with Receiver direction
marketPortfolio
Contains portfolio details os user
tradeInfo
Trade details
totalFutureOpenPositionNotional
uint256
Total notional available for trades in this direction
totalFutureOpenPositionDv01
uint256
Dollar duration for total notional available in this direction
newMargin
Details on user's margin after this trade
newMarginThreshold
uint256
Updated user's margin threshold
tradeNotionalDv01
uint256
Dolar duration for the trade's notional
totalFutureProvisionNotional
Resulting total of provided notional
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
marketPortfolio
Contains portfolio details of user