Collateral Pool Management
What is Collateral Pool and How Will it be Managed?
uint256 public constant MIN_COLLATERALIZATION_RATIO = 1e18; // minimum collateralization ratio threshold (1:1)
function checkCollateralizationRatio() public view returns (bool) {
uint256 totalValueLocked = calculateTotalValueLocked(); // calculate the total value of assets locked in the pool
uint256 totalDebt = calculateTotalDebt(); // calculate the total value of bonds issued
uint256 collateralizationRatio = totalValueLocked / totalDebt; // calculate the current collateralization ratio
if (collateralizationRatio < MIN_COLLATERALIZATION_RATIO) {
emit CollateralizationRatioBelowThreshold(totalValueLocked, totalDebt, collateralizationRatio); // trigger an event to alert the Redemption DAO
return false;
}
return true;
}
Last updated