small change

This commit is contained in:
Samyak Jain 2019-06-15 03:00:18 +05:30
parent b557eadd91
commit 1147cff4b1

View File

@ -262,7 +262,6 @@ contract MakerHelper is Helper {
function getCDPStats(bytes32 cup) internal view returns (uint ethCol, uint daiDebt) { function getCDPStats(bytes32 cup) internal view returns (uint ethCol, uint daiDebt) {
TubInterface tub = TubInterface(getSaiTubAddress()); TubInterface tub = TubInterface(getSaiTubAddress());
uint usdPerEth = uint(MakerOracleInterface(getOracleAddress()).read());
(, uint pethCol, uint debt,) = tub.cups(cup); (, uint pethCol, uint debt,) = tub.cups(cup);
ethCol = rmul(pethCol, tub.per()); // get ETH col from PETH col ethCol = rmul(pethCol, tub.per()); // get ETH col from PETH col
daiDebt = debt; daiDebt = debt;
@ -371,7 +370,7 @@ contract MakerHelper is Helper {
uint debtInEth = wmul(daiAmt, daiCompOracle); uint debtInEth = wmul(daiAmt, daiCompOracle);
(uint ethCol,) = getCDPStats(cup); (uint ethCol,) = getCDPStats(cup);
uint ratio = wdiv(debtInEth, ethCol); uint ratio = wdiv(debtInEth, ethCol);
require(ratio < 740000000000000000, "Danger to liquidate"); require(ratio < 740000000000000000, "Ratio above 74%");
BridgeInterface(getBridgeAddress()).transferDAI(daiAmt); BridgeInterface(getBridgeAddress()).transferDAI(daiAmt);