Closed code423n4 closed 1 year ago
Looks off for High Severity.
I don’t think that we should support a blacklist/whitelist of supported token. It is reference bridge implementation for the tokens that don’t have complicated token logic. So, invalid issue!
miladpiri marked the issue as sponsor disputed
For discussion similar to using "rebase and feeOnTransfer" tokens, we could argue that certain tokens may cause self-rekt, hence a QA finding.
Because the issue was sent as High Severity, am closing as overly inflated
GalloDaSballo marked the issue as unsatisfactory: Overinflated severity
Lines of code
https://github.com/code-423n4/2022-10-zksync/blob/main/ethereum/contracts/bridge/L1ERC20Bridge.sol#L111-L132
Vulnerability details
Vulnerability Details
We noticed that the
deposit
function of theL1ERC20Bridge
contract (code snippet 1) permits a user to bridge any ERC-20 tokens (including deflationary and rebase tokens) from the L1 to the L2 network.We considered that permitting non-standard ERC-20 tokens, such as deflationary or rebase tokens, could cause unexpected behaviors introducing potential attacks on the dApps (Decentralized Applications) running on the L2 network.
For instance, if a deflationary token (e.g., SafeMoon) was bridged to the L2 network, that token would be treated like a standard non-deflationary ERC-20 token. In other words, the same deflationary token on L1 and L2 would have different mechanisms.
Impact
We considered that permitting non-standard ERC-20 tokens, such as deflationary or rebase tokens, could cause unexpected behaviors introducing potential attacks on the dApps (Decentralized Applications) running on the L2 network.
For this reason, we considered this issue high severity.
Proof of Concept
https://github.com/code-423n4/2022-10-zksync/blob/main/ethereum/contracts/bridge/L1ERC20Bridge.sol#L111-L132
Tools Used
VSCode (Manual Review)
Recommended Mitigation Steps
We recommend employing an allowlist for bridgeable ERC-20 tokens to enhance the security of all dApps running on the L2 network.