From 99f58db034c7d3d510698ca6a5f623b20a1a3d87 Mon Sep 17 00:00:00 2001 From: Samyak Jain Date: Mon, 17 Jun 2019 22:47:50 +0530 Subject: [PATCH] stack too deep error --- contracts/ProxyLogics/InstaBridge.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/ProxyLogics/InstaBridge.sol b/contracts/ProxyLogics/InstaBridge.sol index 6ce40c2..73fd79c 100644 --- a/contracts/ProxyLogics/InstaBridge.sol +++ b/contracts/ProxyLogics/InstaBridge.sol @@ -473,7 +473,8 @@ contract MakerResolver is CompoundHelper { (bytes32 val, bool ok) = tub.pep().peek(); // MKR required for wipe = Stability fees accrued in Dai / MKRUSD value - uint mkrFee = wdiv(rmul(_wad, rdiv(tub.rap(cup), tub.tab(cup))), uint(val)); + uint mkrFeeHelper = rdiv(tub.rap(cup), tub.tab(cup)); + uint mkrFee = wdiv(rmul(_wad, mkrFeeHelper), uint(val)); uint daiFeeAmt = daiEx.getTokenToEthOutputPrice(mkrEx.getEthToTokenOutputPrice(mkrFee)); daiAmt = add(_wad, daiFeeAmt);