-
Notifications
You must be signed in to change notification settings - Fork 7
fix emode tests #20
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
fix emode tests #20
Conversation
|
But the flag you are changing the assertion on is about if the user can use the given supply as collateral, not if they can supply it. |
|
@cesarenaldi yeah, by supply i meant supply + using as collateral |
|
what's the implication of activating a collateral on a supply reserve that is not part of the emode? |
AAVE-868 [BUG] when fetching borrowAPY or supplyAPY history for windows more than a day is not working
working request: const result = await supplyAPYHistory(client, {
market: ETHEREUM_MARKET_ADDRESS,
chainId: ETHEREUM_FORK_ID,
underlyingToken: WETH_ADDRESS,
window: TimeWindow.LastDay,
});when changing the timeWindow form "lastDay" to "lastMonth" I am not getting any result. AAVE-858 [BUG] E-Mode not reflected in MarketUserReserveSupplyPosition
The specific e-mode category reserves settings (e.g., canBeCollateral, canBeBorrowed) are not reflected on the MarketUserReserveSupplyPosition for any user supply position.
|
AAVE-857 [BUG] E-Mode not reflected in Reserve.userState
The specific e-mode category reserves settings (e.g., canBeCollateral, canBeBorrowed) are not reflected on the |
d2c4741 to
151e9b7
Compare
| categoryId: ETHEREUM_MARKET_ETH_CORRELATED_EMODE_CATEGORY, | ||
| }), | ||
| canBeCollateral: eModeCategoryReserve?.canBeCollateral ?? false, | ||
| canBeCollateral: reserve.userState?.canBeCollateral ?? false, |
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.
Let's remove this line altogether then, this is the same as not checking it.
E-Mode just limits borrow-side. So when asking for market reserves,
canBeCollateral(allowing users to set new supplies as collateral) is not affected by active e-mode and specific reserve's e-mode's config is only used in borrow-side for HF (and collateral amount calculation).Example:
A user supplies ETH and activates e-mode ETH-correlated. the user can now only borrow ETH-correlated assets, and his HF is calculated based on collateral from reserves in ETH-Correlated, but he still can supply USDC and set it as collateral.
Not useful in terms of improving custom HF, but he can still earn rewards from it and leave it ready in case he turns e-mode off.
Now both related tests are passing

Closes AAVE-857, AAVE-858