From cd6bd7c612ce1476b9aa0f4b01593be0d8b32e82 Mon Sep 17 00:00:00 2001 From: Ewan Sheldon Date: Thu, 9 Jan 2025 12:20:48 +0100 Subject: [PATCH] rename collateral ratio decrease error --- contracts/SmartVaultV4.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/SmartVaultV4.sol b/contracts/SmartVaultV4.sol index 68e5b3a..6fcfac8 100644 --- a/contracts/SmartVaultV4.sol +++ b/contracts/SmartVaultV4.sol @@ -46,6 +46,7 @@ contract SmartVaultV4 is ISmartVault, IRedeemable { error Undercollateralised(); error InvalidToken(); error DeadlineExpired(); + error CollateralRatioDecrease(); constructor(bytes32 _native, address _manager, address _owner, address _usds, address _priceCalculator) { NATIVE = _native; @@ -393,7 +394,7 @@ contract SmartVaultV4 is ISmartVault, IRedeemable { redeposit(_withdrawn, _collateralBalance, _collateralToken); } } - if (calculateCollateralPercentage() < _preCollateralisationPercentage) revert Overrepay(); + if (calculateCollateralPercentage() < _preCollateralisationPercentage) revert CollateralRatioDecrease(); } function addUniqueHypervisor(address _hypervisor) private {