mirror of
https://github.com/Instadapp/Gelato-automations.git
synced 2024-07-29 22:28:07 +00:00
Rename VAT to PREMIUM
This commit is contained in:
parent
a7a204be5e
commit
1a58721543
|
@ -5,5 +5,5 @@ function GAS_COSTS_FOR_FULL_REFINANCE() pure returns (uint256[4] memory) {
|
||||||
return [uint256(2519000), 3140500, 3971000, 4345000];
|
return [uint256(2519000), 3140500, 3971000, 4345000];
|
||||||
}
|
}
|
||||||
|
|
||||||
uint256 constant VAT = 20;
|
uint256 constant PREMIUM = 20;
|
||||||
uint256 constant VAULT_CREATION_COST = 100000;
|
uint256 constant VAULT_CREATION_COST = 100000;
|
||||||
|
|
|
@ -9,7 +9,7 @@ import {
|
||||||
} from "../../constants/CInstaDapp.sol";
|
} from "../../constants/CInstaDapp.sol";
|
||||||
import {
|
import {
|
||||||
GAS_COSTS_FOR_FULL_REFINANCE,
|
GAS_COSTS_FOR_FULL_REFINANCE,
|
||||||
VAT,
|
PREMIUM,
|
||||||
VAULT_CREATION_COST
|
VAULT_CREATION_COST
|
||||||
} from "../../constants/CDebtBridge.sol";
|
} from "../../constants/CDebtBridge.sol";
|
||||||
import {
|
import {
|
||||||
|
@ -81,7 +81,7 @@ function _getGasCostMakerToMaker(bool _newVault, uint256 _route)
|
||||||
{
|
{
|
||||||
_checkRouteIndex(_route);
|
_checkRouteIndex(_route);
|
||||||
return
|
return
|
||||||
_getGasCostVAT(
|
_getGasCostPremium(
|
||||||
_newVault
|
_newVault
|
||||||
? add(
|
? add(
|
||||||
GAS_COSTS_FOR_FULL_REFINANCE()[_route],
|
GAS_COSTS_FOR_FULL_REFINANCE()[_route],
|
||||||
|
@ -93,11 +93,11 @@ function _getGasCostMakerToMaker(bool _newVault, uint256 _route)
|
||||||
|
|
||||||
function _getGasCostMakerToCompound(uint256 _route) pure returns (uint256) {
|
function _getGasCostMakerToCompound(uint256 _route) pure returns (uint256) {
|
||||||
_checkRouteIndex(_route);
|
_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) {
|
function _getGasCostPremium(uint256 _rawGasCost) pure returns (uint256) {
|
||||||
return mul(_rawGasCost, add(100, VAT)) / 100;
|
return mul(_rawGasCost, add(100, PREMIUM)) / 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
function _getRealisedDebt(uint256 _debtToMove) pure returns (uint256) {
|
function _getRealisedDebt(uint256 _debtToMove) pure returns (uint256) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
module.exports = async () => {
|
module.exports = async () => {
|
||||||
return {
|
return {
|
||||||
VAT: 20,
|
PREMIUM: 20,
|
||||||
VAULT_CREATION_COST: 100000,
|
VAULT_CREATION_COST: 100000,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,6 +21,7 @@ module.exports = async function (route, withVaultCreation) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return withVaultCreation
|
return withVaultCreation
|
||||||
? ((rawGasCost + gasCons.VAULT_CREATION_COST) * (100 + gasCons.VAT)) / 100
|
? ((rawGasCost + gasCons.VAULT_CREATION_COST) * (100 + gasCons.PREMIUM)) /
|
||||||
: (rawGasCost * (100 + gasCons.VAT)) / 100;
|
100
|
||||||
|
: (rawGasCost * (100 + gasCons.PREMIUM)) / 100;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user