hats-finance / Velvet-Capital-0x0bb0c08fd9eeaf190064f4c66f11d18182961f77

Core smart contracts of Velvet Capital
Other
0 stars 1 forks source link

Don't Allow portfoliotoken share transfers and portfolio token removals during pause state #102

Open hats-bug-reporter[bot] opened 2 months ago

hats-bug-reporter[bot] commented 2 months ago

Github username: @burhankhaja Twitter username: imaybeghost Submission hash (on-chain): 0xa56efc689f4e99d556a9e6b1aa93b0e4897afad1796ef110dcc03c202373e54e Severity: medium

Description: Description\ During the pause state, the protocol prevents user deposits and withdrawls (minting and burning) but it doesn't restrict token transfers via transfer(). (PortfolioToken.sol)

Similarly, for the asset manager in Rebalancing contract, the protocol restricts updateWeights() && updateTokens() but doesn't restrict token removal functions. Which kinda break the purpose of pausing mechanisms.

Since Pausing a smart contract is typically done to minimize the impact of exploits on user funds, mitigate security issues, and allow for flexible debugging.

Attack Scenario\ Since this is business logic flaw:

Recommendation\ .

Attachments

  1. Proof of Concept (PoC) File

  2. Revised Code File (Optional)

langnavina97 commented 2 months ago

For transfers, it's not required. For removing tokens, we've added it to our findings in the sheet yesterday. @burhankhaja

Bildschirm­foto 2024-07-04 um 11 43 16
burhankhaja commented 2 months ago

Hey @langnavina97 i was talking to Hats finance security team and they recommended me to first resolve this issue here, if not then they recommended to escalate it later

Since in audit contest, general rule applies that you can't update the codebase or publicly known issues while the contest is live.