Skip to content

Commit

Permalink
feat: remove max fee cap
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlagonia committed Nov 14, 2023
1 parent 93036a6 commit 6810e42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 0 additions & 3 deletions contracts/accountants/HealthCheckAccountant.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 4 additions & 2 deletions contracts/accountants/RefundAccountant.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
}
Expand Down

0 comments on commit 6810e42

Please sign in to comment.