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