RenzoLibrary
function calculateMintAmount(uint256 _currentValueInProtocol, uint256 _newValueAdded, uint256 _existingEzETHSupply)
external pure returns (uint256) {
...
// Calculate the percentage of value after the deposit
uint256 inflationPercentaage = SCALE_FACTOR * _newValueAdded / (_currentValueInProtocol + _newValueAdded);
// Calculate the new supply
uint256 newEzETHSupply = (_existingEzETHSupply * SCALE_FACTOR) / (SCALE_FACTOR - inflationPercentaage);
// Subtract the old supply from the new supply to get the amount to mint
uint256 mintAmount = newEzETHSupply - _existingEzETHSupply;
if(mintAmount == 0) revert InvalidTokenAmount();
...
}Functions
getEthAmountInForLstAmountOut
Name
Type
Description
Name
Type
Description
getLstAmountOutForEthAmountIn
Name
Type
Description
Name
Type
Description
depositForLrt
_calculateDepositAmount
Name
Type
Description
_calculateMintAmount
Name
Type
Description
Name
Type
Description