ReserveDataLib

Git Source

Author: Morpho Labs

Library used to ease AaveV3's reserve-related calculations.

Functions

getAccruedToTreasury

Calculates the scaled quantity of reserve dedicated to AaveV3's treasury, taking into account interests accrued.

Reference: https://github.com/aave/aave-v3-core/blob/a00f28e3ad7c0e4a369d8e06e0ac9fd0acabcab7/contracts/protocol/libraries/logic/ReserveLogic.sol#L230-L282.

function getAccruedToTreasury(DataTypes.ReserveData memory reserve, Types.Indexes256 memory indexes)
    internal
    view
    returns (uint256);

Parameters

NameTypeDescription
reserveDataTypes.ReserveDataThe reserve data of a given market.
indexesTypes.Indexes256The updated pool & peer-to-peer indexes of the associated market.

Returns

NameTypeDescription
<none>uint256The reserve's dedicated treasury, in pool unit.