DataStorageOperator
Modifiers
onlyPool
Variables
struct DataStorage.Timepoint[65536] timepoints
struct AdaptiveFee.Configuration feeConfig
Functions
constructor
constructor(address)
public
initialize
onlyPool
initialize(uint32,int24)
external
Initialize the dataStorage array by writing the first slot. Called once for the lifecycle of the timepoints array
changeFeeConfiguration
changeFeeConfiguration(struct AdaptiveFee.Configuration)
external
Changes fee configuration for the pool
getSingleTimepoint
onlyPool
getSingleTimepoint(uint32,uint32,int24,uint16,uint128)
view external
Returns:
getTimepoints
onlyPool
getTimepoints(uint32,uint32[],int24,uint16,uint128)
view external
Returns the accumulator values as of each time seconds ago from the given time in the array of `secondsAgos`
Returns:
getAverages
onlyPool
getAverages(uint32,int24,uint16,uint128)
view external
Returns average volatility in the range from time-WINDOW to time
Returns:
write
onlyPool
write(uint16,uint32,int24,uint128,uint128)
external
Writes an dataStorage timepoint to the array
Returns:
calculateVolumePerLiquidity
calculateVolumePerLiquidity(uint128,int256,int256)
pure external
Calculates gmean(volume/liquidity) for block
Returns:
window
window()
pure external
Returns:
getFee
onlyPool
getFee(uint32,int24,uint16,uint128)
view external
Calculates fee based on combination of sigmoids
Returns: