Skip to content

Commit

Permalink
Remove debt interest calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
EridianAlpha committed Jun 3, 2024
1 parent 24ddadf commit ec030bf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
16 changes: 0 additions & 16 deletions src/AaveFunctions.sol
Original file line number Diff line number Diff line change
Expand Up @@ -130,22 +130,6 @@ contract AaveFunctions is TokenSwaps {
(totalCollateralBase, totalDebtBase, availableBorrowsBase, currentLiquidationThreshold, ltv, healthFactor);
}

/// @notice // TODO: Add comment.
function _getTotalDebtInterest(uint256 totalDebtBase, uint256 reinvestedDebtTotal, uint256 withdrawnUSDCTotal)
internal
pure
returns (uint256 interest)
{
interest = 0;
if ((totalDebtBase - (reinvestedDebtTotal * 1e2) - (withdrawnUSDCTotal * 1e2)) < 0) {
revert IAavePM.AavePM__NegativeInterestCalc();
} else {
uint256 interestInBaseUnits = (totalDebtBase - (reinvestedDebtTotal * 1e2) - (withdrawnUSDCTotal * 1e2));
interest = interestInBaseUnits / 1e2;
}
return interest;
}

/// @notice // TODO: Add comment.
function _getTotalCollateralDelta(
uint256 totalCollateralBase,
Expand Down
1 change: 0 additions & 1 deletion src/interfaces/IAavePM.sol
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ interface IAavePM {
function getSlippageToleranceMaximum() external pure returns (uint16 slippageToleranceMaximum);
function getContractBalance(string memory _identifier) external view returns (uint256 contractBalance);
function getRoleMembers(string memory _roleString) external view returns (address[] memory);
function getTotalDebtInterest() external view returns (uint256 totalDebtInterest);
function getWithdrawnUSDCTotal() external view returns (uint256 withdrawnUSDCTotal);
function getReinvestedDebtTotal() external view returns (uint256 reinvestedDebtTotal);
function getTotalCollateralDelta() external view returns (uint256 totalCollateralDelta, bool isPositive);
Expand Down

0 comments on commit ec030bf

Please sign in to comment.