FeeConfiguration(struct AdaptiveFee.Configuration)
Name | Type | Description |
---|---|---|
timepoints(uint256)
view external
Returns data belonging to a certain timepoint
Name | Type | Description |
---|---|---|
Returns:
Name | Type | Description |
---|---|---|
initialize(uint32,int24)
external
Initialize the dataStorage array by writing the first slot. Called once for the lifecycle of the timepoints array
getSingleTimepoint(uint32,uint32,int24,uint16,uint128)
view external
Returns:
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(uint32,int24,uint16,uint128)
view external
Returns average volatility in the range from time-WINDOW to time
Returns:
write(uint16,uint32,int24,uint128,uint128)
external
Writes an dataStorage timepoint to the array
Returns:
changeFeeConfiguration(struct AdaptiveFee.Configuration)
external
Changes fee configuration for the pool
calculateVolumePerLiquidity(uint128,int256,int256)
pure external
Calculates gmean(volume/liquidity) for block
Returns:
window()
view external
Returns:
getFee(uint32,int24,uint16,uint128)
view external
Calculates fee based on combination of sigmoids
Returns:
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
feeConfig
struct AdaptiveFee.Configuration
index
uint256
The index of timepoint in the array
initialized
bool
blockTimestamp
uint32
tickCumulative
int56
secondsPerLiquidityCumulative
uint160
volatilityCumulative
uint88
averageTick
int24
volumePerLiquidityCumulative
uint144
time
uint32
The time of the dataStorage initialization, via block.timestamp truncated to uint32
tick
int24
Initial tick
time
uint32
The current block timestamp
secondsAgo
uint32
The amount of time to look back, in seconds, at which point to return an timepoint
tick
int24
The current tick
index
uint16
The index of the timepoint that was most recently written to the timepoints array
liquidity
uint128
The current in-range pool liquidity
tickCumulative
int56
secondsPerLiquidityCumulative
uint160
volatilityCumulative
uint112
volumePerAvgLiquidity
uint256
time
uint32
The current block.timestamp
secondsAgos
uint32[]
Each amount of time to look back, in seconds, at which point to return an timepoint
tick
int24
The current tick
index
uint16
The index of the timepoint that was most recently written to the timepoints array
liquidity
uint128
The current in-range pool liquidity
tickCumulatives
int56[]
secondsPerLiquidityCumulatives
uint160[]
volatilityCumulatives
uint112[]
volumePerAvgLiquiditys
uint256[]
time
uint32
The current block.timestamp
tick
int24
The current tick
index
uint16
The index of the timepoint that was most recently written to the timepoints array
liquidity
uint128
The current in-range pool liquidity
TWVolatilityAverage
uint112
TWVolumePerLiqAverage
uint256
index
uint16
The index of the timepoint that was most recently written to the timepoints array
blockTimestamp
uint32
The timestamp of the new timepoint
tick
int24
The active tick at the time of the new timepoint
liquidity
uint128
The total in-range liquidity at the time of the new timepoint
volumePerLiquidity
uint128
The gmean(volumes)/liquidity at the time of the new timepoint
indexUpdated
uint16
feeConfig
struct AdaptiveFee.Configuration
liquidity
uint128
The current in-range pool liquidity
amount0
int256
Total amount of swapped token0
amount1
int256
Total amount of swapped token1
volumePerLiquidity
uint128
windowLength
uint32
time
uint32
The current block.timestamp
tick
int24
The current tick
index
uint16
The index of the timepoint that was most recently written to the timepoints array
liquidity
uint128
The current in-range pool liquidity
fee
uint16