This module handles the calculations of Utilization Rate, Borrow Rate & Supply Rate for all the PalPools.
The Interest Calculator V2 has 2 ways to calculate Borrow & Supply Rates :
- The Jump Rate, relying on the Utilization Rate and the liquidity of a Pool
- The Multiplier Rate, also based on the Utilization Rate, but also on some Governance values : the Proposal Threshold, and the Quorum Amount. This method of calculation allows to calculate a Borrow Rate increased by a Multiplier to prevent any cheap access to huge amounts of voting power that could hurt Governances.
Each PalPool is linked to a Multiplier matching the governance token it holds. The switch between the 2 calculation methods can be done for each PalPool individually, and will depend on the TVL of the PalPool, and the amount of voting power it represents.
function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns(uint);
Gives the utilization rate of a Pool given the parameters (uint, scaled 1e18):
Utilization rate = Borrows / (Cash + Borrows - Reserves)
function getSupplyRate(address palPool, uint cash, uint borrows, uint reserves, uint reserveFactor) external view override returns(uint);
Returns the Supply Rate for the given parameters (uint, scaled 1e18).
function getBorrowRate(address palPool, uint cash, uint borrows, uint reserves) external view override returns(uint);
Returns the Borrow Rate for the given parameters (uint, scaled 1e18).
Multipliers, when activated through the Interest Calculator, will check the total amount of voting power borrowed from Paladin for a given Governance (the total amount across multiple PalPools if their tokens are used in the same Governance). Using 2 common values in most Governances, the Proposal Threshold and the Quorum Amount, it will return a multiplier used to increase the Borrow Rate to better price large borrowed amounts of voting power.
The Multiplier is triggered when the Total Borrowed from Paladin reaches 75% of the Proposal Threshold for the given Governance, and will increase based on the Total Borrowed compared to the Proposal Threshold and the Quorum Amount based on the formula :
tB : Total Borrowed / pT : Proposal Threshold / qA : Quorum Amount
There are currently 2 types of Multipliers:
- The Governor Multiplier: Based on Governor Alpha/Bravo contracts, it used for Compound and Uniswap governances (1 for each governance).
- The Aave Multiplier : Based on Aave Governance, and using Proposal Threshold and Quorum Amount from the Short Executor, it is used for both AAVE & stkAAVE PalPools (where the Total Borrowed amount is the sum of the borrowed amount from both PalPools).