Skip to main content

Liquidity Pools Architecture

Technical Article

Liquidity Pools Architecture.

Independent pools, each with its own risk parameters and asset listings — created and tracked through the on-chain PoolRegistry. Risk in one pool stays in that pool.

Risk IsolationPermissionless ListingCustomizable

Rheofi's Isolated Liquidity Pools extend the protocol beyond a single monolithic lending market by enabling the creation of independent pools, each with its own risk parameters and asset listings.

Design goals

Risk isolation

Bad debt or an oracle failure in one pool does not affect other pools. Each pool's solvency is self-contained.

Permissionless listing

New assets can be supported in isolated pools without exposing existing pools to their risk profile.

Customizable parameters

Each pool's Comptroller has independently configured collateral factors, liquidation incentives, borrow caps, and supply caps.

PoolRegistry

The PoolRegistry contract is the on-chain registry and factory for isolated pools.

interface IPoolRegistry {
function createRegistryPool(
string calldata name,
address comptroller,
uint256 closeFactor,
uint256 liquidationIncentive,
uint256 minLiquidatableCollateral
) external returns (uint256 poolId);

function addMarket(AddMarketInput calldata input) external;

function getAllPools() external view returns (PoolData[] memory);
}

Each pool is deployed with its own Comptroller proxy, ensuring complete parameter independence. Markets (RToken instances) are added to a pool via addMarket().

Risk isolation in practice
01

Scoped accounting

Collateral and debt are tracked exclusively within that pool's Comptroller — never co-mingled across pools.

02

Scoped liquidations

Liquidations only occur against positions within the same pool. Cross-pool liquidation is impossible by design.

03

Scoped Risk Fund

The pool's Risk Fund absorbs shortfall independently. A bad-debt event in one pool can never deplete another's reserves.

This architecture means listing a volatile or experimental asset in an isolated pool carries no systemic risk to the broader protocol.

Pool discovery

Users and integrators can enumerate all active pools and their markets by calling getAllPools() on the PoolRegistry. Each entry returns the pool metadata, Comptroller address, and list of RToken markets with their configurations.