Skip to content

Commit

Permalink
Bump package version
Browse files Browse the repository at this point in the history
  • Loading branch information
alsco77 committed Jan 18, 2021
1 parent 19a3a2e commit 6d935eb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mstable/protocol",
"version": "1.4.1",
"version": "1.5.0",
"description": "mStable Contracts",
"author": "mStable <info@mstable.org>",
"license": "AGPL-3.0-or-later",
Expand Down
18 changes: 9 additions & 9 deletions test/savings/TestSavingsVault.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ contract("SavingsVault", async (accounts) => {

const minBoost = simpleToExactAmount(5, 17);
const maxBoost = simpleToExactAmount(15, 17);
const coeff = 32;
const coeff = 60;
const lockupPeriod = ONE_WEEK.muln(26);

const boost = (raw: BN, boostAmt: BN): BN => {
Expand Down Expand Up @@ -578,10 +578,10 @@ contract("SavingsVault", async (accounts) => {
const ratio = await savingsVault.getBoost(sa.default);
expect(ratio).bignumber.eq(maxBoost);
});
it("should calculate boost for 10k imUSD stake and 100 vMTA", async () => {
it("should calculate boost for 10k imUSD stake and 50 vMTA", async () => {
const deposit = simpleToExactAmount(10000, 18);
const stake = simpleToExactAmount(100, 18);
const expectedBoost = simpleToExactAmount(12590, 18);
const stake = simpleToExactAmount(50, 18);
const expectedBoost = simpleToExactAmount(12110, 18);

await expectSuccessfulStake(deposit);
await stakingContract.setBalanceOf(sa.default, stake);
Expand All @@ -595,12 +595,12 @@ contract("SavingsVault", async (accounts) => {
"0.1",
);
const ratio = await savingsVault.getBoost(sa.default);
assertBNClosePercent(ratio, simpleToExactAmount(1.259, 18), "0.1");
assertBNClosePercent(ratio, simpleToExactAmount(1.211, 18), "0.1");
});
it("should calculate boost for 100k imUSD stake and 800 vMTA", async () => {
it("should calculate boost for 100k imUSD stake and 500 vMTA", async () => {
const deposit = simpleToExactAmount(100000, 18);
const stake = simpleToExactAmount(800, 18);
const expectedBoost = simpleToExactAmount(131000, 18);
const stake = simpleToExactAmount(500, 18);
const expectedBoost = simpleToExactAmount(144900, 18);

await expectSuccessfulStake(deposit);
await stakingContract.setBalanceOf(sa.default, stake);
Expand All @@ -615,7 +615,7 @@ contract("SavingsVault", async (accounts) => {
);

const ratio = await savingsVault.getBoost(sa.default);
assertBNClosePercent(ratio, simpleToExactAmount(1.31, 18), "0.1");
assertBNClosePercent(ratio, simpleToExactAmount(1.449, 18), "0.1");
});
});
describe("when saving with low staking balance and high vMTA", () => {
Expand Down

0 comments on commit 6d935eb

Please sign in to comment.