Skip to main content

ProtocolShareReserve

The ProtocolShareReserve (PSR) contract is responsible for collecting and distributing protocol income generated by the Rheofi Protocol's isolated liquidity pools. It acts as the central revenue aggregation point, routing funds to designated destinations such as the Risk Fund, governance treasury, and other protocol components.

Overview

When RToken markets accrue interest, a portion of the revenue is allocated to protocol reserves. The ProtocolShareReserve receives these funds and distributes them according to predefined allocation rules. Each distribution target receives a configurable percentage of the total income, ensuring that protocol revenue is allocated transparently and consistently.

The PSR supports multiple distribution schemas, allowing different allocation ratios for different income types (e.g., spread income vs. liquidation income).

Key Functions

releaseFunds

Releases accumulated funds from the PSR to the configured distribution targets for a specific pool.

function releaseFunds(
address comptroller,
address[] calldata assets
) external;

addOrUpdateDistributionConfigs

Configures or updates the distribution schema for protocol income.

function addOrUpdateDistributionConfigs(
DistributionConfig[] calldata configs
) external;

getPercentageDistribution

Returns the percentage allocation for a given target and income type.

function getPercentageDistribution(
address destination,
Schema schema
) external view returns (uint256);

Access Control

Distribution configuration changes are restricted to governance through the AccessControlManager.

See Also