From 51102cc09771d6257485945283bae164aa1656e2 Mon Sep 17 00:00:00 2001 From: Jun Kim <64379343+junkim012@users.noreply.github.com> Date: Sun, 12 May 2024 02:37:38 -0400 Subject: [PATCH] fix: accrue fee before changing the feePercentage --- src/vault/Vault.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vault/Vault.sol b/src/vault/Vault.sol index 6b42ebc7..514019b9 100644 --- a/src/vault/Vault.sol +++ b/src/vault/Vault.sol @@ -115,6 +115,7 @@ contract Vault is ERC4626, Multicall, AccessControlDefaultAdminRules, Reentrancy */ function updateFeePercentage(uint256 _feePercentage) external onlyRole(OWNER_ROLE) { if (_feePercentage > RAY) revert InvalidFeePercentage(); + _accrueFee(); feePercentage = _feePercentage; }