Skip to content
Business logic Audit finding Advanced

TON Observer processes each hash in the Outbound tracker and stores the result of the last nonce successfully processed

The TON Observer processes every hash in an Outbound tracker without stopping on errors, and the last successfully processed hash overwrites earlier results. A malicious Observer can add a failed withdrawal transaction with the same nonce so the outbound is recorded as failed, letting the sender claim both the withdrawal and a refund.

g Follow

Originally disclosed on Sherlock

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

Found by

g

Summary

When the TON Observer processes an Outbound tracker, it will process each hash without stopping if an error is encountered. The last tx hash successfully processed will overwrite any previous successful processing when it calls setOutboundByNonce(). This allows any malicious Observer to add the last tx hash to an Outbound Tracker to mess with the results intentionally.

Root Cause

Unlike the Bitcoin Observer, which will iterate every tx hash to find the truly included outbound, the TON Observer will only store the results of the last transaction it successfully processed as long as:

  1. It's a withdrawal transaction.
  2. The signer of the payload hash is the TSS address.

There is also no check that the transaction has incremented the nonce.

Internal Pre-conditions

None

External Pre-conditions

None

Attack Path

  1. Outbound 42 is a successful withdrawal where the sender has received their withdrawn amount.
  2. A malicious Observer can add the tx hash to the Outbound Tracker of Outbound 42 with a failed withdrawal transaction with the same nonce. This can naturally occur when multiple Observers try to broadcast the same Outbound transaction. They do this at the last moment to ensure their tx hash will dictate the observed status.
  3. When the Outbound Tracker for Outbound 42 is processed, their tx hash's results will be used, and it will be a receive_status of failed. This means the attacker can make a successful observation into a failed observation.
  4. Every Observer will vote on outbound 42 with a failed observation, marking it as a Pending Revert.
  5. The sender of the withdrawal ends up claiming both the withdrawal and the refund on their withdrawal, doubling their funds at the expense of Zetachain.

Impact

The protocol permanently loses funds equal to the withdrawal amount. The attacker/target will gain funds equal to their withdrawal amount, doubling their withdrawal amount.

PoC

No response

Mitigation

No response

The original report as published on Sherlock, by g. 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

Impact

The protocol could permanently lose funds equal to the withdrawal amount while the sender gains the same amount again.

What the attacker needed

Control of a TON Observer node; a pending outbound withdrawal

How it was found

  1. Outbound 42 is a successful withdrawal where the sender has received their withdrawn amount.
  2. A malicious Observer adds a failed withdrawal transaction with the same nonce to the Outbound Tracker of Outbound 42.
  3. When the Outbound Tracker is processed, the failed transaction's result is used and the receive status is failed.
  4. Every Observer votes on outbound 42 with a failed observation, marking it as a Pending Revert.
  5. The sender claims both the withdrawal and the refund, doubling their 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.

A cross-chain bridge watches the blockchain to confirm that a withdrawal really happened. Here, the watcher for the TON chain looked at several candidate transactions and kept only the result of the last one it could read, instead of checking which one was actually included. A dishonest watcher could slip in a failed transaction with the same number, so everyone recorded the withdrawal as failed and the user got a refund on top of the money already sent.

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 g

View all

23 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.