ExocoreNetwork / exocore-contracts

5 stars 5 forks source link

Bug: native restaking withdrawal checks could be bypassed #84

Closed adu-web3 closed 2 months ago

adu-web3 commented 2 months ago

Description

It is intended that for Ethereum native restakers, they must call NativeRestakingController.processBeaconChainWithdrawal to verify beacon chain merkle proofs and withdraw from Exocore, while this intention could be bypassed by calling LSTRestakingController.withdrawPrincipalFromExocore to specify token parameter as VIRTUAL_STAKED_ETH_ADDRESS(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)

This is because we use the same Action for both withdrawal functions and from Exocore chain perspective, it can not tell whether the request was initiated from withdrawPrincipalFromExocore or processBeaconChainWithdrawal.

reference: https://skyharbor.certik.com/report/b766f0c2-165b-473a-86c6-cb33348df784?findingIndex=NRC-03