IMarketRegistry
MarketInfo
Functions
getPool
Get the pool address (UNIv3 pool) by given base token address
Parameters:
Name | Type | Description |
---|---|---|
| address | The address of the base token |
Return Values:
Name | Type | Description |
---|---|---|
| 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 |
---|---|---|
| address | The address of the base token |
Return Values:
Name | Type | Description |
---|---|---|
| uint24 | The fee ratio of the market, it is a decimal in |
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 |
---|---|---|
| address | The address of the base token |
Return Values:
Name | Type | Description |
---|---|---|
| uint24 | The fee ratio of the market, it is a decimal in |
getMarketInfo
Get the market info by given base token address
Parameters:
Name | Type | Description |
---|---|---|
| address | The address of the base token |
Return Values:
Name | Type | Description |
---|---|---|
| struct IMarketRegistry.MarketInfo | The market info encoded as |
getMarketInfoByTrader
Get the market info by given trader address and base token address
Parameters:
Name | Type | Description |
---|---|---|
| address | The address of the trader |
| address | The address of the base token |
Return Values:
Name | Type | Description |
---|---|---|
| struct IMarketRegistry.MarketInfo | The market info encoded as |
getQuoteToken
Get the quote token address
Return Values:
Name | Type | Description |
---|---|---|
| address | The address of the quote token |
getUniswapV3Factory
Get Uniswap factory address
Return Values:
Name | Type | Description |
---|---|---|
| address | The address of the Uniswap factory |
getMaxOrdersPerMarket
Get max allowed orders per market
Return Values:
Name | Type | Description |
---|---|---|
| uint8 | The max allowed orders per market |
hasPool
Check if a pool exist by given base token address
Return Values:
Name | Type | Description |
---|---|---|
| bool | True if the pool exist, false otherwise |
getMarketMaxPriceSpreadRatio
Return Values:
Name | Type | Description |
---|---|---|
| uint24 | Max price spread ratio of the market |
Events
PoolAdded
Emitted when a new market is created.
Parameters:
Name | Type | Description |
---|---|---|
| address | The address of the base token |
| uint24 | Fee ratio of the market |
| address | The address of the pool |
FeeRatioChanged
Emitted when the fee ratio of a market is updated.
Parameters:
Name | Type | Description |
---|---|---|
| address | The address of the base token |
| uint24 | Fee ratio of the market |
InsuranceFundFeeRatioChanged
Emitted when the insurance fund fee ratio is updated.
Parameters:
Name | Type | Description |
---|---|---|
| address | The address of the base token |
| uint24 | Insurance fund fee ratio |
MaxOrdersPerMarketChanged
Emitted when the max orders per market is updated.
Parameters:
Name | Type | Description |
---|---|---|
| uint8 | Max orders per market |
MarketMaxPriceSpreadRatioChanged
Emitted when the max market price spread ratio is updated.
Parameters:
Name | Type | Description |
---|---|---|
| address | The address of the base token |
| uint24 | Max market price spread ratio |
FeeDiscountRatioChanged
Emitted when the trader's fee discount ratio gets updated.
Parameters:
Name | Type | Description |
---|---|---|
| address | The address of the trader |
| uint24 | Fee discount ratio (percent-off) |
Last updated