IExchangeProductHandler
IExchangeProductHandler
Addresses
Chain | Address |
---|
Functions
addProduct
Add a new product
function addProduct(struct IExchangeDomain.ProductParams _product) external
Parameters
Name | Type | Description |
---|---|---|
_product | struct IExchangeDomain.ProductParams | See IDomFiPerp.ProductParams |
updateProductMaxLeverage
Update the max leverage of a product
function updateProductMaxLeverage(ProductId _productId, FPUnsigned _maxLeverage) external
Parameters
Name | Type | Description |
---|---|---|
_productId | ProductId | Product to change |
_maxLeverage | FPUnsigned | See IDomFiPerp.Product.maxLeverage |
updateProductFee
Update the base trade fee for a product
function updateProductFee(ProductId _productId, FPUnsigned _fee) external
Parameters
Name | Type | Description |
---|---|---|
_productId | ProductId | Product to change |
_fee | FPUnsigned | See IDomFiPerp.Product.fee |
updateProductActive
Enable or disable a product
function updateProductActive(ProductId _productId, bool _isActive) external
Parameters
Name | Type | Description |
---|---|---|
_productId | ProductId | Product to (de)activate |
_isActive | bool | IDomFiPerp.Product.isActive |
updateProductMinPriceChange
Update the minimum price change for positions on a product.
function updateProductMinPriceChange(ProductId _productId, FPUnsigned _minPriceChange) external
Parameters
Name | Type | Description |
---|---|---|
_productId | ProductId | Product to change |
_minPriceChange | FPUnsigned | See IDomFiPerp.Product.minPriceChange |
updateProductLiquidationBounty
Update the liquidation bounty for positions on a product
function updateProductLiquidationBounty(ProductId _productId, FPUnsigned _liquidationBounty) external
Parameters
Name | Type | Description |
---|---|---|
_productId | ProductId | Product to change |
_liquidationBounty | FPUnsigned | See IDomFiPerp.Product.liquidationBounty |
updateProductExposureMultiplier
Update a product's exposure multiplier
function updateProductExposureMultiplier(ProductId _productId, FPUnsigned _exposureMultiplier) external
Parameters
Name | Type | Description |
---|---|---|
_productId | ProductId | Product to change |
_exposureMultiplier | FPUnsigned | See IDomFiPerp.Product.exposureMultiplier |
updateProductReserveMultiplier
Update a product's reserve multiplier
function updateProductReserveMultiplier(ProductId _productId, FPUnsigned _reserveMultiplier) external
Parameters
Name | Type | Description |
---|---|---|
_productId | ProductId | Product to change |
_reserveMultiplier | FPUnsigned | See IDomFiPerp.Product.reserveMultiplier |
updateProductWeight
Update a product's weight for exposure calculations
function updateProductWeight(ProductId _productId, FPUnsigned _weight) external
Parameters
Name | Type | Description |
---|---|---|
_productId | ProductId | Product to change |
_weight | FPUnsigned | See IDomFiPerp.Product.weight |
updateProductLiquidationThreshold
Update the liquidation threshold for positions on a product
function updateProductLiquidationThreshold(ProductId _productId, FPUnsigned _liquidationThreshold) external
Parameters
Name | Type | Description |
---|---|---|
_productId | ProductId | Product to change |
_liquidationThreshold | FPUnsigned | See IDomFiPerp.Product.liquidationThreshold |
updateProductFundingExponent
Set product funding exponent. Funding rate is (productExposure / maxExposure) ^ fundingExponent * fundingMultiplier
function updateProductFundingExponent(ProductId _productId, FPUnsigned _fundingExponent) external
Set to 1 to "disable".
Parameters
Name | Type | Description |
---|---|---|
_productId | ProductId | ID of product to change funding exponent |
_fundingExponent | FPUnsigned | New funding exponent. Must be > 0 |
ExchangeProductDelegate
Addresses
Chain | Address |
---|
Functions
addProduct
Add a new product
function addProduct(
contract IExchangeProductHandler handler,
struct IExchangeDomain.ProductParams _product
) internal
Parameters
Name | Type | Description |
---|---|---|
handler | contract IExchangeProductHandler | |
_product | struct IExchangeDomain.ProductParams | See IDomFiPerp.ProductParams |
updateProductMaxLeverage
Update the max leverage of a product
function updateProductMaxLeverage(
contract IExchangeProductHandler handler,
ProductId _productId,
FPUnsigned _maxLeverage
) internal
Parameters
Name | Type | Description |
---|---|---|
handler | contract IExchangeProductHandler | |
_productId | ProductId | Product to change |
_maxLeverage | FPUnsigned | See IDomFiPerp.Product.maxLeverage |
updateProductFee
Update the base trade fee for a product
function updateProductFee(
contract IExchangeProductHandler handler,
ProductId _productId,
FPUnsigned _fee
) internal
Parameters
Name | Type | Description |
---|---|---|
handler | contract IExchangeProductHandler | |
_productId | ProductId | Product to change |
_fee | FPUnsigned | See IDomFiPerp.Product.fee |
updateProductActive
Enable or disable a product
function updateProductActive(
contract IExchangeProductHandler handler,
ProductId _productId,
bool _isActive
) internal
Parameters
Name | Type | Description |
---|---|---|
handler | contract IExchangeProductHandler | |
_productId | ProductId | Product to (de)activate |
_isActive | bool | IDomFiPerp.Product.isActive |
updateProductMinPriceChange
Update the minimum price change for positions on a product.
function updateProductMinPriceChange(
contract IExchangeProductHandler handler,
ProductId _productId,
FPUnsigned _minPriceChange
) internal
Parameters
Name | Type | Description |
---|---|---|
handler | contract IExchangeProductHandler | |
_productId | ProductId | Product to change |
_minPriceChange | FPUnsigned | See IDomFiPerp.Product.minPriceChange |
updateProductLiquidationBounty
Update the liquidation bounty for positions on a product
function updateProductLiquidationBounty(
contract IExchangeProductHandler handler,
ProductId _productId,
FPUnsigned _liquidationBounty
) internal
Parameters
Name | Type | Description |
---|---|---|
handler | contract IExchangeProductHandler | |
_productId | ProductId | Product to change |
_liquidationBounty | FPUnsigned | See IDomFiPerp.Product.liquidationBounty |
updateProductExposureMultiplier
Update a product's exposure multiplier
function updateProductExposureMultiplier(
contract IExchangeProductHandler handler,
ProductId _productId,
FPUnsigned _exposureMultiplier
) internal
Parameters
Name | Type | Description |
---|---|---|
handler | contract IExchangeProductHandler | |
_productId | ProductId | Product to change |
_exposureMultiplier | FPUnsigned | See IDomFiPerp.Product.exposureMultiplier |
updateProductReserveMultiplier
Update a product's reserve multiplier
function updateProductReserveMultiplier(
contract IExchangeProductHandler handler,
ProductId _productId,
FPUnsigned _reserveMultiplier
) internal
Parameters
Name | Type | Description |
---|---|---|
handler | contract IExchangeProductHandler | |
_productId | ProductId | Product to change |
_reserveMultiplier | FPUnsigned | See IDomFiPerp.Product.reserveMultiplier |
updateProductWeight
Update a product's weight for exposure calculations
function updateProductWeight(
contract IExchangeProductHandler handler,
ProductId _productId,
FPUnsigned _weight
) internal
Parameters
Name | Type | Description |
---|---|---|
handler | contract IExchangeProductHandler | |
_productId | ProductId | Product to change |
_weight | FPUnsigned | See IDomFiPerp.Product.weight |
updateProductLiquidationThreshold
Update the liquidation threshold for positions on a product
function updateProductLiquidationThreshold(
contract IExchangeProductHandler handler,
ProductId _productId,
FPUnsigned _liquidationThreshold
) internal
Parameters
Name | Type | Description |
---|---|---|
handler | contract IExchangeProductHandler | |
_productId | ProductId | Product to change |
_liquidationThreshold | FPUnsigned | See 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
Set to 1 to "disable".
Parameters
Name | Type | Description |
---|---|---|
handler | contract IExchangeProductHandler | |
_productId | ProductId | ID of product to change funding exponent |
_fundingExponent | FPUnsigned | New funding exponent. Must be > 0 |