Closed howlbot-integration[bot] closed 6 months ago
CloudEllie marked the issue as primary issue
The try/catch won't mitigate anything. WETH will be present in the xRenzoBridgeContract and the xReceive can be triggered again through connext.
alcueca marked issue #373 as primary and marked this issue as a duplicate of 373
alcueca marked the issue as satisfactory
The try/catch would send the tokens at a better place to recover them, at least.
Lines of code
https://github.com/code-423n4/2024-04-renzo/blob/main/contracts/Bridge/L1/xRenzoBridge.sol#L175-L193 https://github.com/code-423n4/2024-04-renzo/blob/main/contracts/Bridge/L2/xRenzoDeposit.sol#L434
Vulnerability details
Impact
The
xReceive()
function insidexRenzoBridge.sol
does not follow the official recommendation applicable in case of a revert while making an external call i.e. using atry/catch
block while making external calls.It's important to note the following statement made in the Connext docs:
It then goes on to say that:
Hence, when xRenzoDeposit::sweep() makes a xcall to
xRenzoBridge::xReceive()
withbalance
, the following happens:balance
is passed into the_amount
param here.xRenzoBridge::xReceive()
internally callsrestakeManager.depositETH()
which is followed by wrapping of ezETH into xezETH via the lockbox and then burning the xezETH.restakeManager.depositETH()
call reverts, then as per the comments in the Connext documentation the_amount
WETH continues to remain in the contract. There is no provision now for an admin to retry the transaction and ensure that a correct amount ofxezETH
is burned and unwrapped WETH deposited into therestakeManager
.Although the admin can next use recoverERC20() to recover the WETH, the
xezETH
accounting remains unattended to.Proof of Concept
Tools Used
Manual review
Recommended Mitigation Steps
As has been officially recommended, enclose these external call inside
xRenzoBridge::xReceive()
in atry/catch
block which logs the failure of the transaction. Also add an admin controlled function which can then be called to retry the deposit & burn steps.Assessed type
Other