MarketRegistry

Functions

initialize

  function initialize(
  ) external

addPool

  function addPool(
  ) external returns (address)

setFeeRatio

  function setFeeRatio(
  ) external

setInsuranceFundFeeRatio

  function setInsuranceFundFeeRatio(
  ) external

setMaxOrdersPerMarket

  function setMaxOrdersPerMarket(
  ) external

setMarketMaxPriceSpreadRatio

setFeeDiscountRatio

getQuoteToken

Get the quote token address

Return Values:

Name
Type
Description

quoteToken

address

The address of the quote token

getUniswapV3Factory

Get Uniswap factory address

Return Values:

Name
Type
Description

factory

address

The address of the Uniswap factory

getMaxOrdersPerMarket

Get max allowed orders per market

Return Values:

Name
Type
Description

maxOrdersPerMarket

uint8

The max allowed orders per market

getPool

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

Parameters:

Name
Type
Description

baseToken

address

The address of the base token

Return Values:

Name
Type
Description

pool

address

The address of the pool

getFeeRatio

Get the fee ratio of a given market

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

Parameters:

Name
Type
Description

baseToken

address

The address of the base token

Return Values:

Name
Type
Description

feeRatio

uint24

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

getInsuranceFundFeeRatio

Get the insurance fund fee ratio of a given market

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

Parameters:

Name
Type
Description

baseToken

address

The address of the base token

Return Values:

Name
Type
Description

feeRatio

uint24

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

getMarketMaxPriceSpreadRatio

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

Return Values:

Name
Type
Description

marketMaxPriceSpreadRatio

uint24

Max price spread ratio of the market

getMarketInfo

Get the market info by given base token address

Parameters:

Name
Type
Description

baseToken

address

The address of the base token

Return Values:

Name
Type
Description

info

struct IMarketRegistry.MarketInfo

The market info encoded as MarketInfo

getMarketInfoByTrader

hasPool

Check if a pool exist by given base token address

Return Values:

Name
Type
Description

hasPool

bool

True if the pool exist, false otherwise

Last updated

Was this helpful?