Skip to content

Commit

Permalink
Merge pull request #104 from Threshold-USD/thUSD-BAMM-A
Browse files Browse the repository at this point in the history
BAMM: update minimum A
  • Loading branch information
evandrosaturnino authored Oct 17, 2023
2 parents 61e7427 + 58f13df commit 3fad7e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/contracts/contracts/B.Protocol/BAMM.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ contract BAMM is CropJoinAdapter, PriceFormula, Ownable, CheckContract, SendColl
uint256 public constant MAX_FEE = 100; // 1%
uint256 public fee = 0; // fee in bps
uint256 public A = 20;
uint256 public constant MIN_A = 20;
uint256 public constant MIN_A = 1;
uint256 public constant MAX_A = 200;

uint256 public immutable maxDiscount; // max discount in bips
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/test/B.Protocol/BAMMTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ contract('BAMM', async accounts => {

it('test set params sad path', async () => {
await assertRevert(bamm.setParams(210, 100, {from: bProtocolOwner}), 'setParams: A too big')
await assertRevert(bamm.setParams(9, 100, {from: bProtocolOwner}), 'setParams: A too small')
await assertRevert(bamm.setParams(0, 100, {from: bProtocolOwner}), 'setParams: A too small')
await assertRevert(bamm.setParams(10, 101, {from: bProtocolOwner}), 'setParams: fee is too big')
await assertRevert(bamm.setParams(20, 100, {from: bammOwner}), 'Ownable: caller is not the B.Protocol owner')
})
Expand Down

0 comments on commit 3fad7e9

Please sign in to comment.