Skip to content
Business logic Audit finding Beginner

Missing Success Check for payable(recipient).call

The Dispatcher contract sends native tokens using a low-level call but does not check whether the call succeeded. If the recipient rejects the transfer, the transaction still succeeds and the funds remain stuck in the router.

Osuolale Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

#44175 [SC-Low] Missing Success Check for payable(recipient).call

Submitted on Apr 17th 2025 at 13:47:58 UTC by @Osuolale for Audit Comp | Spectra Finance

Description

Brief/Intro

The Dispatcher contract executes native token transfers (e.g., ETH) using a low-level .call but fails to check the success status returned by this call. This oversight means that if the native token transfer fails (for instance, if the recipient contract cannot receive Ether or reverts), the failure is silent. The transaction containing the command may still succeed, but the funds remain in the Dispatcher (router) contract, leading to inconsistent states, stranded assets, and potential disruption of batched operations that assume the transfer was successful.

Vulnerability Details

Within the _dispatch function, the Commands.TRANSFER_NATIVE command type facilitates sending native currency to a specified recipient. This is implemented using a low-level .call at line 485:

Solidity
(bool success, ) = payable(recipient).call{value: amount}("");

This call attempts to transfer amount wei to the recipient. The success variable captures whether the call executed without reverting on the recipient's side. However, the contract code proceeds without verifying if success is true.

Impact Details

The primary impact is the silent failure of native token transfers, leading to stranded assets and broken operational logic.

Trapped Funds: As demonstrated by the test case, native currency (e.g., ETH) sent to the router for a TRANSFER_NATIVE command can become permanently stuck within the router contract if the intended recipient cannot receive the funds. The user loses access to these funds, as the router has no mechanism to return them in this failure scenario. Inconsistent State / Broken Atomicity: Users interacting with the execute function expect the batch of commands to either succeed atomically or fail entirely. This vulnerability breaks that expectation for TRANSFER_NATIVE. Subsequent commands in the same batch might operate under the false assumption that the native transfer occurred, leading to incorrect calculations or state transitions. Loss of User Funds: The ETH sent by the user to the router for the transfer remains in the router. Since the transaction succeeded, the user has no direct recourse via transaction failure, and the funds are effectively lost to the user unless a separate recovery mechanism exists (which is unlikely for arbitrary trapped ETH). Undermined Protocol Reliability: The router fails to perform a core requested action (transferring native tokens) without any warning or reversion, undermining the reliability and predictability of the protocol's execution logic.

References

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

Proof of Concept

Proof of Concept

A user (innocentUser) intends to execute a batch of commands via the router.execute function, sending amount ETH along with the call. One of the commands is TRANSFER_NATIVE, instructing the router to send the received amount ETH to a specific recipient contract (VulnerableContract). The VulnerableContract is designed such that it cannot receive ETH (e.g., lacks a payable receive/fallback or its receiving function reverts). When the Dispatcher executes the .call{value: amount}("") to VulnerableContract, the call fails internally, and success becomes false. Crucially, the Dispatcher does not check the value of success. Execution continues, and the router.execute transaction completes successfully from the perspective of the innocentUser and the blockchain. However, the amount ETH was not transferred to VulnerableContract. Instead, it remains held within the Dispatcher/router contract.

The original report as published on Immunefi, by Osuolale. 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 return value of the low-level call used for native token transfers is not checked, so a failed transfer does not revert the transaction.

Impact

Native tokens can become permanently stuck in the router, and batched operations may continue under the false assumption that the transfer succeeded.

What the attacker needed

User sends native tokens via router.execute; recipient cannot receive native tokens

How it was found

  1. A user calls the router's execute function with a batch of commands and sends native tokens with the call.
  2. One command is TRANSFER_NATIVE, which tells the router to send the tokens to a recipient contract.
  3. The recipient contract cannot receive native tokens, so the low-level call fails and returns false.
  4. The router does not check the success value and continues execution.
  5. The transaction completes successfully, but the tokens remain in the router contract.

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 smart contract can send cryptocurrency to another address using a low-level instruction called a call. This instruction returns a true or false value to say whether the transfer worked. The code here ignores that value, so a failed transfer looks like a success and the money stays in the contract.

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