IMarketRegistry

  struct MarketInfo(
    address pool
    uint24 exchangeFeeRatio
    uint24 uniswapFeeRatio
    uint24 insuranceFundFeeRatio
    uint24 maxPriceSpreadRatio
  )

  function getPool(
    address baseToken
  ) external returns (address pool)

Get the pool address (UNIv3 pool) by given base token address

Parameters:arrow-up-right

Name
Type
Description

baseToken

address

The address of the base token

Return Values:arrow-up-right

Name
Type
Description

pool

address

The address of the pool

Get the fee ratio of a given market

The ratio is in 1e6 format, that means 1% = 1e4

Parameters:arrow-up-right

Name
Type
Description

baseToken

address

The address of the base token

Return Values:arrow-up-right

Name
Type
Description

feeRatio

uint24

The fee ratio of the market, it is a decimal in 1e6

getInsuranceFundFeeRatioarrow-up-right

Get the insurance fund fee ratio of a given market

The ratio is in 1e6 format, that means 1% = 1e4

Parameters:arrow-up-right

Name
Type
Description

baseToken

address

The address of the base token

Return Values:arrow-up-right

Name
Type
Description

feeRatio

uint24

The fee ratio of the market, it is a decimal in 1e6

getMarketInfoarrow-up-right

Get the market info by given base token address

Parameters:arrow-up-right

Name
Type
Description

baseToken

address

The address of the base token

Return Values:arrow-up-right

Name
Type
Description

info

struct IMarketRegistry.MarketInfo

The market info encoded as MarketInfo

getMarketInfoByTraderarrow-up-right

Get the market info by given trader address and base token address

Parameters:arrow-up-right

Name
Type
Description

trader

address

The address of the trader

baseToken

address

The address of the base token

Return Values:arrow-up-right

Name
Type
Description

info

struct IMarketRegistry.MarketInfo

The market info encoded as MarketInfo

getQuoteTokenarrow-up-right

Get the quote token address

Return Values:arrow-up-right

Name
Type
Description

quoteToken

address

The address of the quote token

getUniswapV3Factoryarrow-up-right

Get Uniswap factory address

Return Values:arrow-up-right

Name
Type
Description

factory

address

The address of the Uniswap factory

getMaxOrdersPerMarketarrow-up-right

Get max allowed orders per market

Return Values:arrow-up-right

Name
Type
Description

maxOrdersPerMarket

uint8

The max allowed orders per market

Check if a pool exist by given base token address

Return Values:arrow-up-right

Name
Type
Description

hasPool

bool

True if the pool exist, false otherwise

getMarketMaxPriceSpreadRatioarrow-up-right

Return Values:arrow-up-right

Name
Type
Description

marketMaxPriceSpreadRatio

uint24

Max price spread ratio of the market

Emitted when a new market is created.

Parameters:arrow-up-right

Name
Type
Description

baseToken

address

The address of the base token

feeRatio

uint24

Fee ratio of the market

pool

address

The address of the pool

FeeRatioChangedarrow-up-right

Emitted when the fee ratio of a market is updated.

Parameters:arrow-up-right

Name
Type
Description

baseToken

address

The address of the base token

feeRatio

uint24

Fee ratio of the market

InsuranceFundFeeRatioChangedarrow-up-right

Emitted when the insurance fund fee ratio is updated.

Parameters:arrow-up-right

Name
Type
Description

baseToken

address

The address of the base token

feeRatio

uint24

Insurance fund fee ratio

MaxOrdersPerMarketChangedarrow-up-right

Emitted when the max orders per market is updated.

Parameters:arrow-up-right

Name
Type
Description

maxOrdersPerMarket

uint8

Max orders per market

MarketMaxPriceSpreadRatioChangedarrow-up-right

Emitted when the max market price spread ratio is updated.

Parameters:arrow-up-right

Name
Type
Description

baseToken

address

The address of the base token

spreadRatio

uint24

Max market price spread ratio

FeeDiscountRatioChangedarrow-up-right

Emitted when the trader's fee discount ratio gets updated.

Parameters:arrow-up-right

Name
Type
Description

trader

address

The address of the trader

discountRatio

uint24

Fee discount ratio (percent-off)

Last updated