Skip to main content
The MarketThree.calcGlobalFeeRate() static method calculates the global fee rate and total value locked (TVL) metrics by comparing two market snapshots taken at different times.

Usage

Parameters

MarketSnapshotData Type

Returns

Returns an object with:

Calculation Details

The method performs the following calculations:
  1. Calculate PT fees in base token:
  2. Calculate SY fees in base token:
  3. Calculate TVL:
  4. Calculate total fee rate:
The PT price is calculated using time decay based on the time remaining until market expiration.