mirror of
https://github.com/Instadapp/smart-contract.git
synced 2024-07-29 22:08:07 +00:00
added liquidity bal in mcd read
This commit is contained in:
parent
f5d345ec66
commit
6027374fcc
|
|
@ -18,7 +18,7 @@ interface VatLike {
|
||||||
function ilks(bytes32) external view returns (uint, uint, uint, uint, uint);
|
function ilks(bytes32) external view returns (uint, uint, uint, uint, uint);
|
||||||
function dai(address) external view returns (uint);
|
function dai(address) external view returns (uint);
|
||||||
function urns(bytes32, address) external view returns (uint, uint);
|
function urns(bytes32, address) external view returns (uint, uint);
|
||||||
|
function gem(bytes32, address) external view returns (uint);
|
||||||
}
|
}
|
||||||
|
|
||||||
interface JugLike {
|
interface JugLike {
|
||||||
|
|
@ -142,6 +142,7 @@ contract Helpers is DSMath {
|
||||||
uint ink;
|
uint ink;
|
||||||
uint art;
|
uint art;
|
||||||
uint debt;
|
uint debt;
|
||||||
|
uint liqInk;
|
||||||
uint stabiltyRate;
|
uint stabiltyRate;
|
||||||
uint price;
|
uint price;
|
||||||
uint liqRatio;
|
uint liqRatio;
|
||||||
|
|
@ -178,6 +179,7 @@ contract McdResolver is Helpers {
|
||||||
uint debt = rmul(art,rate);
|
uint debt = rmul(art,rate);
|
||||||
uint price = rmul(priceMargin, mat);
|
uint price = rmul(priceMargin, mat);
|
||||||
uint feeRate = getFee(ilks[i]);
|
uint feeRate = getFee(ilks[i]);
|
||||||
|
uint liqInk = VatLike(ManagerLike(manager).vat()).gem(ilks[i], urns[i]);
|
||||||
|
|
||||||
cdps[i] = CdpData(
|
cdps[i] = CdpData(
|
||||||
ids[i],
|
ids[i],
|
||||||
|
|
@ -186,6 +188,7 @@ contract McdResolver is Helpers {
|
||||||
ink,
|
ink,
|
||||||
art,
|
art,
|
||||||
debt,
|
debt,
|
||||||
|
liqInk,
|
||||||
feeRate,
|
feeRate,
|
||||||
price,
|
price,
|
||||||
mat,
|
mat,
|
||||||
|
|
@ -207,6 +210,8 @@ contract McdResolver is Helpers {
|
||||||
|
|
||||||
uint mat = getIlkRatio(ilk);
|
uint mat = getIlkRatio(ilk);
|
||||||
uint price = rmul(priceMargin, mat);
|
uint price = rmul(priceMargin, mat);
|
||||||
|
uint liqInk = VatLike(ManagerLike(manager).vat()).gem(ilk, urn);
|
||||||
|
|
||||||
|
|
||||||
uint feeRate = getFee(ilk);
|
uint feeRate = getFee(ilk);
|
||||||
CdpData memory cdp = CdpData(
|
CdpData memory cdp = CdpData(
|
||||||
|
|
@ -216,6 +221,7 @@ contract McdResolver is Helpers {
|
||||||
ink,
|
ink,
|
||||||
art,
|
art,
|
||||||
debt,
|
debt,
|
||||||
|
liqInk,
|
||||||
feeRate,
|
feeRate,
|
||||||
price,
|
price,
|
||||||
mat,
|
mat,
|
||||||
|
|
@ -243,8 +249,4 @@ contract McdResolver is Helpers {
|
||||||
address spot = InstaMcdAddress(getMcdAddresses()).spot();
|
address spot = InstaMcdAddress(getMcdAddresses()).spot();
|
||||||
(, ratio) = SpotLike(spot).ilks(ilk);
|
(, ratio) = SpotLike(spot).ilks(ilk);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMkrToTknAmt(address tokenAddr, uint mkrAmt) public view returns (uint tknAmt) {
|
|
||||||
tknAmt = OtcInterface(getOtcAddress()).getPayAmount(tokenAddr, address(mkrAddr), mkrAmt);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user