Open hats-bug-reporter[bot] opened 3 months ago
The previous tokens mapping is reset at the end of the function. The function specifically verifies whether there are any duplicate tokens in the provided token list and updates the token list if there are no duplicates.
Github username: -- Twitter username: -- Submission hash (on-chain): 0x2e409c32dc9c95c7cfe5cbd253ddbf8a1f65fca3434b561556227bb8927fc8c6 Severity: medium
Description: Description
Rebalancing::removePortfolioToken()
removes an portfolio token from the portfolio. which can be called by the asset managerProof of Concept (PoC) File
for removing the token, it generates new token list excluding the token to be removed and calls
portfolio.updateTokenList(newTokens)
for updating the token listBut the issue is,
updateTokenList()
will revert withTokenAlreadyExist()
error since every token is part of previousToken and hence for those tokens_previousToken[token]
will be true