Skip to main content

VaultEarningDistributorBase.sol

VaultEarningDistributorBase

factory

contract IChromaticMarketFactory factory

OnlyAccessableByDao

error OnlyAccessableByDao()

Throws an error indicating that the caller is not the DAO.

OnlyAccessableByVault

error OnlyAccessableByVault()

Throws an error indicating that the caller is not the chromatch vault contract.

ExistMakerEarningDistributionTask

error ExistMakerEarningDistributionTask()

Throws an error indicating that a maker earning distribution task already exists.

ExistMarketEarningDistributionTask

error ExistMarketEarningDistributionTask()

Throws an error indicating that a market earning distribution task already exists.

onlyDao

modifier onlyDao()

Modifier to restrict access to only the DAO. Throws an OnlyAccessableByDao error if the caller is not the DAO.

onlyVault

modifier onlyVault()

Modifier to restrict a function to be called only by the vault contract. Throws an OnlyAccessableByVault error if the caller is not the chromatic vault contract.

constructor

constructor(contract IChromaticMarketFactory _factory) internal

distributeMakerEarning

function distributeMakerEarning(address token) public

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

  • Parameters:

    NameTypeDescription
    tokenaddressThe address of the settlement token.

distributeMarketEarning

function distributeMarketEarning(address market) public

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

  • Parameters:

    NameTypeDescription
    marketaddressThe address of the market.

_getFeeInfo

function _getFeeInfo() internal view virtual returns (uint256 fee, address feePayee)

_makerEarningDistributable

function _makerEarningDistributable(address token) internal view returns (bool)

Internal function to check if the maker earning is distributable for a token.

  • Parameters:

    NameTypeDescription
    tokenaddressThe address of the settlement token.
  • Return Values:

    NameTypeDescription
    [0]boolTrue if the maker earning is distributable, False otherwise.

_marketEarningDistributable

function _marketEarningDistributable(address market) internal view returns (bool)

Internal function to check if the market earning is distributable for a market.

  • Parameters:

    NameTypeDescription
    marketaddressThe address of the market.
  • Return Values:

    NameTypeDescription
    [0]boolTrue if the market earning is distributable, False otherwise.