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

Centralization Risk, sweep tokens doesn't protect tokenized deposits #55

Open
hats-bug-reporter bot opened this issue Jul 1, 2023 · 1 comment
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@hats-bug-reporter
Copy link

Github username: @GalloDaSballo
Submission hash (on-chain): 0x39e6bdd72c6d292861d39347759d05434e7dfa37f4bbf1c8f6089f093fe6de87
Severity: low severity

Description:
Description
RescueRewardTokens doesn't prevent sweeping away the underlying deposits

Any token can be reward, some / most new gauges (e.g. Convex / Aura) are ERC4626 tokens meaning they can be sweeped away as well

Attack Scenario
For whatever reason, either via a Multisig Compromise, or a Governance takeover, the manager decides to sweep away the Tokenized Deposits, breaking the protocol functionality and stealing deposits

Code Snippet

reward.safeTransfer(receiver, reward.balanceOf(address(this)));
}

    reward.safeTransfer(receiver, reward.balanceOf(address(this)));

POC
reward.safeTransfer(AURA_DEPOSIT, AMT, {"from": manager})

Revised Code File

  function rescueRewardTokens(IERC20 reward, address receiver) external onlyManager {
    require(!protected(reward)); // Check if token is protected, make gauges protected when staking starts
    reward.safeTransfer(receiver, reward.balanceOf(address(this)));
  }
@hats-bug-reporter hats-bug-reporter bot added the bug Something isn't working label Jul 1, 2023
@ksyao2002
Copy link

ksyao2002 commented Jul 1, 2023

Thanks for the report. Underlying tokens that are deposited are never owned by the IncentivesController. It either immediately stakes the tokens or unstakes them and sends them back to the aToken contract. Thus, such a risk would not pose a problem.

@ksyao2002 ksyao2002 added the invalid This doesn't seem right label Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant