Skip to content

Hotfix rm#230

Merged
gowthamsundaresan merged 3 commits into
feat/v2-corefrom
hotfix-RM
Aug 24, 2025
Merged

Hotfix rm#230
gowthamsundaresan merged 3 commits into
feat/v2-corefrom
hotfix-RM

Conversation

@parsaaba

Copy link
Copy Markdown
Collaborator

No description provided.

@gowthamsundaresan gowthamsundaresan changed the base branch from dev to feat/v2-core August 20, 2025 23:05
Comment thread src/core/RewardsManager.sol Outdated

if (isSupported) {
supportedTokens[supportedCount] = currentToken;
// Only count newly claimable balance, not existing contract balance

@gowthamsundaresan gowthamsundaresan Aug 20, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey, I was thinking that we don't need to do this since we are happy to report the entire actual balance as the rewards. This is because we are only concerned the impact on the LAT. So in using the entire balance, we prevent the transfer loss issue, reduce computation of checking "balance before" and in any edge case of additional tokens above the merkle claim, we are able to use it in the LAT.

This pattern also becomes of actual use in the case of rebasing token being unsupported. So in case we do swapAndTransferRewards we can maintain the pattern of full token balance

Note on this was added to the struct definition in the interface

    /// @dev These values tell us the actual tokens realized by the LAT after a process claim procedure
    /// @dev The values may differ from the corresponding EL event due to rounding/transfer loss or unexepected token transfers to this contract
    /// @dev We are only concerned with actual value accured to LAT, exact EL data can be found via corresponding EL events

Any thoughts?

@gowthamsundaresan gowthamsundaresan Aug 20, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Note that this pattern differs from "balance before/after" in LTM/LT contracts because, here we are not concerned with specifying any token amount to transfer, by default the goal is for full token balance to be transferred

Comment thread src/core/RewardsManager.sol Outdated
for (uint256 i = 0; i < assets.length; i++) {
if (unsupportedAssetBalances[address(assets[i])] == 0 && amounts[i] > 0) {
unsupportedAssets.push(address(assets[i]));
address assetAddr = address(assets[i]);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If the comment above is accepted, do we still need to make this additive? We might as well reset it every time anyway?

@gowthamsundaresan gowthamsundaresan merged commit 6f97021 into feat/v2-core Aug 24, 2025
@gowthamsundaresan gowthamsundaresan deleted the hotfix-RM branch August 24, 2025 22:09
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.

2 participants