Unchecked External Calls in Solidity

Unchecked external calls in Solidity let silent failures corrupt contract state: when call() return value is ignored

SECURITY4 min readBy AlgoSys Editorial TeamPublished Apr 24, 2026Updated Nov 28, 2026
Contents

Unchecked external calls are one of the most dangerous vulnerabilities in Solidity smart contracts. The vulnerability lets an attacker manipulate a contract's logic by exploiting the fact that the code ignores the return value of a low-level call. This problem has surfaced in a large number of DeFi exploits and led to major financial losses. The primary targets are protocols with complex interactions and weak validation of responses from external contracts.

High-profile incidents show how destructive the results can be: the Poly Network hack in 2021 and the Ronin bridge exploit in 2022. These cases serve as a reminder that any interaction with an external contract requires strict security discipline. Protocols that do not properly verify the outcome of external calls remain open targets for carefully planned attacks.

The most common targets are decentralized finance (DeFi, financial services without intermediaries) protocols, liquidity pools, and cross-chain bridges, because all of them depend heavily on inter-contract interaction. An attacker aims either to drain funds or to disrupt network operations by pushing the contract into an unintended state. That is why vigilance and adherence to proven practices matter for everyone who writes smart contracts.

MECHANICS

The vulnerability arises when a contract calls another contract via low-level functions (call, delegatecall, staticcall) without checking whether the operation succeeded. Each of these functions returns a boolean value (true on success, false on failure) along with any returned data. If the contract ignores this value, it continues operating as though the call succeeded, even though it actually failed.

That is exactly what the attacker exploits. They deploy a malicious contract that deliberately reverts or fails during the external call. The vulnerable contract, unaware of the failure, calmly executes important operations based on a false assumption. For example, a transfer function may record a token transfer as successful even though the underlying call to the token contract did not go through.

The outcome is usually one of two things: a scenario resembling reentrancy, or corruption of the contract's state. The attacker controls the execution flow by making the external call fail in a way that benefits them, for instance by preventing a state update or provoking an unintended state change. The root cause is almost always the same: the absence of a simple require(success) check.

RISK INDICATORS

Several signs give away unchecked external calls. You should be alert if a contract makes a low-level call (call, delegatecall, staticcall) and immediately does not look at the returned boolean, and then right after that call, without any check, executes state-changing operations. A warning sign is also the absence of checks like require(success, "Error message") (or equivalents) after any communication with an external contract.

Pay special attention to the movement of money and tokens. Dangerous are token transfers and fund movements that do not explicitly confirm that the underlying ERC-20 or native token transfer actually went through. Equally risky are protocols that in critical operations (withdrawals, internal accounting) simply assume that an external call completed successfully, without verifying it.

PROTECTION

The golden rule: check the result of every external call. Always read the boolean value returned by call, delegatecall, and staticcall. The typical safe pattern looks like this: (bool success, ) = external_contract.call(...); require(success, "External call failed");. A single require line turns a silent failure into an honest transaction revert.

For token interactions, rather than writing calls by hand, rely on well-audited libraries such as OpenZeppelin's SafeERC20. It wraps ERC-20 calls with the necessary checks and greatly reduces the risk of this vulnerability. Also make sure that all dependencies and imported contracts are secure and vetted, otherwise the weak link simply moves to them.

Do not skip audits. Bring in reputable firms that specialize in smart contract security and ask them to focus specifically on inter-contract interaction and the handling of all return values. During development, run the static analyzers Slither and Mythril to catch suspicious spots early.

And finally, build defense in layers (the "defense in depth" principle). That means access controls, rate limiting on operations, and circuit breakers (emergency stop mechanisms) where appropriate. Regularly revisit and update the contract's logic to address newly discovered vulnerabilities and fresh best practices, because unchanged code goes stale over time.

How to tell a safe call from a vulnerable one: if a require(success, ...) immediately follows address.call(...), or the result goes into a check before the contract updates any balances, that is the safe variant. If the returned bool is not used anywhere and the state is changed or funds are moved right after, that is the very vulnerability in question.

AFTERMATH

If an exploit through an unchecked call has already occurred, the first thing needed is containment. In practice this means pausing the contract's functionality, freezing specific assets, or, if possible, moving funds to a safe vault. The goal is simple: stop further exploitation and prevent the remaining funds from leaking out.

Next comes notification and evidence collection. Promptly report the incident to relevant communities and incident response channels, for example SEAL 911 or similar services. At the same time, document every action taken and collect traces of the attack: this data will be needed for forensic analysis and any possible fund recovery.

After that, bring in outside help. Work together with blockchain analytics firms and law enforcement agencies to trace the stolen assets and try to recover them. Full recovery of funds is rare, but coordinated efforts sometimes lead to the apprehension of the attackers or the return of a portion of what was stolen.

FAQ

What makes an unchecked external call dangerous?

The main problem is that the contract continues executing important operations assuming the external call succeeded, even if it actually failed. This leads to incorrect state updates, incorrect fund management, and ultimately to users losing assets.

How do you protect against unchecked calls in Solidity code?

Always check the boolean value returned by low-level functions (call, delegatecall, staticcall) and confirm it reports success before proceeding. For token interactions, use battle-tested libraries such as OpenZeppelin's SafeERC20: it wraps ERC-20 calls with the necessary checks.

Are there tools that detect this vulnerability?

Yes. The static analyzers Slither and Mythril identify code patterns indicative of unchecked calls as early as the development stage. A full security audit is also essential to catch these spots before going to production.

Why are DeFi protocols specifically the target?

Decentralized finance protocols, liquidity pools, and bridges depend heavily on inter-contract interaction, and they have more surfaces for error. An attacker causes an external call to fail in a way that benefits them, and drains funds or disrupts network operations.

Is it enough to just add require(success)?

It is the required minimum, but not the full protection. Checking the result must be combined with access controls, rate limiting on operations, circuit breakers (emergency stop mechanisms), and regular audits. Protection only works as a combined system.

What should you do in the first minutes after an exploit?

Containment first: pause the contract's functions, freeze the affected assets, or move funds to a safe vault if that is possible. Then report the incident to response channels such as SEAL 911 and document all evidence for further analysis.

Put this to work in the terminal

Live charts, derivatives, on-chain and macro data, free.

Open terminal →