This commit is contained in:
Shivva 2020-11-26 16:55:59 +01:00 committed by Luis Schliesske
parent 597b23d6e2
commit 24604e94fe

View File

@ -59,13 +59,15 @@ contract ConditionDestVaultWillBeSafe is GelatoConditionsStandard {
) public view returns (string memory) {
uint256 wDaiToBorrow =
_getRealisedDebt(_getMakerVaultDebt(_fromVaultId));
uint256 route = _getFlashLoanRoute(DAI, wDaiToBorrow);
uint256 gasCost = _getGasCostMakerToMaker(_destVaultId == 0, route);
uint256 gasFeesPaidFromCol = _getGelatoProviderFees(gasCost);
uint256 wColToDeposit =
sub(
_getMakerVaultCollateralBalance(_fromVaultId),
gasFeesPaidFromCol
_getGelatoProviderFees(
_getGasCostMakerToMaker(
_destVaultId == 0,
_getFlashLoanRoute(DAI, wDaiToBorrow)
)
)
);
return