Skip to main content

IMarketEvents.sol

IMarketEvents

ProtocolFeeRateUpdated

event ProtocolFeeRateUpdated(uint16 protocolFeeRateOld, uint16 protocolFeeRateNew)

Emitted when the protocol fee rate of the market is changed

  • Parameters:

    NameTypeDescription
    protocolFeeRateOlduint16The previous value of the protocol fee rate
    protocolFeeRateNewuint16The updated value of the protocol fee rate

PositionModeUpdated

event PositionModeUpdated(enum PositionMode positionModeOld, enum PositionMode positionModeNew)

Emitted when the position mode of the market is changed

  • Parameters:

    NameTypeDescription
    positionModeOldenum PositionModeThe previous value of the position mode
    positionModeNewenum PositionModeThe updated value of the position mode

LiquidityModeUpdated

event LiquidityModeUpdated(enum LiquidityMode liquidityModeOld, enum LiquidityMode liquidityModeNew)

Emitted when the liquidity mode of the market is changed

  • Parameters:

    NameTypeDescription
    liquidityModeOldenum LiquidityModeThe previous value of the liquidity mode
    liquidityModeNewenum LiquidityModeThe updated value of the liquidity mode

DisplayModeUpdated

event DisplayModeUpdated(enum DisplayMode displayModeOld, enum DisplayMode displayModeNew)

Emitted when the display mode of the market is changed

  • Parameters:

    NameTypeDescription
    displayModeOldenum DisplayModeThe previous value of the display mode
    displayModeNewenum DisplayModeThe updated value of the display mode

AddLiquidity

event AddLiquidity(struct LpReceipt receipt)

Emitted when liquidity is added to the market.

  • Parameters:

    NameTypeDescription
    receiptstruct LpReceiptThe liquidity receipt.

AddLiquidityBatch

event AddLiquidityBatch(struct LpReceipt[] receipts)

Emitted when liquidity is added to the market.

  • Parameters:

    NameTypeDescription
    receiptsstruct LpReceipt[]An array of LP receipts.

ClaimLiquidity

event ClaimLiquidity(struct LpReceipt receipt, uint256 clbTokenAmount)

Emitted when liquidity is claimed from the market.

  • Parameters:

    NameTypeDescription
    receiptstruct LpReceiptThe liquidity receipt.
    clbTokenAmountuint256The amount of CLB tokens claimed.

ClaimLiquidityBatch

event ClaimLiquidityBatch(struct LpReceipt[] receipts, uint256[] clbTokenAmounts)

Emitted when liquidity is claimed from the market.

  • Parameters:

    NameTypeDescription
    receiptsstruct LpReceipt[]An array of LP receipts.
    clbTokenAmountsuint256[]The amount list of CLB tokens claimed.

RemoveLiquidity

event RemoveLiquidity(struct LpReceipt receipt)

Emitted when liquidity is removed from the market.

  • Parameters:

    NameTypeDescription
    receiptstruct LpReceiptThe liquidity receipt.

RemoveLiquidityBatch

event RemoveLiquidityBatch(struct LpReceipt[] receipts)

Emitted when liquidity is removed from the market.

  • Parameters:

    NameTypeDescription
    receiptsstruct LpReceipt[]An array of LP receipts.

WithdrawLiquidity

event WithdrawLiquidity(struct LpReceipt receipt, uint256 amount, uint256 burnedCLBTokenAmount)

Emitted when liquidity is withdrawn from the market.

  • Parameters:

    NameTypeDescription
    receiptstruct LpReceiptThe liquidity receipt.
    amountuint256The amount of liquidity withdrawn.
    burnedCLBTokenAmountuint256The amount of burned CLB tokens.

WithdrawLiquidityBatch

event WithdrawLiquidityBatch(struct LpReceipt[] receipts, uint256[] amounts, uint256[] burnedCLBTokenAmounts)

Emitted when liquidity is withdrawn from the market.

  • Parameters:

    NameTypeDescription
    receiptsstruct LpReceipt[]An array of LP receipts.
    amountsuint256[]The amount list of liquidity withdrawn.
    burnedCLBTokenAmountsuint256[]The amount list of burned CLB tokens.

OpenPosition

event OpenPosition(address account, struct Position position)

Emitted when a position is opened.

  • Parameters:

    NameTypeDescription
    accountaddressThe address of the account opening the position.
    positionstruct PositionThe opened position.

ClosePosition

event ClosePosition(address account, struct Position position)

Emitted when a position is closed.

  • Parameters:

    NameTypeDescription
    accountaddressThe address of the account closing the position.
    positionstruct PositionThe closed position.

ClaimPosition

event ClaimPosition(address account, int256 pnl, uint256 interest, struct Position position)

Emitted when a position is claimed.

  • Parameters:

    NameTypeDescription
    accountaddressThe address of the account claiming the position.
    pnlint256The profit or loss of the claimed position.
    interestuint256The interest paid for the claimed position.
    positionstruct PositionThe claimed position.

ClaimPositionByKeeper

event ClaimPositionByKeeper(address account, int256 pnl, uint256 interest, uint256 usedKeeperFee, struct Position position)

Emitted when a position is claimed by keeper.

  • Parameters:

    NameTypeDescription
    accountaddressThe address of the account claiming the position.
    pnlint256The profit or loss of the claimed position.
    interestuint256The interest paid for the claimed position.
    usedKeeperFeeuint256The amount of keeper fee used for the liquidation.
    positionstruct PositionThe claimed position.

Liquidate

event Liquidate(address account, int256 pnl, uint256 interest, uint256 usedKeeperFee, struct Position position)

Emitted when a position is liquidated.

  • Parameters:

    NameTypeDescription
    accountaddressThe address of the account being liquidated.
    pnlint256The profit or loss of the claimed position.
    interestuint256The interest paid for the claimed position.
    usedKeeperFeeuint256The amount of keeper fee used for the liquidation.
    positionstruct PositionThe liquidated position.