API Reference

This is the funding event. Emitted during each funding settlement. Note funding settlement settled the funds between clearing house and insurance fund based on the funding rate.

This funding payment is applied to trader positions (added to margin) when they trade, for that refer to PositionChanged:fundingPayment field

event FundingSettled(
        IAMM indexed amm,
        uint256 markPrice,
        uint256 indexPrice,
        int256 premiumFraction,
        int256 premiumFractionPerShare
    );

params

  • amm amm address
  • markPrice mark price (perp price)
  • indexPrice index price (spot price)
  • premiumFraction premium fraction. refer to technical docs for deeper dive
  • premiumFractionPerShare premium fraction per share

Tip: The funding rate can be calculated by doing premiumFraction/indexPrice (multiply by 100 to express in %)