ExchangeProductHandler
ExchangeProductHandler
Addresses
Chain | Address |
---|---|
Arbitrum Sepolia | 0xC1A905F7502B2F00C3EE002D895c575a9A467ed4 |
Base Sepolia | 0x4f0F45b00f79b72b469b31373b8B5CeF9ECeb946 |
Base Mainnet | 0xf079b44B0E7C256E1b13fB8D5b572D7337Bf0Cb8 |
Functions
initialize
function initialize(struct StorageInstance app_) external
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
Dev note
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 |
_emitAdd
function _emitAdd(ProductId _productId, struct ProductPtr _product) internal
_emitUpdate
function _emitUpdate(ProductId _productId, struct ProductPtr _product) internal