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-3073]: Add zkETH market to the Core pool on zkSync #510

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

kkirka
Copy link
Contributor

@kkirka kkirka commented Feb 20, 2025

This PR adds VIPs for zksyncsepolia and zksyncmainnet to add zkETH market to the core pool on these networks.

Related PRs:

Copy link
Member

@chechu chechu left a comment

Choose a reason for hiding this comment

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

Commands (mainnet and sepolia) lgtm

@Debugger022 Debugger022 self-requested a review February 24, 2025 05:35
);
});

checkIsolatedPoolsComptrollers();
Copy link
Contributor

Choose a reason for hiding this comment

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

These tests are failing for me

@@ -122,6 +122,13 @@ const runPoolTests = async (pool: PoolMetadata, poolSupplier: string) => {
const balance = await supplyUnderlying?.balanceOf(poolSupplier);
const supplyAmountScaled = initialSupplyAmount.gt(balance) ? balance : initialSupplyAmount;
const originalSupplyMarketBalance = await supplyMarket?.balanceOf(poolSupplier);
const supplyCap = await comptroller.supplyCaps(supplyMarket?.address);
const nextTotalSupply = (await supplyMarket.totalSupply()) + supplyAmountScaled;
Copy link
Contributor Author

@kkirka kkirka Feb 28, 2025

Choose a reason for hiding this comment

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

Total supply is in vTokens while supplyAmountScaled and supplyCap are in underlying. We could either multiply total supply by the exchange rate here, or just skip checking the cap and just set it to infinity instead, even if it isn't reached yet [*].

[*] This may interfere with other tests in a test suite. To avoid this, we could take a snapshot of the state before the check, do the checks, and then reset to the original state. But since checkIsolatedPoolsComptrollers is usually the last check we do, I guess we can just put a comment somewhere that it alters the state.

Copy link
Contributor

Choose a reason for hiding this comment

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

done 683e1b0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants