Created
March 30, 2023 21:35
-
-
Save sekrystal/9b68be3c399991102c192d56b67a1f14 to your computer and use it in GitHub Desktop.
Insolvent Position Analysis
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
pragma solidity ^0.8.13; | |
// from ... | |
uint256 internal constant LIQUIDATION_CLOSE_FACTOR_PERCENT = 5000; | |
function liquidationCall( | |
address collateralAsset, | |
address debtAsset, | |
address user, | |
uint256 debtToCover, | |
bool receiveAToken | |
) external override returns (uint256, string memory) { | |
// ... | |
vars.maxLiquidatableDebt = vars.userStableDebt.add(vars.userVariableDebt).percentMul( | |
LIQUIDATION_CLOSE_FACTOR_PERCENT | |
); | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment