Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VEN-1709]: simulations for adding a new market in DeFi pool #41

Merged
merged 7 commits into from
Jul 25, 2023

Conversation

GitGuru7
Copy link
Contributor

Description

Resolves VEN-1709

@GitGuru7 GitGuru7 self-assigned this Jul 17, 2023
vips/vip-143/vip-143.ts Outdated Show resolved Hide resolved
@GitGuru7 GitGuru7 changed the title [VEN-1709]: simulatios for adding a new market in DeFi pool [VEN-1709]: simulations for adding a new market in DeFi pool Jul 20, 2023

it("should set vankrBNB_DeFi collateral factor to 0", async () => {
const market = await comptroller.markets(vankrBNB_DeFi);
expect(market.collateralFactorMantissa).to.equal(parseUnits("0", 18));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
expect(market.collateralFactorMantissa).to.equal(parseUnits("0", 18));
expect(market.collateralFactorMantissa).to.equal(0);


it("should set vankrBNB_DeFi liquidation threshold to 0", async () => {
const market = await comptroller.markets(vankrBNB_DeFi);
expect(market.liquidationThresholdMantissa).to.equal(parseUnits("0", 18));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
expect(market.liquidationThresholdMantissa).to.equal(parseUnits("0", 18));
expect(market.liquidationThresholdMantissa).to.equal(0);

const comptroller = await ethers.getContractAt(COMPTROLLER_ABI, COMPTROLLER_DeFi);
expect(await comptroller.getRewardDistributors()).to.have.lengthOf(2);
});

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
it("should be added to DeFi pool", async () => {
expect(await comptroller.getRewardDistributors()).to.include(REWARD_DISTRIBUTOR);
});


describe("Reward Distributor", () => {
it("should have 2 rewards distributor in DeFi pool", async () => {
const comptroller = await ethers.getContractAt(COMPTROLLER_ABI, COMPTROLLER_DeFi);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have comptroller defined already, so no need to redefine AFAIU

Suggested change
const comptroller = await ethers.getContractAt(COMPTROLLER_ABI, COMPTROLLER_DeFi);

@chechu
Copy link
Member

chechu commented Jul 24, 2023

@GitGuru7 GitGuru7 merged commit 1229ad7 into develop Jul 25, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants