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

Rebalancing : before removing the portfolio tokens, rewards are not claimed #99

Open
hats-bug-reporter bot opened this issue Jul 4, 2024 · 5 comments
Labels
invalid This doesn't seem right

Comments

@hats-bug-reporter
Copy link

Github username: @aktech297
Twitter username: kaka
Submission hash (on-chain): 0xb972d59694c5b645a205b3dc0fbebba52375932e1af82857051e01a35e7266d1
Severity: medium

Description:
Description

In Rebalancing contract, the assetmanager can call the function s removePortfolioToken, removeNonPortfolioToken removePortfolioTokenPartially and removeNonPortfolioTokenPartially to remove any of the portfolio tokens from the actie array.

The issue here is, the rewards claiming are missed in those function.

If we see the portfolio tokens, these can be staked in the various activities like staking, liquidity provision, or participation in DeFi protocols.

There is separate function to claim the rewards claimRewardTokens which can be called by the assetmanager.

As mentioned in the above functions, before removing the portfolio tokens, the claimRewardTokens call is missed.

Impact

loss of rewards.

Solution

We would suggest to call the claimRewardTokens function before removing the portoflio tokens.

@hats-bug-reporter hats-bug-reporter bot added the bug Something isn't working label Jul 4, 2024
@langnavina97
Copy link

The asset manager is responsible the process, and most protocols distribute rewards upon transfer. @aktech297

@langnavina97 langnavina97 added invalid This doesn't seem right and removed bug Something isn't working labels Jul 4, 2024
@aktech297
Copy link

Could you pls share the reference where the rewards are claimed during the transfer

@aktech297
Copy link

The asset manager is responsible the process, and most protocols distribute rewards upon transfer. @aktech297

Hi @langnavina97 . would you please explain in brief about this.

@langnavina97
Copy link

Most LP tokens or tokens with rewards will claim rewards on transfer. However, the asset manager is responsible for managing the portfolio. If there are any possible rewards that need to be claimed before removing the token, the asset manager should handle this to ensure all potential rewards are collected. @aktech297

@aktech297
Copy link

Most LP tokens or tokens with rewards will claim rewards on transfer. However, the asset manager is responsible for managing the portfolio. If there are any possible rewards that need to be claimed before removing the token, the asset manager should handle this to ensure all potential rewards are collected. @aktech297

Thats perfect.

But, make sure the assetmanager calls before removing token.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants