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

Existing depositors can re-deposit their funds into frozen strategies #322

Open
code423n4 opened this issue May 4, 2023 · 6 comments
Open
Labels
bug Something isn't working downgraded by judge Judge downgraded the risk level of this issue duplicate-199 grade-a Q-11 QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2023-04-eigenlayer/blob/main/src/contracts/core/StrategyManager.sol#L798

Vulnerability details

Impact

There are two ways to stop users from depositing into a strategy:

  1. you pause all deposits
  2. you remove a specific strategy from a whitelist

But, those only prevent new funds from being deposited. Existing shares can be redeposited into frozen strategies through the withdrawal system.

Proof of Concept

When withdrawing, you can specify whether you want to receive the underlying tokens or the strategy shares. If the withdrawer selects the strategy shares, the contract doesn't check whether deposits into the strategy are allowed or not.

While you're not able to deposit new funds, you can create a sort of secondary market for existing shares of the given strategy:

  1. Alice owns 100 shares in strategy X
  2. Strategy X is removed from the whitelist by the protocol owner
  3. Bob was planning to deposit into strategy X as well but can't do it anymore.
  4. Alice agrees to sell her 100 shares to Bob.
  5. Alice queues a withdrawal with Bob as the recipient
  6. Bob sends Alice Y a number of tokens worth 100 shares of strategy X

Tools Used

none

Recommended Mitigation Steps

If a strategy is removed from the whitelist or deposits are fully paused, _completeQueuedWithdrawal() should always withdraw the underlying tokens from the strategy.

Assessed type

Invalid Validation

@code423n4 code423n4 added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working labels May 4, 2023
code423n4 added a commit that referenced this issue May 4, 2023
@c4-pre-sort
Copy link

0xSorryNotSorry marked the issue as primary issue

@c4-pre-sort c4-pre-sort added the primary issue Highest quality submission among a set of duplicates label May 9, 2023
@Sidu28
Copy link

Sidu28 commented May 12, 2023

This is intended. No new deposit has occured.

@c4-sponsor c4-sponsor added the sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue label May 12, 2023
@c4-sponsor
Copy link

Sidu28 marked the issue as sponsor disputed

@c4-judge
Copy link
Contributor

c4-judge commented Jun 1, 2023

GalloDaSballo marked the issue as duplicate of #199

@c4-judge c4-judge closed this as completed Jun 1, 2023
@c4-judge c4-judge added duplicate-199 downgraded by judge Judge downgraded the risk level of this issue QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax and removed primary issue Highest quality submission among a set of duplicates 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value labels Jun 1, 2023
@c4-judge
Copy link
Contributor

c4-judge commented Jun 6, 2023

GalloDaSballo changed the severity to QA (Quality Assurance)

@c4-judge
Copy link
Contributor

c4-judge commented Jun 8, 2023

GalloDaSballo marked the issue as grade-a

@C4-Staff C4-Staff reopened this Jun 8, 2023
@C4-Staff C4-Staff added the Q-11 label Jun 8, 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 downgraded by judge Judge downgraded the risk level of this issue duplicate-199 grade-a Q-11 QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
Projects
None yet
Development

No branches or pull requests

6 participants