Skip to content

Commit

Permalink
100% constant
Browse files Browse the repository at this point in the history
  • Loading branch information
MickdeGraaf committed Dec 9, 2020
1 parent 6468c4e commit 0509089
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions contracts/facets/Basket/BasketFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ contract BasketFacet is ReentryProtection, CallProtection, IBasketFacet {
uint256 public constant MAX_ENTRY_FEE = 10**17; // 10%
uint256 public constant MAX_EXIT_FEE = 10**17; // 10%
uint256 public constant MAX_ANNUAL_FEE = 10**17; // 10%
uint256 public constant 100_PERCENT = 10 ** 18;

// Assuming a block gas limit of 12M this allows for a gas consumption per token of roughly 333k allowing 2M of overhead for addtional operations
uint256 public constant MAX_TOKENS = 30;
Expand Down Expand Up @@ -95,7 +96,7 @@ contract BasketFacet is ReentryProtection, CallProtection, IBasketFacet {
}

function setEntryFeeBeneficiaryShare(uint256 _share) external override protectedCall {
require(_share <= 10**18, "FEE_SHARE_TOO_BIG");
require(_share <= 100_PERCENT, "FEE_SHARE_TOO_BIG");
LibBasketStorage.basketStorage().entryFeeBeneficiaryShare = _share;
emit EntryFeeBeneficiaryShareSet(_share);
}
Expand All @@ -105,7 +106,7 @@ contract BasketFacet is ReentryProtection, CallProtection, IBasketFacet {
}

function setExitFeeBeneficiaryShare(uint256 _share) external override protectedCall {
require(_share <= 10**18, "FEE_SHARE_TOO_BIG");
require(_share <= 100_PERCENT, "FEE_SHARE_TOO_BIG");
LibBasketStorage.basketStorage().exitFeeBeneficiaryShare = _share;
emit ExitFeeBeneficiaryShareSet(_share);
}
Expand Down

0 comments on commit 0509089

Please sign in to comment.