MarketRegistry

  function initialize(
  ) external

  function addPool(
  ) external returns (address)

  function setFeeRatio(
  ) external

setInsuranceFundFeeRatioarrow-up-right

  function setInsuranceFundFeeRatio(
  ) external

setMaxOrdersPerMarketarrow-up-right

  function setMaxOrdersPerMarket(
  ) external

setMarketMaxPriceSpreadRatioarrow-up-right

setFeeDiscountRatioarrow-up-right

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

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

getMarketMaxPriceSpreadRatioarrow-up-right

if we didn't set the max spread ratio for the market, we will use the default value

Return Values:arrow-up-right

Name
Type
Description

marketMaxPriceSpreadRatio

uint24

Max price spread ratio of the market

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

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

Last updated