-
Notifications
You must be signed in to change notification settings - Fork 3
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
base: main
Are you sure you want to change the base?
Conversation
5fc3e09
to
b7737e0
Compare
There was a problem hiding this 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
); | ||
}); | ||
|
||
checkIsolatedPoolsComptrollers(); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done 683e1b0
This PR adds VIPs for zksyncsepolia and zksyncmainnet to add zkETH market to the core pool on these networks.
Related PRs: