sherlock-audit / 2024-02-rio-network-core-protocol-judging

4 stars 4 forks source link

almurhasan - Deposit pool balance can’t be deposited to eigenlayer in a case. #181

Closed sherlock-admin closed 7 months ago

sherlock-admin commented 7 months ago

almurhasan

medium

Deposit pool balance can’t be deposited to eigenlayer in a case.

Summary

Deposit pool balance can’t be deposited to eigenlayer if any user doesn't withdraw for a long time which will cause shareowed = 0 for a long time.

Vulnerability Detail

  1. Let assume for an asset, total shareowed = 0k for withdrawals and total address pool balance = 8k in the current epoch.
  2. The rebalance function is called, as sharesOwed = 0, rebalance will revert.

Impact

Those deposit pool asset’s balance will be unutilized and can’t earn any rewards.

Code Snippet

https://github.com/sherlock-audit/2024-02-rio-network-core-protocol/blob/main/rio-sherlock-audit/contracts/restaking/RioLRTCoordinator.sol#L133

Tool used

Manual Review

Recommendation

Remove sharesowed = 0 from the if statement.

Duplicate of #18

Almur100 commented 6 months ago

This also a valid issue. I think this is not a feature