DexPublicViews ​
Abstract contract providing view functions for DEX public data
Functions ​
getDexPricesAndExchangePrices ​
Get the prices and exchange prices for a DEX
expected to be called via callStatic
function getDexPricesAndExchangePrices(address dex_) public returns (IFluidDexT1.PricesAndExchangePrice memory pex_);
Parameters
Name | Type | Description |
---|---|---|
dex_ | address | The address of the DEX |
Returns
Name | Type | Description |
---|---|---|
pex_ | IFluidDexT1.PricesAndExchangePrice | A struct containing prices and exchange prices |
getDexCollateralReserves ​
Get the collateral reserves for a DEX in token decimals amounts
expected to be called via callStatic
function getDexCollateralReserves(address dex_) public returns (IFluidDexT1.CollateralReserves memory reserves_);
Parameters
Name | Type | Description |
---|---|---|
dex_ | address | The address of the DEX |
Returns
Name | Type | Description |
---|---|---|
reserves_ | IFluidDexT1.CollateralReserves | A struct containing collateral reserve information |
getDexCollateralReservesAdjusted ​
Get the collateral reserves for a DEX scaled to 1e12
expected to be called via callStatic
function getDexCollateralReservesAdjusted(address dex_)
public
returns (IFluidDexT1.CollateralReserves memory reserves_);
Parameters
Name | Type | Description |
---|---|---|
dex_ | address | The address of the DEX |
Returns
Name | Type | Description |
---|---|---|
reserves_ | IFluidDexT1.CollateralReserves | A struct containing collateral reserve information |
getDexDebtReserves ​
Get the debt reserves for a DEX in token decimals amounts
expected to be called via callStatic
function getDexDebtReserves(address dex_) public returns (IFluidDexT1.DebtReserves memory reserves_);
Parameters
Name | Type | Description |
---|---|---|
dex_ | address | The address of the DEX |
Returns
Name | Type | Description |
---|---|---|
reserves_ | IFluidDexT1.DebtReserves | A struct containing debt reserve information |
getDexDebtReservesAdjusted ​
Get the debt reserves for a DEX scaled to 1e12
expected to be called via callStatic
function getDexDebtReservesAdjusted(address dex_) public returns (IFluidDexT1.DebtReserves memory reserves_);
Parameters
Name | Type | Description |
---|---|---|
dex_ | address | The address of the DEX |
Returns
Name | Type | Description |
---|---|---|
reserves_ | IFluidDexT1.DebtReserves | A struct containing debt reserve information |
_getDexCollateralReserves ​
Retrieves and normalizes the collateral reserves for a given DEX.
function _getDexCollateralReserves(address dex_, IFluidDexT1.PricesAndExchangePrice memory pex_)
internal
view
returns (IFluidDexT1.CollateralReserves memory reserves_);
Parameters
Name | Type | Description |
---|---|---|
dex_ | address | The address of the DEX. |
pex_ | IFluidDexT1.PricesAndExchangePrice | A struct containing price and exchange price information. |
Returns
Name | Type | Description |
---|---|---|
reserves_ | IFluidDexT1.CollateralReserves | A struct containing the normalized collateral reserves. |
_getDexCollateralReservesAdjusted ​
Retrieves the adjusted collateral reserves for a given DEX.
function _getDexCollateralReservesAdjusted(address dex_, IFluidDexT1.PricesAndExchangePrice memory pex_)
internal
view
returns (IFluidDexT1.CollateralReserves memory reserves_);
Parameters
Name | Type | Description |
---|---|---|
dex_ | address | The address of the DEX. |
pex_ | IFluidDexT1.PricesAndExchangePrice | A struct containing price and exchange price information. |
Returns
Name | Type | Description |
---|---|---|
reserves_ | IFluidDexT1.CollateralReserves | A struct containing the adjusted collateral reserves. |
_getDexDebtReserves ​
Retrieves and normalizes the debt reserves for a given DEX.
function _getDexDebtReserves(address dex_, IFluidDexT1.PricesAndExchangePrice memory pex_)
internal
view
returns (IFluidDexT1.DebtReserves memory reserves_);
Parameters
Name | Type | Description |
---|---|---|
dex_ | address | The address of the DEX. |
pex_ | IFluidDexT1.PricesAndExchangePrice | A struct containing price and exchange price information. |
Returns
Name | Type | Description |
---|---|---|
reserves_ | IFluidDexT1.DebtReserves | A struct containing the normalized debt reserves. |
_getDexDebtReservesAdjusted ​
Retrieves the adjusted debt reserves for a given DEX.
function _getDexDebtReservesAdjusted(address dex_, IFluidDexT1.PricesAndExchangePrice memory pex_)
internal
view
returns (IFluidDexT1.DebtReserves memory reserves_);
Parameters
Name | Type | Description |
---|---|---|
dex_ | address | The address of the DEX. |
pex_ | IFluidDexT1.PricesAndExchangePrice | A struct containing price and exchange price information. |
Returns
Name | Type | Description |
---|---|---|
reserves_ | IFluidDexT1.DebtReserves | A struct containing the adjusted debt reserves. |