Skip to main content
The MarketThree.calculateHistoricalFeeApy() static method calculates the annualized fee APY (Annual Percentage Yield) based on historical fee growth data over a specific time period.

Usage

Parameters

Returns

Returns an object with:

Calculation Details

The APY calculation follows these steps:
  1. Calculate total fees earned using Q64.64 math:
  2. Calculate annualization factor:
  3. Calculate APY:
If avgLiquidity is 0 or hoursElapsed is 0, all return values will be 0.