Skip to content

N-02 Relay Tokens From L1 Emits Empty Transaction Hash When Relaying USDC through CCTP #976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 28, 2025

Conversation

bmzig
Copy link
Contributor

@bmzig bmzig commented Apr 25, 2025

The relayTokens functions [1] [2] are used to bridge tokens from L1 to ZK Stack. Both instances define a txHash variable [1] [2] which will later be assigned to the transaction hash value returned by the BRIDGE_HUB when initiating a bridging transaction. However, in both cases [1] [2] when CCTP is enabled, the _transferUsdc function is used, bypassing the BRIDGE_HUB. This function does not return a transaction hash, however, causing the relayTokens functions to emit an empty ZkStackMessageRelayed event [1] [2]. This behavior can be confusing for users, especially when trying to index the event based on the emitted hash.

In case no off-chain components rely on the emitted event, consider removing the emitted event to avoid confusion. Otherwise, consider adding thorough documentation for the ZkStackMessageRelayed event, outlining its expected behavior.

I don't believe we use ZkStackMessageRelayed anywhere off-chain, so I agree with the suggestion to remove it if it is unnecessary.

Copy link
Contributor

@pxrl pxrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 no instances of ZkStackMessageRelayed are found in the relayer repository.

@bmzig bmzig merged commit f3887a5 into audit-zkstack-usdc Apr 28, 2025
9 checks passed
@bmzig bmzig deleted the bz/n02-zksync branch April 28, 2025 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants