Validator may refuse to process the cross-chain transaction. #180
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
nullified
Issue is high quality, but not accepted
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
Lines of code
https://github.com/code-423n4/2022-10-zksync/blob/456078b53a6d09636b84522ac8f3e8049e4e3af5/ethereum/contracts/zksync/facets/Executor.sol#L152
https://github.com/code-423n4/2022-10-zksync/blob/456078b53a6d09636b84522ac8f3e8049e4e3af5/ethereum/contracts/zksync/facets/Executor.sol#L208
https://github.com/code-423n4/2022-10-zksync/blob/456078b53a6d09636b84522ac8f3e8049e4e3af5/ethereum/contracts/zksync/facets/Executor.sol#L221
https://github.com/code-423n4/2022-10-zksync/blob/456078b53a6d09636b84522ac8f3e8049e4e3af5/ethereum/contracts/zksync/facets/Executor.sol#L336
Vulnerability details
Impact
Currently the project trust model is that the governor and the validator to not act maliciously.
But if the validator refuse to process the cross-chain transaction, the user's fund is locked infinitely in the L1ERC20Bridge.sol and in L1ETHBridge.sol
Proof of Concept
In the current implementation, when user starts a cross-chain transfer, the user needs to call deposit and the cross-chain is put into a queue.
The validator needs to pop from the queue to process the job in first-in-first-out order.
However, if the validator just refuse to process the cross-chain transaction by calling the function that has the modifier onlyValidator in the Executor.sol. The transaction in the queue is stucked.
and
and
Tools Used
VS Code
Recommended Mitigation Steps
If the validator turns rogue, there is no cost for validator but the cost from the project and the cost from user is great. It is time confusing for governor and project to set up new validator infra.
I think a way to mitigate this to make sure the validator does the job is let them stake tokens and if they does not process transaction,
The protocol punish the validator by slashing their tokens.
The text was updated successfully, but these errors were encountered: