unstakeEth
is unreliable and depend on excess RocketDepositPool balance which can brick the whole protocol
unstakeEth
is unreliable and depend on excess RocketDepositPool balance which can brick the whole protocol
The protocol allows a user to call BridgeRouterFacet.unstakeEth() to unstake a amount of zETH and get back ETH at all times.
The Reth works differently.
Unstake are made by calling the rocketETHToken.burn()
function:
The issue with this is that the RocketTokenRETH.burn function only allows for excess balance to be withdrawn. I.e. ETH that has been deposited by stakers but that is not yet staked on the Ethereum beacon chain. So Rocketpool allows users to burn rETH and withdraw ETH as long as the excess balance is sufficient.If there is no excess balance because enough users burn rETH or the Minipool capacity increases, the protocol is bascially unable to operate.
Unstake Eth are then impossible
I show in this section how the current withdrawal flow for the Reth derivative is dependend on there being excess balance in the RocketDepositPool.
The current withdrawal flow calls RocketTokenRETH.burn which executes this code:
link
This executes withdrawDepositCollateral(ethAmount):
This then calls rocketDepositPool.withdrawExcessBalance(_ethRequired.sub(ethBalance)) to get the ETH from the excess balance:
And this function reverts if the excess balance is insufficient which you can see in the require(_amount <= getExcessBalance(), "Insufficient excess balance for withdrawal"); check.
Vscode
The solution for this issue is to have an alternative withdrawal mechanism in case the excess balance in the RocketDepositPool is insufficient to handle the withdrawal.
The alternative withdrawal mechanism is to sell the rETH tokens via the Uniswap pool.
You can use the RocketDepositPool.getExcessBalance to check if there is sufficient excess ETH to withdraw from Rocketpool or if the withdrawal must be made via Uniswap.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.