Skip to content
DoS Audit finding Intermediate

Dos of smart contracts on bridging functions

The DexAggregatorWrapperWithPredicateProxy contract refunds excess ETH by sending its entire balance to the caller, which fails if the caller cannot accept native tokens. An attacker can send a tiny amount of ETH to the wrapper before a victim contract calls deposit or bridge, causing the refund to revert and the victim's transaction to fail.

funkornaut Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

52690 sc medium dos of smart contracts on bridging functions

Submitted on Aug 12th 2025 at 12:55:04 UTC by @funkornaut for Attackathon | Plume Network

Brief / Intro

Smart contracts that cannot accept native tokens can be DoS'ed when interacting with the DexAggregatorWrapperWithPredicateProxy deposit and bridge functions.

Vulnerability Details

DexAggregatorWrapperWithPredicateProxy exposes an open receive function and uses an internal refund helper which forwards the full contract balance to a recipient:

{% code title="DexAggregatorWrapperWithPredicateProxy::_refundExcessEth" %}

Solidity
function _refundExcessEth(address payable _recipient) internal {
    uint256 balance = address(this).balance;
    if (balance > 0) {
        (bool success,) = _recipient.call{ value: balance }("");
        if (!success) {
            revert DexAggregatorWrapper__EthRefundFailed();
        }
    }
    // If balance is 0, do nothing.
}

{% endcode %}

Because refunds use a direct call that requires the recipient to be able to accept native tokens, a malicious actor can send a tiny amount of ETH (e.g., 1 wei) to the DexAggregatorWrapperWithPredicateProxy before a target contract calls the bridge/deposit functions. When the target contract (which lacks a payable receive/fallback) is expected to receive a refund, the refund attempt reverts and causes the overall transaction to fail.

Additionally, native tokens can slowly accumulate in the wrapper contract over normal usage, increasing the chance of incompatibility with contracts that cannot accept native tokens.

{% hint style="danger" %} This is a Denial-of-Service vector: contracts without payable receive/fallback functions can be prevented from successfully invoking deposit/bridge functions that attempt to refund ETH. {% endhint %}

Impact

Denial of service of smart contracts on deposit and bridge functions: interacting contracts that cannot accept native ETH will have their transactions revert when the contract attempts to refund accumulated ETH.

Proof of Concept

{% stepper %} {% step %}

Step

Attacker observes a contract (the victim) without a receive or fallback payable function preparing to call a bridge/deposit function on DexAggregatorWrapperWithPredicateProxy. {% endstep %}

{% step %}

Step

Attacker sends 1 wei (or any small amount of native ETH) to DexAggregatorWrapperWithPredicateProxy prior to the victim's transaction. {% endstep %}

{% step %}

Step

Victim contract calls the bridge/deposit function. During execution the wrapper calls _refundExcessEth(victim) which performs a call{ value: balance }("") to the victim. Since the victim cannot accept native tokens, the call fails, reverting the wrapper and causing the victim's transaction to revert — resulting in DoS. {% endstep %} {% endstepper %}

References

<details> <summary>View referenced source lines</summary> </details>

The original report as published on Immunefi, by funkornaut. 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 refund helper sends the entire contract balance to the recipient using a direct call that requires the recipient to accept native tokens, without checking if the recipient can do so.

Impact

Contracts that cannot accept native ETH are prevented from successfully using deposit and bridge functions because their transactions revert when the wrapper attempts to refund accumulated ETH.

What the attacker needed

Victim contract cannot accept native tokens; attacker can send ETH to the wrapper

How it was found

  1. Attacker observes a victim contract without a payable receive or fallback function preparing to call a bridge or deposit function on the wrapper.
  2. Attacker sends a small amount of native ETH to the wrapper before the victim's transaction.
  3. Victim contract calls the bridge or deposit function; the wrapper attempts to refund the entire balance to the victim, which fails because the victim cannot accept native tokens, causing the transaction to revert.

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.

Some smart contracts are not designed to receive the blockchain's native currency (like ETH). This wrapper contract tries to refund leftover ETH to whoever calls it, but if the caller cannot accept ETH, the whole transaction fails. An attacker can force this failure by sending a tiny amount of ETH to the wrapper first, making the refund attempt happen and fail.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by funkornaut

View all

4 more disclosed reports, best first.

More from Plume Network

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.