Skip to content
Business logic Audit finding Intermediate

TRANSFER_NATIVE in Dispatcher can lead to loss of funds due to not checking user can receive ETH

The Dispatcher contract's TRANSFER_NATIVE command performs a low-level ETH transfer but ignores the success boolean, so a failed transfer still lets the transaction succeed. This can leave ETH stuck in the contract, which an attacker could later steal by calling TRANSFER_NATIVE with themselves as recipient.

holydevoti0n Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

#43490 [SC-Low] TRANSFER_NATIVE in Dispatcher can lead to loss of funds due to not checking user can receive ETH

Submitted on Apr 7th 2025 at 09:09:16 UTC by @holydevoti0n for Audit Comp | Spectra Finance

Description

Brief/Intro

The TRANSFER_NATIVE command in the Dispatcher contract performs a low-level ETH transfer without verifying if the transfer was successful. This can lead to permanent loss of funds when sending ETH to addresses that cannot accept it.

Vulnerability Details

In the Dispatcher contract, the TRANSFER_NATIVE command is implemented as follows: https://github.com/immunefi-team/Spectra-Audit-Competition/blob/1cebdc67a9276fd87105d13f302fd77d000d0c0b/src/router/Dispatcher.sol#L483-L485

Solidity
if (command == Commands.TRANSFER_NATIVE) {
    (address recipient, uint256 amount) = abi.decode(_inputs, (address, uint256));
    (bool success, ) = payable(recipient).call{value: amount}("");
}

The issue is that the function retrieves the success boolean from the low-level call but does not verify that the transfer was successful. If the recipient is a contract without a receive() or fallback() function, or if these functions revert, the transfer will fail but the transaction will still proceed as if it succeeded.

Unlike ERC20 token transfers which revert on failure, low-level ETH transfers with .call{value}() only return a boolean indicating success. Without checking this boolean and reverting on failure, the system incorrectly assumes the transfer was successful, but the ETH never actually reaches the recipient.

Impact Details

  • Transaction will succeed when in fact it failed to send ETH to the user. This will cause the user to leave ETH in the contract which can be stolen later by anyone who calls the Router with TRANSFER_NATIVE setting himself as the recipient.

Recommendation

Modify the TRANSFER_NATIVE command to check the success boolean and revert if the transfer fails:

Diff
if (command == Commands.TRANSFER_NATIVE) {
    (address recipient, uint256 amount) = abi.decode(_inputs, (address, uint256));
    (bool success, ) = payable(recipient).call{value: amount}("");
+    if (!success) {
+        revert CallFailed();
+    }
}

Proof of Concept

  1. Alice deposits ETH into the Router contract.
  2. Alice attempts to transfer her ETH to a contract without receive/fallback functions using TRANSFER_NATIVE. The transfer fails but the transaction succeeds.
  3. Alice's ETH remains trapped in the Router contract as the code doesn't check the success boolean.
  4. Bob calls TRANSFER_NATIVE with themselves as recipient and steals Alice's trapped ETH.

The original report as published on Immunefi, by holydevoti0n. 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 boolean returned by the low-level ETH transfer call and revert on failure.

Impact

A failed ETH transfer can leave funds permanently stuck in the contract, and an attacker could later steal them by calling TRANSFER_NATIVE with themselves as recipient.

What the attacker needed

Victim sends ETH to a contract that cannot receive it; attacker can call TRANSFER_NATIVE

The fix

The TRANSFER_NATIVE command should check the success boolean and revert if the transfer fails.

How it was found

  1. Alice deposits ETH into the Router contract.
  2. Alice attempts to transfer her ETH to a contract without receive/fallback functions using TRANSFER_NATIVE; the transfer fails but the transaction succeeds.
  3. Alice's ETH remains trapped in the Router contract.
  4. Bob calls TRANSFER_NATIVE with themselves as recipient and steals Alice's trapped ETH.

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 Ether using a low-level call, it gets back a true/false value saying whether the send worked. This code ignores that value, so even if the send fails, the overall transaction still looks successful. That means the Ether can stay stuck in the contract, and someone else might be able to take it later.

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 holydevoti0n

View all

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