Platform: Code4rena
Start Date: 28/10/2022
Pot Size: $165,500 USDC
Total HM: 2
Participants: 24
Period: 12 days
Judge: GalloDaSballo
Total Solo HM: 1
Id: 177
League: ETH
Rank: 14/24
Findings: 1
Award: $250.77
🌟 Selected for report: 0
🚀 Solo Findings: 0
250.7706 USDC - $250.77
In the deposit function of the L1*Bridge contract, ETH is sent to zkSyncMailbox as zkSyncFee.
function deposit( address _l2Receiver, address _l1Token, uint256 _amount ) external payable nonReentrant senderCanCallFunction(allowList) returns (bytes32 txHash) { uint256 amount = _depositFunds(msg.sender, IERC20(_l1Token), _amount); require(amount > 0, "1T"); // empty deposit amount bytes memory l2TxCalldata = _getDepositL2Calldata(msg.sender, _l2Receiver, _l1Token, amount); txHash = zkSyncMailbox.requestL2Transaction{value: msg.value}( l2Bridge, 0, // L2 msg.value l2TxCalldata, DEPOSIT_ERGS_LIMIT, new bytes[](0) );
However, in MailboxFacet there is no proper function to withdraw zkSyncFee, which causes these ETH to be locked in the MailboxFacet contract. And, although MailboxFacet is upgradable, according to https://github.com/code-423n4/org/issues/11, this should be medium.
https://github.com/code-423n4/2022-10-zksync/blob/4db6c596931a291b17a4e0e2929adf810a4a0eed/ethereum/contracts/bridge/L1EthBridge.sol#L88-L104 https://github.com/code-423n4/2022-10-zksync/blob/4db6c596931a291b17a4e0e2929adf810a4a0eed/ethereum/contracts/bridge/L1ERC20Bridge.sol#L111-L126 https://github.com/code-423n4/2022-10-zksync/blob/4db6c596931a291b17a4e0e2929adf810a4a0eed/ethereum/contracts/zksync/facets/Mailbox.sol#L106-L114
None
Consider implementing functions to withdraw zkSyncFee
#0 - c4-judge
2022-11-16T19:11:00Z
GalloDaSballo marked the issue as duplicate of #279
#1 - GalloDaSballo
2022-11-27T20:28:02Z
L
#2 - c4-judge
2022-11-27T20:28:05Z
GalloDaSballo changed the severity to QA (Quality Assurance)
#3 - c4-judge
2022-12-03T19:13:25Z
GalloDaSballo marked the issue as grade-c
#4 - c4-judge
2022-12-08T23:46:59Z
GalloDaSballo marked the issue as grade-b
#5 - GalloDaSballo
2022-12-08T23:47:31Z
With 4 Low Severity finding, am giving it 2 bonus points to award a B