Developers
Search…
Market Information
Fetch a metadata struct in the Qubit's markets constant.
A qToken's collateral factor can range from 0-90%, and represents the proportionate increase in liquidity (borrow limit) that an account receives by minting the qToken.
Generally, large or liquid assets have high collateral factors, while small or illiquid assets have low collateral factors. If an asset has a 0% collateral factor, it can't be used as collateral (or seized in liquidation), though it can still be borrowed.

Qore

1
struct MarketInfo {
2
bool isListed;
3
uint borrowCap;
4
uint collateralFactor;
5
}
6
7
function marketInfoOf(address qToken) external view returns (MarketInfo memory);
Copied!
  • RETURN: Metadata struct named MarketInfo

Solidity

1
Qore qore = Qore(<qoreAddress>);
2
MarketInfo memory info = qore.marketInfoOf(<qTokenAddress>);
Copied!

Ethers.js

1
const qore = await ethers.getContractAt(<qoreABI>, <qoreAddress>);
2
const info = await qore.marketInfoOf(<qTokenAddress>);
3
const { collateralInUSD, supplyInUSD, borrowInUSD } = info;
Copied!
Last modified 2mo ago
Copy link