Skip to main content

ExchangeProductHandler

ExchangeProductHandler

Addresses

ChainAddress
Arbitrum Sepolia0xC1A905F7502B2F00C3EE002D895c575a9A467ed4
Base Sepolia0x4f0F45b00f79b72b469b31373b8B5CeF9ECeb946
Base Mainnet0xf079b44B0E7C256E1b13fB8D5b572D7337Bf0Cb8

Functions

initialize

function initialize(struct StorageInstance app_) external

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

_emitAdd

function _emitAdd(ProductId _productId, struct ProductPtr _product) internal

_emitUpdate

function _emitUpdate(ProductId _productId, struct ProductPtr _product) internal