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
ammamm addressmarkPricemark price (perp price)indexPriceindex price (spot price)premiumFractionpremium fraction. refer to technical docs for deeper divepremiumFractionPerSharepremium fraction per share
Tip: The funding rate can be calculated by doing premiumFraction/indexPrice (multiply by 100 to express in %)
