-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor module interfaces and selectors
- Loading branch information
1 parent
442df97
commit d8d33d5
Showing
13 changed files
with
226 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.24; | ||
|
||
import {IAavePM} from "./IAavePM.sol"; | ||
|
||
interface IAaveFunctionsModule { | ||
function aaveSupply(address aavePoolAddress, address tokenAddress, uint256 tokenBalance) external; | ||
function aaveWithdrawCollateral(address aavePoolAddress, address tokenAddress, uint256 withdrawAmount) external; | ||
function aaveBorrow(address aavePoolAddress, address tokenAddress, uint256 borrowAmount) external; | ||
function aaveRepayDebt(address aavePoolAddress, address tokenAddress, uint256 repayAmount) external; | ||
function getCurrentPositionValues(IAavePM aavePM) | ||
external | ||
view | ||
returns ( | ||
uint256 initialCollateralBase, | ||
uint256 totalDebtBase, | ||
uint256 currentLiquidationThreshold, | ||
uint256 initialHealthFactorScaled, | ||
uint16 healthFactorTarget, | ||
address aavePoolAddress, | ||
address wstETHAddress, | ||
address usdcAddress | ||
); | ||
function checkHealthFactorAboveMinimum() | ||
external | ||
view | ||
returns ( | ||
uint256 totalCollateralBase, | ||
uint256 totalDebtBase, | ||
uint256 availableBorrowsBase, | ||
uint256 currentLiquidationThreshold, | ||
uint256 ltv, | ||
uint256 healthFactor | ||
); | ||
function getTotalCollateralDelta( | ||
uint256 totalCollateralBase, | ||
uint256 reinvestedDebtTotal, | ||
uint256 suppliedCollateralTotal | ||
) external pure returns (uint256 delta, bool isPositive); | ||
function convertExistingBalanceToWstETHAndSupplyToAave() external returns (uint256 suppliedCollateral); | ||
function calculateMaxBorrowUSDC( | ||
uint256 totalCollateralBase, | ||
uint256 totalDebtBase, | ||
uint256 currentLiquidationThreshold, | ||
uint16 healthFactorTarget | ||
) external pure returns (uint256 maxBorrowUSDC); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.