Skip to content
Business logic Audit finding Intermediate

Dispatcher does not check if native transfers are successful

The Dispatcher contract performs native token transfers without checking whether the transfer succeeded. If a transfer to a recipient fails, the funds remain stuck in the Router, and an attacker could later use the transfer function to steal them.

hgrano Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

#44158 [SC-Low] Dispatcher does not check if native transfers are successful

Submitted on Apr 17th 2025 at 12:01:36 UTC by @hgrano for Audit Comp | Spectra Finance

Description

Brief/Intro

Dispatcher allows for native transfers but the call status is not checked i.e. if called on a contract which reverts, then the funds will be left in the Router. An attacker could then use the native transfer functionality to take the native tokens for themselves.

Vulnerability Details

On Dispatcher.sol:485, the success flag isn't checked. If the recipient is unable to handle the native transfer, then this will silently fail and the native token is left in the Router. This would generally be caused by user error, but regardless, an attacker/bot could notice the failed transfer and use the TRANSFER_NATIVE command to send the tokens to their own wallet.

Impact Details

The impact is potential permanent loss of funds as described above.

References

Dispatcher.sol:485 https://github.com/immunefi-team/Spectra-Audit-Competition/blob/1cebdc67a9276fd87105d13f302fd77d000d0c0b/src/router/Dispatcher.sol#L485

Proof of Concept

Proof of Concept

The issue could be exploited by an attacker through:

  1. Creating a bot to monitor the mempool for transactions that may cause the native transfer to fail.
  2. If a transaction is detected, backrun it, transferring the native token back to the attacker's wallet.

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

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

The contract does not check the success flag returned by the low-level call used for native token transfers.

Impact

Potential permanent loss of funds, as an attacker could take native tokens left in the Router after a failed transfer.

What the attacker needed

A failed native transfer leaves funds in Router; attacker can monitor mempool and backrun

The fix

The contract should check the success flag of the native transfer and revert if it fails.

How it was found

  1. Create a bot to monitor the mempool for transactions that may cause the native transfer to fail.
  2. If such a transaction is detected, backrun it, transferring the native token back to the attacker's wallet.

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.

When a smart contract sends cryptocurrency (native tokens) to another address, it should check that the transfer actually worked. Here, the contract ignores the result, so if the recipient rejects the payment, the money stays in the contract. Anyone can then call a function to send those leftover tokens to themselves.

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 hgrano

View all

10 more disclosed reports, best first.

More from Spectra Finance

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.