LogoLogo
v3.0
v3.0
  • Introducing V3
  • V2/V3 Comparison
  • Protocol Overview
  • Protocol Repo
  • Contact Addresses
    • Mainnet Addresses
    • Arbitrum Addresses
    • Sepolia Addresses
  • Audit Reports
  • Bug Bounties
  • Core Contracts
    • NFTXVaultUpgradeableV3
    • NFTXVaultFactoryUpgradeableV3
    • NFTXFeeDistributorV3
    • NFTXInventoryStakingV3Upgradeable
    • UniswapV3PoolUpgradeable
    • UniswapV3FactoryUpgradeable
    • NonfungiblePositionManager
    • NFTXRouter
  • Zap Contracts
    • CreateVaultZap
    • MarketplaceUniversalRouterZap
    • MigratorZap
  • Periphery Contracts
    • UniswapV3Staker
  • Integrations
    • Introduction
    • Marketplace Integration
  • Miscellaneous
    • Project Background
    • Security History
    • Notes for Auditors
Powered by GitBook
On this page
  • Table of Contents
  • Variables
  • Events
  • Write Functions
  • Owner Functions
  • Read Functions
  1. Core Contracts

UniswapV3FactoryUpgradeable

UniswapV3FactoryUpgradeable.sol

Factory contract for creating AMM pools.

Table of Contents

Variables

feeDistributor feeAmountTickSpacing getPool rewardTierCardinality

Events

PoolCreated FeeAmountEnabled

Public Write Functions

createPool

Owner Write Functions

setFeeDistributor setRewardTierCardinality enableFeeAmount

Read Functions

owner

Variables

feeDistributor

function feeDistributor() external view returns (address)

Address of NFTXFeeDistributorV3.

feeAmountTickSpacing

function feeAmountTickSpacing(uint24 fee) external view returns (int24)

Tick spacing value for a given fee tier. Tick spacing is capped at 16384, which represents a >5x price change with ticks of 1 bip.

getPool

function getPool(
    address tokenA,
    address tokenB,
    uint24 fee
) external view returns (address pool)

Pool address for a given pair and fee, or 0 if the pool does not exist.

rewardTierCardinality

function rewardTierCardinality() external view returns (uint16)

The CardinalityNext value for the RewardFeeTier pools.

Events

PoolCreated

event PoolCreated(
    address indexed token0,
    address indexed token1,
    uint24 indexed fee,
    int24 tickSpacing,
    address pool
)

Emitted by createPool().

Parameters
Type
Description

token0

address

Address of token0.

token1

address

Address of token1.

fee

uint24

Fee tier of pool.

tickSpacing

int24

Tick spacing of pool.

pool

address

Address of pool.

FeeAmountEnabled

event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing)

Emitted by __UniswapV3FactoryUpgradeable_init() and enableFeeAmount().

Parameters
Type
Description

fee

uint24

New fee tier just added.

tickSpacing

int24

Tick spacing for the fee tier.

Write Functions

createPool

function createPool(
    address tokenA,
    address tokenB,
    uint24 fee
) external returns (address pool)

Deploys a new pool, using a BeaconProxy.

Parameters
Type
Description

tokenA

address

First token for pair.

tokenB

address

Second token for pair.

fee

uint24

Fee tier of pool. Must be one of the enabled fee tiers.

Return values
Type
Description

pool

address

Address of new pool.

Owner Functions

setFeeDistributor

function setFeeDistributor(address feeDistributor_) external

Sets the NFTXFeeDistributorV3 address.

Parameters
Type
Description

feeDistributor_

address

Updated address for fee distributor.

setRewardTierCardinality

function setRewardTierCardinality(
    uint16 rewardTierCardinality_
) external

Sets the CardinalityNext value for the RewardFeeTier pools.

Parameters
Type
Description

rewardTierCardinality_

uint16

New reward tier cardinality.

enableFeeAmount

function enableFeeAmount(uint24 fee, int24 tickSpacing) external

Enables a new fee amount option for pools, with a given tick spacing. Once enabled, fee amounts cannot be removed.

Parameters
Type
Description

fee

uint24

New fee tier being added.

tickSpacing

int24

Tick spacing for the new fee tier.

Read Functions

owner

function owner()
    public
    view
    returns (address)

Returns the contract owner.

Return values
Type
Description

unnamed

address

Address of contract owner

PreviousUniswapV3PoolUpgradeableNextNonfungiblePositionManager

Last updated 1 year ago