Skip to main content

IExchangeProductHandler

IExchangeProductHandler

Addresses

ChainAddress

Functions

addProduct

Add a new product

function addProduct(struct IExchangeDomain.ProductParams _product) external

Parameters

NameTypeDescription
_productstruct IExchangeDomain.ProductParamsSee IDomFiPerp.ProductParams

updateProductMaxLeverage

Update the max leverage of a product

function updateProductMaxLeverage(ProductId _productId, FPUnsigned _maxLeverage) external

Parameters

NameTypeDescription
_productIdProductIdProduct to change
_maxLeverageFPUnsignedSee IDomFiPerp.Product.maxLeverage

updateProductFee

Update the base trade fee for a product

function updateProductFee(ProductId _productId, FPUnsigned _fee) external

Parameters

NameTypeDescription
_productIdProductIdProduct to change
_feeFPUnsignedSee IDomFiPerp.Product.fee

updateProductActive

Enable or disable a product

function updateProductActive(ProductId _productId, bool _isActive) external

Parameters

NameTypeDescription
_productIdProductIdProduct to (de)activate
_isActiveboolIDomFiPerp.Product.isActive

updateProductMinPriceChange

Update the minimum price change for positions on a product.

function updateProductMinPriceChange(ProductId _productId, FPUnsigned _minPriceChange) external

Parameters

NameTypeDescription
_productIdProductIdProduct to change
_minPriceChangeFPUnsignedSee IDomFiPerp.Product.minPriceChange

updateProductLiquidationBounty

Update the liquidation bounty for positions on a product

function updateProductLiquidationBounty(ProductId _productId, FPUnsigned _liquidationBounty) external

Parameters

NameTypeDescription
_productIdProductIdProduct to change
_liquidationBountyFPUnsignedSee IDomFiPerp.Product.liquidationBounty

updateProductExposureMultiplier

Update a product's exposure multiplier

function updateProductExposureMultiplier(ProductId _productId, FPUnsigned _exposureMultiplier) external

Parameters

NameTypeDescription
_productIdProductIdProduct to change
_exposureMultiplierFPUnsignedSee IDomFiPerp.Product.exposureMultiplier

updateProductReserveMultiplier

Update a product's reserve multiplier

function updateProductReserveMultiplier(ProductId _productId, FPUnsigned _reserveMultiplier) external

Parameters

NameTypeDescription
_productIdProductIdProduct to change
_reserveMultiplierFPUnsignedSee IDomFiPerp.Product.reserveMultiplier

updateProductWeight

Update a product's weight for exposure calculations

function updateProductWeight(ProductId _productId, FPUnsigned _weight) external

Parameters

NameTypeDescription
_productIdProductIdProduct to change
_weightFPUnsignedSee IDomFiPerp.Product.weight

updateProductLiquidationThreshold

Update the liquidation threshold for positions on a product

function updateProductLiquidationThreshold(ProductId _productId, FPUnsigned _liquidationThreshold) external

Parameters

NameTypeDescription
_productIdProductIdProduct to change
_liquidationThresholdFPUnsignedSee IDomFiPerp.Product.liquidationThreshold

updateProductFundingExponent

Set product funding exponent. Funding rate is (productExposure / maxExposure) ^ fundingExponent * fundingMultiplier

function updateProductFundingExponent(ProductId _productId, FPUnsigned _fundingExponent) external
Dev note

Set to 1 to "disable".

Parameters

NameTypeDescription
_productIdProductIdID of product to change funding exponent
_fundingExponentFPUnsignedNew funding exponent. Must be > 0

ExchangeProductDelegate

Addresses

ChainAddress

Functions

addProduct

Add a new product

function addProduct(
contract IExchangeProductHandler handler,
struct IExchangeDomain.ProductParams _product
) internal

Parameters

NameTypeDescription
handlercontract IExchangeProductHandler
_productstruct IExchangeDomain.ProductParamsSee IDomFiPerp.ProductParams

updateProductMaxLeverage

Update the max leverage of a product

