Skip to content

Commit

Permalink
Charge annualized fee when changing fee params
Browse files Browse the repository at this point in the history
  • Loading branch information
MickdeGraaf committed Dec 8, 2020
1 parent 4fdbfd7 commit 063c923
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contracts/facets/Basket/BasketFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ contract BasketFacet is ReentryProtection, CallProtection, IBasketFacet {
}

function setAnnualizedFee(uint256 _fee) external override protectedCall {
chargeOutstandingAnnualizedFee();
require(_fee <= MAX_ANNUAL_FEE, "FEE_TOO_BIG");
LibBasketStorage.basketStorage().annualizedFee = _fee;
emit AnnualizedFeeSet(_fee);
Expand All @@ -84,6 +85,7 @@ contract BasketFacet is ReentryProtection, CallProtection, IBasketFacet {
}

function setFeeBeneficiary(address _beneficiary) external override protectedCall {
chargeOutstandingAnnualizedFee();
LibBasketStorage.basketStorage().feeBeneficiary = _beneficiary;
emit FeeBeneficiarySet(_beneficiary);
}
Expand Down

0 comments on commit 063c923

Please sign in to comment.