diff --git a/contracts/constants/CDebtBridge.sol b/contracts/constants/CDebtBridge.sol index bdccd1c..d68d3f1 100644 --- a/contracts/constants/CDebtBridge.sol +++ b/contracts/constants/CDebtBridge.sol @@ -5,5 +5,5 @@ function GAS_COSTS_FOR_FULL_REFINANCE() pure returns (uint256[4] memory) { return [uint256(2519000), 3140500, 3971000, 4345000]; } -uint256 constant VAT = 20; +uint256 constant PREMIUM = 20; uint256 constant VAULT_CREATION_COST = 100000; diff --git a/contracts/functions/gelato/FGelatoDebtBridge.sol b/contracts/functions/gelato/FGelatoDebtBridge.sol index 6d5e201..822b5d9 100644 --- a/contracts/functions/gelato/FGelatoDebtBridge.sol +++ b/contracts/functions/gelato/FGelatoDebtBridge.sol @@ -9,7 +9,7 @@ import { } from "../../constants/CInstaDapp.sol"; import { GAS_COSTS_FOR_FULL_REFINANCE, - VAT, + PREMIUM, VAULT_CREATION_COST } from "../../constants/CDebtBridge.sol"; import { @@ -81,7 +81,7 @@ function _getGasCostMakerToMaker(bool _newVault, uint256 _route) { _checkRouteIndex(_route); return - _getGasCostVAT( + _getGasCostPremium( _newVault ? add( GAS_COSTS_FOR_FULL_REFINANCE()[_route], @@ -93,11 +93,11 @@ function _getGasCostMakerToMaker(bool _newVault, uint256 _route) function _getGasCostMakerToCompound(uint256 _route) pure returns (uint256) { _checkRouteIndex(_route); - return _getGasCostVAT(GAS_COSTS_FOR_FULL_REFINANCE()[_route]); + return _getGasCostPremium(GAS_COSTS_FOR_FULL_REFINANCE()[_route]); } -function _getGasCostVAT(uint256 _rawGasCost) pure returns (uint256) { - return mul(_rawGasCost, add(100, VAT)) / 100; +function _getGasCostPremium(uint256 _rawGasCost) pure returns (uint256) { + return mul(_rawGasCost, add(100, PREMIUM)) / 100; } function _getRealisedDebt(uint256 _debtToMove) pure returns (uint256) { diff --git a/test/helpers/constants/GasConstant.js b/test/helpers/constants/GasConstant.js index 83a0412..c82012e 100644 --- a/test/helpers/constants/GasConstant.js +++ b/test/helpers/constants/GasConstant.js @@ -1,6 +1,6 @@ module.exports = async () => { return { - VAT: 20, + PREMIUM: 20, VAULT_CREATION_COST: 100000, }; }; diff --git a/test/helpers/services/gelato/getGasCostForFullRefinance.js b/test/helpers/services/gelato/getGasCostForFullRefinance.js index 8d5562e..0108a1d 100644 --- a/test/helpers/services/gelato/getGasCostForFullRefinance.js +++ b/test/helpers/services/gelato/getGasCostForFullRefinance.js @@ -21,6 +21,7 @@ module.exports = async function (route, withVaultCreation) { } return withVaultCreation - ? ((rawGasCost + gasCons.VAULT_CREATION_COST) * (100 + gasCons.VAT)) / 100 - : (rawGasCost * (100 + gasCons.VAT)) / 100; + ? ((rawGasCost + gasCons.VAULT_CREATION_COST) * (100 + gasCons.PREMIUM)) / + 100 + : (rawGasCost * (100 + gasCons.PREMIUM)) / 100; };