Skip to content
Business logic Audit finding Advanced

Lost funds on ZetaChain due to unprocessed ZEVM logs

In two code paths that call a target contract on ZetaChain's ZEVM, the logs emitted by that contract are not processed. If the contract calls the ZEVM gateway to withdraw, the tokens are burned but no outbound cross-chain transaction is created, so the user's funds are lost.

berndartmueller Follow

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2025-04-zetachain-cross-chain-judging/issues/319

This issue has been acknowledged by the team but won't be fixed at this time.

Found by

berndartmueller

Summary

In some instances, ZEVM logs that are emitted to signal the creation of outbound CCTXs are not processed, burning the user's funds on ZetaChain while not withdrawing them on the external chain.

Root Cause

In the following two instances,

the ZEVM on ZetaChain is invoked, and a target contract is called.

This contract might as well interact with ZetaChain's ZEVM gateway contract to initiate subsequent outbound CCTXs. For example, calling GatewayZEVM.withdraw(), which burns the user's ZRC-20 tokens and emits Withdrawn.

However, logs are not processed in those two instances, meaning no outbound CCTX is created, and the burned funds are not withdrawn on the external chain; they remain burned on ZetaChain. The user loses their funds.

This is in contrast to other situations where ZEVM logs are processed. For example, when depositing gas or ERC-20 tokens from an external chain to ZetaChain.

Internal Pre-conditions

N/A

External Pre-conditions

N/A

Attack Path

  1. User sends ZETA tokens from an external chain (e.g., Ethereum) to ZetaChain (ZEVM) with a contract call on ZetaChain
  2. On ZetaChain, the user's target contract interacts with the ZEVM gateway contract to initiate an outbound CCTX. ZRC-20 tokens are burned
  3. The emitted log is not processed, preventing the outbound CCTX from being created
  4. The user/contract on ZEVM loses their funds

Impact

Funds are burned on ZetaChain while not creating an outbound CCTX.

PoC

N/A

Mitigation

Consider always processing ZEVM logs to create outbound CCTXs.

The original report as published on Sherlock, by berndartmueller. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely, the two code paths that invoke a target contract on ZEVM do not process the resulting ZEVM logs, so gateway withdrawals that burn tokens never produce an outbound cross-chain transaction.

Impact

Funds are burned on ZetaChain without an outbound cross-chain transaction being created, so the user loses them; the team acknowledged the issue but will not fix it at this time.

What the attacker needed

User sends ZETA to ZetaChain with a contract call; target contract calls the ZEVM gateway to withdraw

The fix

The ZEVM logs should always be processed so that outbound cross-chain transactions are created, though the team has acknowledged the issue and will not fix it at this time.

How it was found

  1. A user sends ZETA tokens from an external chain to ZetaChain with a contract call on ZetaChain.
  2. The target contract on ZetaChain calls the ZEVM gateway to start an outbound cross-chain transaction, burning ZRC-20 tokens.
  3. The emitted log is not processed, so no outbound cross-chain transaction is created.
  4. The user or contract on ZEVM loses the funds.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

ZetaChain lets a contract on one chain trigger actions on another chain. When a contract on ZetaChain asks to send tokens out, it burns them locally and emits a log that should trigger the outgoing transfer. In two situations the software forgets to read that log, so the tokens are destroyed but never sent anywhere, and the user loses them.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by berndartmueller

View all

97 more disclosed reports, best first.

More from ZetaChain Cross-Chain

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.