Skip to content

Commit

Permalink
updated base aggregation to 10
Browse files Browse the repository at this point in the history
  • Loading branch information
asardon committed Jan 19, 2023
1 parent ddfd959 commit a396dd6
Show file tree
Hide file tree
Showing 4 changed files with 1,297 additions and 4 deletions.
2 changes: 1 addition & 1 deletion contracts/BasePool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ abstract contract BasePool is IBasePool {
revert InvalidLiquidityBnds();
// ensure LP shares can be minted based on 1/1000th of minLp discretization
if (_minLiquidity < 1000) revert InvalidMinLiquidity();
if (_baseAggrBucketSize < 100 || _baseAggrBucketSize % 100 != 0)
if (_baseAggrBucketSize < 10 || _baseAggrBucketSize % 10 != 0)
revert InvalidBaseAggrSize();
if (_creatorFee > MAX_FEE) revert InvalidFee();
poolCreator = msg.sender;
Expand Down
4 changes: 2 additions & 2 deletions contracts/BasePool_v_1_1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ abstract contract BasePool_v_1_1 is IBasePool_v_1_1 {
uint256 liquidityBnd1; // denominated in loanCcy decimals
uint256 liquidityBnd2; // denominated in loanCcy decimals
uint256 minLoan; // denominated in loanCcy decimals
uint256 baseAggrBucketSize; // must be a multiple of 100
uint256 baseAggrBucketSize; // must be a multiple of 10
mapping(address => LpInfo) addrToLpInfo;
mapping(address => uint256) lastAddOfTxOrigin;
mapping(uint256 => LoanInfo) public loanIdxToLoanInfo;
Expand Down Expand Up @@ -107,7 +107,7 @@ abstract contract BasePool_v_1_1 is IBasePool_v_1_1 {
revert InvalidLiquidityBnds();
// ensure LP shares can be minted based on 1/1000th of minLp discretization
if (_minLiquidity < 1000) revert InvalidMinLiquidity();
if (_baseAggrBucketSize < 100 || _baseAggrBucketSize % 100 != 0)
if (_baseAggrBucketSize < 10 || _baseAggrBucketSize % 10 != 0)
revert InvalidBaseAggrSize();
if (_creatorFee > MAX_FEE) revert InvalidFee();
poolCreator = msg.sender;
Expand Down
Loading

0 comments on commit a396dd6

Please sign in to comment.