raft-fi / contracts

Smart contracts for the Raft protocol
http://raft.fi/
Other
40 stars 18 forks source link

feature: Support collateral with 8 decimals #462

Closed StefanVitor closed 1 year ago

StefanVitor commented 1 year ago

Found an issue with SplitLiquidationCollateral, fixing that now

StefanVitor commented 1 year ago

Found an issue with SplitLiquidationCollateral, fixing that now

No, it looks like that is okay, because, uint256 collateralValue = totalCollateral.mulDown(price);in SplitLiquidationCollateral contract will be 18 decimals, which is compared with

uint256 private constant LOW_TOTAL_COLLATERAL = 3000e18;
uint256 private constant MEDIUM_TOTAL_COLLATERAL = 100_000e18;
uint256 private constant HIGH_TOTAL_COLLATERAL = 1_000_000e18;