Functions
_blockTimestamp
_advancePeriod
snapshotCumulativesInside
Parameters:
Return Values:
observe
secondsAgo from the current block timestamp
To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing
the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,
you must call it with secondsAgos = [3600, 0].
The time weighted average tick represents the geometric time weighted average price of the pool, in
log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.
Parameters:
Return Values:
timestamp
increaseObservationCardinalityNext
Parameters:
initialize
Parameters:
mint
index parameter distinguishes multiple positions by the same owner at the same tick range, and is included in the position key hash: keccak256(abi.encodePacked(owner, index, tickLower, tickUpper)).
Parameters:
Return Values:
collect
Parameters:
Return Values:
burn
Parameters:
Return Values:
swap
Parameters:
Return Values:
flash
Parameters:
setFee
Parameters:
setFeeProtocol
IRamsesV3Factory.poolFeeProtocol(address(this)).
collectProtocol
Parameters:
Return Values:
Ramses-Specific State
grossFeeGrowthGlobal0X128
grossFeeGrowthGlobal1X128
periods
The pool maintains an array of period snapshots for weekly epoch-based accounting. Each period contains cumulative data used by GaugeV3 to distribute rewards proportionally to liquidity providers based on their time-weighted in-range contribution during each period.Storage
RamsesV3Pool uses ERC-7201 namespaced storage via thePoolStorage library. All pool state is stored in a structured namespace rather than raw storage slots, improving upgradeability and avoiding storage collisions.
Position keys are computed as: keccak256(abi.encodePacked(owner, index, tickLower, tickUpper)) — note the extra index parameter compared to Uniswap V3.