Skip to main content

Pool Registry

The PoolRegistry contract is the central registry responsible for the creation, management, and discovery of all isolated liquidity pools within the Rheofi Protocol. It serves as the single entry point for deploying new pools and adding markets to existing ones.

Overview

Every isolated pool in the Rheofi Protocol is registered through the PoolRegistry. The contract maintains a comprehensive catalog of all pools and their associated metadata, enabling frontends, integrators, and other contracts to discover and interact with available pools. Pool creation is permissioned through governance, ensuring that only vetted configurations are deployed.

When a new pool is created, the PoolRegistry deploys a new Comptroller proxy, initializes it with the specified parameters, and records the pool in its internal registry.

Key Functions

addPool

Creates a new isolated liquidity pool with the specified configuration.

function addPool(
string calldata name,
address comptroller,
uint256 closeFactor,
uint256 liquidationIncentive,
uint256 minLiquidatableCollateral
) external returns (uint256 index);

addMarket

Adds a new market (RToken) to an existing isolated pool.

function addMarket(AddMarketInput memory input) external;

getAllPools

Returns metadata for all registered isolated pools.

function getAllPools() external view returns (VenusPool[] memory);

getPoolByComptroller

Retrieves pool metadata by its associated Comptroller address.

function getPoolByComptroller(address comptroller) external view returns (VenusPool memory);

getPoolsSupportedByMarket

Returns all pools that support a given underlying asset.

function getPoolsSupportedByMarket(address market) external view returns (uint256[] memory);

Access Control

Pool creation and market addition are restricted to governance and authorized callers via the AccessControlManager.

See Also