diff --git a/contracts/accountants/HealthCheckAccountant.sol b/contracts/accountants/HealthCheckAccountant.sol index fada188..aaea845 100644 --- a/contracts/accountants/HealthCheckAccountant.sol +++ b/contracts/accountants/HealthCheckAccountant.sol @@ -159,7 +159,6 @@ contract HealthCheckAccountant { defaultPerformance <= PERFORMANCE_FEE_THRESHOLD, "exceeds performance fee threshold" ); - require(defaultMaxFee <= MAX_BPS, "too high"); require(defaultMaxLoss <= MAX_BPS, "too high"); feeManager = _feeManager; @@ -330,7 +329,6 @@ contract HealthCheckAccountant { defaultPerformance <= PERFORMANCE_FEE_THRESHOLD, "exceeds performance fee threshold" ); - require(defaultMaxFee <= MAX_BPS, "too high"); require(defaultMaxLoss <= MAX_BPS, "too high"); // Update the default fee configuration. @@ -378,7 +376,6 @@ contract HealthCheckAccountant { customPerformance <= PERFORMANCE_FEE_THRESHOLD, "exceeds performance fee threshold" ); - require(customMaxFee <= MAX_BPS, "too high"); require(customMaxLoss <= MAX_BPS, "too high"); // Set the strategy's custom config. diff --git a/contracts/accountants/RefundAccountant.sol b/contracts/accountants/RefundAccountant.sol index 1ef449d..3fd714e 100644 --- a/contracts/accountants/RefundAccountant.sol +++ b/contracts/accountants/RefundAccountant.sol @@ -68,17 +68,19 @@ contract RefundAccountant is HealthCheckAccountant { (totalFees, totalRefunds) = super.report(strategy, gain, loss); Refund memory refundConfig = refund[msg.sender][strategy]; - // If the strategy is a reward refunder. + // Check if the strategy is being given a refund. if (refundConfig.refund) { + // Add it to the existing refunds. totalRefunds += uint256(refundConfig.amount); - // Make sure the vault is approved. + // Make sure the vault is approved correctly. _checkAllowance( msg.sender, IVault(msg.sender).asset(), totalRefunds ); + // Always reset the refund amount so it can't be reused. delete refund[msg.sender][strategy]; } }