Skip to content
Smart contracts Audit finding Beginner

Not checking call success in TRANSFER_NATIVE

The smart contract's native transfer function does not check whether the low-level call to send Ether succeeded. An attacker could cause a transfer to fail silently, leaving the user unaware that the funds were not sent.

PotEater Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

#43408 [SC-Low] Not checking call success in `TRANSFER_NATIVE`

Submitted on Apr 5th 2025 at 16:53:29 UTC by @PotEater for Audit Comp | Spectra Finance

Description

Brief/Intro

In the function _dispatch you are making a call to another address with ether, but there is no check whether the call was successful or not. This could lead to user frustration and inefficiencies.

Vulnerability Details

The call function is a low-level operation in Solidity that is used to send Ether to an address. It returns a boolean value, success, indicating whether the call was successful or not. However, in this case, the success value is not being checked or handled.

Solidity
(bool success, ) = payable(recipient).call{value: amount}("");
// no check if call succeeded or not.

Impact Details

Without error handling for the call failure, users may assume their transaction was successful, leading to confusion and frustration when they don’t see the expected results. This could erode trust in the contract and result in users abandoning the platform.

This is a security best practice.

References

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

Proof of Concept

Proof of Concept

Solidity
 else if (command == Commands.TRANSFER_NATIVE) {
            (address recipient, uint256 amount) = abi.decode(_inputs, (address, uint256));
            (bool success, ) = payable(recipient).call{value: amount}(""); 
// forgot to check if the call was successful or not

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

Likely the contract fails to check the boolean success value returned by the low-level call used to transfer native currency.

Impact

Users may believe their transaction succeeded when the Ether transfer actually failed, leading to confusion and loss of trust; no direct loss of funds is claimed.

What the attacker needed

None

The fix

The contract should check the success boolean and revert if the call fails.

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 to another address, it uses a low-level call that returns a true or false value indicating success. This contract ignores that value, so if the transfer fails, the transaction still completes without any error. A user might think their funds were sent when they were not.

What is Smart contracts?

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.

More by PotEater

View all

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

Smart contract vulnerabilities

The lesson behind this report.

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.