From 952f79124eea4c2b2112c06da1370c3fe4ecd08d Mon Sep 17 00:00:00 2001 From: Shivva Date: Sat, 24 Oct 2020 13:38:44 +0200 Subject: [PATCH] Fix bug, put buffer on the full refinancing --- contracts/connectors/ConnectGelatoDebtBridgeFromMaker.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/connectors/ConnectGelatoDebtBridgeFromMaker.sol b/contracts/connectors/ConnectGelatoDebtBridgeFromMaker.sol index 7ee6168..9c1d749 100644 --- a/contracts/connectors/ConnectGelatoDebtBridgeFromMaker.sol +++ b/contracts/connectors/ConnectGelatoDebtBridgeFromMaker.sol @@ -306,7 +306,7 @@ contract ConnectGelatoDebtBridgeFromMaker is MakerResolver { ); _setInstaMemoryUints( - _add(wDaiDebtToMove, 1e18), + wDaiDebtToMove, _sub(wColToWithdrawFromMaker, gasFeesPaidFromCol), // _wColToDepositInB wDaiDebtToMove, gasFeesPaidFromCol @@ -333,7 +333,7 @@ contract ConnectGelatoDebtBridgeFromMaker is MakerResolver { uint256 gasFeesPaidFromCol = _getGelatoProviderFees(); _setInstaMemoryUints( - wDaiDebtToMove, + _add(wDaiDebtToMove, 1e18), _sub(wColToWithdrawFromMaker, gasFeesPaidFromCol), // _wColToDepositInB wDaiDebtToMove, gasFeesPaidFromCol