Skip to main content

IChromaticVault.sol

IChromaticVault

Interface for the Chromatic Vault contract.

MarketEarningAccumulated

event MarketEarningAccumulated(address market, uint256 earning)

Emitted when market earning is accumulated.

  • Parameters:

    NameTypeDescription
    marketaddressThe address of the market.
    earninguint256The amount of earning accumulated.

MakerEarningDistributed

event MakerEarningDistributed(address token, uint256 earning, uint256 usedKeeperFee)

Emitted when maker earning is distributed.

  • Parameters:

    NameTypeDescription
    tokenaddressThe address of the settlement token.
    earninguint256The amount of earning distributed.
    usedKeeperFeeuint256The amount of keeper fee used.

MarketEarningDistributed

event MarketEarningDistributed(address market, uint256 earning, uint256 usedKeeperFee, uint256 marketBalance)

Emitted when market earning is distributed.

  • Parameters:

    NameTypeDescription
    marketaddressThe address of the market.
    earninguint256The amount of earning distributed.
    usedKeeperFeeuint256The amount of keeper fee used.
    marketBalanceuint256The balance of the market.

VaultEarningDistributorSet

event VaultEarningDistributorSet(address vaultEarningDistributor, address oldVaultEarningDistributor)

Emitted when the vault earning distributor address is set.

  • Parameters:

    NameTypeDescription
    vaultEarningDistributoraddressThe vault earning distributor address.
    oldVaultEarningDistributoraddressThe old vault earning distributor address.

setVaultEarningDistributor

function setVaultEarningDistributor(address _earningDistributor) external

pendingMakerEarnings

function pendingMakerEarnings(address token) external view returns (uint256)

pendingMarketEarnings

function pendingMarketEarnings(address market) external view returns (uint256)

createMakerEarningDistributionTask

function createMakerEarningDistributionTask(address token) external

Creates a maker earning distribution task for a token.

  • Parameters:

    NameTypeDescription
    tokenaddressThe address of the settlement token.

cancelMakerEarningDistributionTask

function cancelMakerEarningDistributionTask(address token) external

Cancels a maker earning distribution task for a token.

  • Parameters:

    NameTypeDescription
    tokenaddressThe address of the settlement token.

distributeMakerEarning

function distributeMakerEarning(address token, uint256 fee, address keeper) external

Distributes the maker earning for a token to the each markets.

  • Parameters:

    NameTypeDescription
    tokenaddressThe address of the settlement token.
    feeuint256The keeper fee amount.
    keeperaddressThe keeper address to receive fee.

createMarketEarningDistributionTask

function createMarketEarningDistributionTask(address market) external

Creates a market earning distribution task for a market.

  • Parameters:

    NameTypeDescription
    marketaddressThe address of the market.

cancelMarketEarningDistributionTask

function cancelMarketEarningDistributionTask(address market) external

Cancels a market earning distribution task for a market.

  • Parameters:

    NameTypeDescription
    marketaddressThe address of the market.

distributeMarketEarning

function distributeMarketEarning(address market, uint256 fee, address keeper) external

Distributes the market earning for a market to the each bins.

  • Parameters:

    NameTypeDescription
    marketaddressThe address of the market.
    feeuint256The fee amount.
    keeperaddressThe keeper address to receive fee.

acquireTradingLock

function acquireTradingLock() external

releaseTradingLock

function releaseTradingLock() external