Registering a Market
Markets can be integrated with the DexToro protocol to access credit capacity from liquidity providers. Markets report a balance of debt and may deposit dUSD and withdraw dUSD depending on the amount of liquidity delegated to them by pools (which determines their credit capacity).
Only DexToro Protocol can register markets for the time being. Once a DexToro Improvement Proposal (DIP) is approved, anyone can register and allocate liquidity to their unique derivative market.
Before a market can interact with the protocol, it must be registered using the registerMarket
function. This function accepts the address of a market, which will be able to integrate with Dextoro (to perform actions like depositing and withdrawing dUSD) using the ID returned by the function.
Markets cannot be registered unless they conform to the IMarket
interface. See Integrating DexToro for more information on the functions that must be implemented.
Derivatives market implementations can be registered with the DexToro protocol if they conform to the IMarket
interface. This consists of just three functions:
function name(uint128 marketId) external view returns (string memory);
- A function that should return a human-readable name for the given market.function reportedDebt(uint129 marketId) external view returns (uint);
- A function that should return the total value of debt issued by the market (to be collateralized by the assets in the pools backing it), denominated with 18 decimals places.function minimumCredit(uint128 marketId) external view returns (uint);
- A function that returns the amount of credit under which pools cannot rescind credit delegated to the market. This value is dollar-denominated, with 18 decimals places. If the market implementation does not intend to lock collateral, this function can justreturn 0;
. Note that the amount of credit available to a market may still fall below this amount due to the price action of the collateral backing it.
Last updated