function updateProductMaxLeverage(
contract IExchangeProductHandler handler,
ProductId _productId,
FPUnsigned _maxLeverage
) internal

Parameters

NameTypeDescription
handlercontract IExchangeProductHandler
_productIdProductIdProduct to change
_maxLeverageFPUnsignedSee IDomFiPerp.Product.maxLeverage

updateProductFee

Update the base trade fee for a product

function updateProductFee(
contract IExchangeProductHandler handler,
ProductId _productId,
FPUnsigned _fee
) internal

Parameters

NameTypeDescription
handlercontract IExchangeProductHandler
_productIdProductIdProduct to change
_feeFPUnsignedSee IDomFiPerp.Product.fee

updateProductActive

Enable or disable a product

function updateProductActive(
contract IExchangeProductHandler handler,
ProductId _productId,
bool _isActive
) internal

Parameters

NameTypeDescription
handlercontract IExchangeProductHandler
_productIdProductIdProduct to (de)activate
_isActiveboolIDomFiPerp.Product.isActive

updateProductMinPriceChange

Update the minimum price change for positions on a product.

function updateProductMinPriceChange(
contract IExchangeProductHandler handler,
ProductId _productId,
FPUnsigned _minPriceChange
) internal

Parameters

NameTypeDescription
handlercontract IExchangeProductHandler
_productIdProductIdProduct to change
_minPriceChangeFPUnsignedSee IDomFiPerp.Product.minPriceChange

updateProductLiquidationBounty

Update the liquidation bounty for positions on a product

function updateProductLiquidationBounty(
contract IExchangeProductHandler handler,
ProductId _productId,
FPUnsigned _liquidationBounty
) internal

Parameters

NameTypeDescription
handlercontract IExchangeProductHandler
_productIdProductIdProduct to change
_liquidationBountyFPUnsignedSee IDomFiPerp.Product.liquidationBounty

updateProductExposureMultiplier

Update a product's exposure multiplier

function updateProductExposureMultiplier(
contract IExchangeProductHandler handler,
ProductId _productId,
FPUnsigned _exposureMultiplier
) internal

Parameters

NameTypeDescription
handlercontract IExchangeProductHandler
_productIdProductIdProduct to change
_exposureMultiplierFPUnsignedSee IDomFiPerp.Product.exposureMultiplier

updateProductReserveMultiplier

Update a product's reserve multiplier

function updateProductReserveMultiplier(
contract IExchangeProductHandler handler,
ProductId _productId,
FPUnsigned _reserveMultiplier
) internal

Parameters

NameTypeDescription
handlercontract IExchangeProductHandler
_productIdProductIdProduct to change
_reserveMultiplierFPUnsignedSee IDomFiPerp.Product.reserveMultiplier

updateProductWeight

Update a product's weight for exposure calculations

function updateProductWeight(
contract IExchangeProductHandler handler,
ProductId _productId,
FPUnsigned _weight
) internal

Parameters

NameTypeDescription
handlercontract IExchangeProductHandler
_productIdProductIdProduct to change
_weightFPUnsignedSee IDomFiPerp.Product.weight

updateProductLiquidationThreshold

Update the liquidation threshold for positions on a product

function updateProductLiquidationThreshold(
contract IExchangeProductHandler handler,
ProductId _productId,
FPUnsigned _liquidationThreshold
) internal

Parameters

NameTypeDescription
handlercontract IExchangeProductHandler
_productIdProductIdProduct to change
_liquidationThresholdFPUnsignedSee IDomFiPerp.Product.liquidationThreshold

updateProductFundingExponent

Set product funding exponent. Funding rate is (productExposure / maxExposure) ^ fundingExponent * fundingMultiplier

function updateProductFundingExponent(
contract IExchangeProductHandler handler,
ProductId _productId,
FPUnsigned _fundingExponent
) internal
Dev note

Set to 1 to "disable".

Parameters

NameTypeDescription
handlercontract IExchangeProductHandler
_productIdProductIdID of product to change funding exponent
_fundingExponentFPUnsignedNew funding exponent. Must be > 0