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];
|
||||
}
|
||||
|
||||
uint256 constant VAT = 20;
|
||||
uint256 constant PREMIUM = 20;
|
||||
uint256 constant VAULT_CREATION_COST = 100000;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module.exports = async () => {
|
||||
return {
|
||||
VAT: 20,
|
||||
PREMIUM: 20,
|
||||
VAULT_CREATION_COST: 100000,
|
||||
};
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user