Skip to main content
Deploys Ramses V3 pools and manages control over pool protocol fees. Uses the AccessHub pattern for governance instead of simple ownership.

Functions

createPool

Creates a pool for the given two tokens and tick spacing, optionally initializing it with a price tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. The fee is automatically derived from the tickSpacingInitialFee mapping. The call will revert if the pool already exists, the token arguments are invalid, or no fee has been enabled for the given tick spacing. If sqrtPriceX96 is non-zero, the pool will be initialized with that price.

Parameters:

Return Values:

enableTickSpacing

Enables a tick spacing with the given default fee Maps tick spacing values to their default fee amounts. This is the inverse of Uniswap V3’s enableFeeAmount. Only callable by governance (AccessHub).

Parameters:

setFeeProtocol

Sets the default protocol fee for all pools. Only callable by governance (AccessHub).

Parameters:

setPoolFeeProtocol

Sets the protocol fee for a specific pool. Only callable by governance (AccessHub). Pass type(uint24).max to revert the pool to the global default.

Parameters:

gaugeFeeSplitEnable

Enables gauge fee splitting for a pool. When called by the voter contract, sets the pool’s fee protocol to 100% so all fees route through the FeeCollector for distribution to voters. When called by other addresses, simply refreshes the pool’s fee protocol from the factory.

Parameters:

setFeeCollector

Updates the fee collector address. Only callable by governance (AccessHub).

Parameters:

setVoter

Updates the voter contract address. Only callable by governance (AccessHub).

Parameters:

setFee

Sets the swap fee for a specific pool. Only callable by governance (AccessHub).

Parameters:

State Variables

voter

Returns the address of the Voter contract used for gauge integration.

feeCollector

Returns the address of the FeeCollector contract that routes protocol fees.

feeProtocol

Returns the default protocol fee applied to pools that don’t have a pool-specific override.

tickSpacingInitialFee

Returns the default fee for a given tick spacing. Returns 0 if the tick spacing is not enabled.

poolFeeProtocol

Returns the effective protocol fee for a specific pool. Falls back to the global feeProtocol if no pool-specific override is set.

Events

PoolCreated

Emitted when a pool is created

Parameters:

TickSpacingEnabled

Emitted when a new tick spacing is enabled for pool creation via the factory

Parameters:

SetFeeProtocol

Emitted when the default protocol fee is changed

Parameters:

SetPoolFeeProtocol

Emitted when a pool-specific protocol fee is changed

Parameters:

FeeAdjustment

Emitted when a pool’s swap fee is changed

Parameters:

FeeCollectorChanged

Emitted when the fee collector address is changed

Parameters: