morpho-org / pre-liquidation

Other
3 stars 1 forks source link

Linear pre-liquidation parameters #32

Closed peyha closed 2 months ago

peyha commented 2 months ago

Implemented a linear pre-liquidation incentive factor and a linear pre-liquidation close factor. It is given by the formula $\mathit{preLIF}=\frac{preLIF_1(LLTV-LTV)+preLIF_2(LTV-preLLTV)}{LLTV-preLLTV}$ which is computed in the code by `uint256 preLiquidationIncentiveFactor = ( PRE_LIQUIDATION_INCENTIVE_FACTOR_1.wMulDown(LLTV - ltv)

colin-morpho commented 2 months ago

For consistency, we could consider renaming the PR title, Dynamic -> Linear.

peyha commented 2 months ago

Last commit should handle #33