Skip to content
DoS Audit finding Intermediate

Attackers can flood solvers with thousands of requests and prevent fee payouts

The fee distribution model pays solvers only after results are posted on-chain, and an attacker can deploy contracts that revert on receiving refunds, causing fee transfers to fail. This forces solvers to process many requests without compensation and overloads the system.

000000 Follow with 0xMgwan, 0xlookman and 9 others

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2024-12-seda-protocol-judging/issues/217

Found by

000000, 0xMgwan, 0xlookman, Boy2000, Kodyvim, PASCAL, blutorque, g, gegul, leopoldflint, rsam_eth, zxriptor

Summary

The current fee distribution model compensates solvers only after the result is posted on-chain—a fee system known as the push model. In this design, solver must call the postResult function to trigger fee payments. However, this mechanism can be exploited. An attacker can deploy tens of smart contracts that appear to submit attractive requests with generous fees, but are engineered to revert on native token transfers upon receiving the refund amounts.

Solidity
        // Example: Attacker switches the `revertOnReceiveEther` in their contract to true, to prevent a result from getting posted
        if (refundAmount > 0) {
            _transferFee(requestDetails.requestor, refundAmount);
            emit FeeDistributed(result.drId, requestDetails.requestor, refundAmount, ISedaCore.FeeType.REFUND);
        }

(these contracts may even include an on/off switch that bypasses solvers’ checks for whether the requester can receive Ether). As a result, the network is forced to process these requests. Then, just before the results are posted, the attacker can disable Ether acceptance, thereby preventing fee transfers. Once the timeout period expires, the attacker can withdraw funds from all the requests using withdrawTimedOutRequest. In effect, the attacker incurs only minimal gas fees (especially on L2s) while overloading solvers and the Seda chain with tasks.

Root Cause

After a request is posted, its fees remain in the contract until results are posted using the postResult function. The fee distribution occurs only after solvers submit the results and the contract verifies that the result ID is included in the batch’s resultsRoot.

For the malicious requester to trigger a revert during the native token transfer (thus blocking fee distribution), the refundAmount must be greater than zero. This can be achieved by setting the request.gasLimit slightly higher than the actual gas used, When the fee is calculated: https://github.com/sherlock-audit/2024-12-seda-protocol/blob/main/seda-evm-contracts/contracts/core/SedaCoreV1.sol#L162

Solidity
                // Split request fee proportionally based on gas used vs gas limit
                //@audit if gasLimit > gasUsed, then submitterFee < requestDetails.requestFee
                uint256 submitterFee = (result.gasUsed * requestDetails.requestFee) / requestDetails.gasLimit;
                if (submitterFee > 0) {
                    _transferFee(payableAddress, submitterFee);
                    emit FeeDistributed(result.drId, payableAddress, submitterFee, ISedaCore.FeeType.REQUEST);
                }
                //@audit remaining amount to refund
                refundAmount += requestDetails.requestFee - submitterFee;

Later, when transferring the refund to the requester:

Solidity
        // Aggregate refund to requestor containing:
        // - unused request fees (when gas used < gas limit)
        // - full request fee (when invalid payback address)
        // - batch fee (when no batch sender)
        if (refundAmount > 0) {
            _transferFee(requestDetails.requestor, refundAmount);
            emit FeeDistributed(result.drId, requestDetails.requestor, refundAmount, ISedaCore.FeeType.REFUND);
        }

If the requester is a contract that reverts on receiving native tokens, the transfer will fail. For instance:

Solidity
contract Malicious {
    //...rest of the code
    bool acceptEther;
    receive() external payable {
        if (!acceptEther) revert();
    }
    //...rest of the code
}

Finally, after the timeout period (_storageV1().timeoutPeriod), the attacker can withdraw the funds from all requests by calling withdrawTimedOutRequest.

Internal Pre-conditions

  • Contract not be in paused state

External Pre-conditions

  • Solvers are actively picking up requests with sufficiently attractive fees.
  • Solvers are posting results back to SedaCoreV1 using the postResult function.
  • The requester is a contract engineered to reject native token transfers (with an on/off switch for Ether reception), allowing later withdrawal of funds.

Attack Path

  • The attacker deploys 100 different smart contracts with identical behavior (including an on/off feature for receiving Ether) on Optimism.
  • Each malicious contract submits 100 requests with sufficiently high fees to attract solvers.
  • Solvers pick up these requests one by one and relay them to the Seda chain.
  • The requests are processed on the Seda network.
  • The results are batched and posted on-chain.
  • When a solver attempts to post the results to claim the fees, the attacker disables Ether reception in the malicious contracts.
  • As a result, fee transfers to solvers revert.
  • Solvers become congested with 100 × 100 = 10,000 processed requests that yield no fee payouts, overloading the system.

Impact

  • Uncompensated Solvers and SEDA Chain:
    The attack causes solvers to perform all necessary computations and batch processing without receiving any compensation.

  • Potential Network Instability:
    Over time, the inability to compensate solvers may lead to decline in the overall performance (since attacker can perform major request attacks each time from ananymous contracts) and trust in the blockchain ecosystem.

PoC

n/a

Mitigation

Instead of using a push model for fee distribution, a pull model should be adopted. In a pull model, all parties are credited with the appropriate amounts of native tokens within the contract. They can then withdraw these funds at their discretion.

Discussion

sherlock-admin2

The protocol team fixed this issue in the following PRs/commits: https://github.com/sedaprotocol/seda-evm-contracts/pull/96

The original report as published on Sherlock, by 000000. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.

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 fee distribution uses a push model where refunds to the requester are sent during result posting, and a reverting requester contract blocks the entire fee transfer.

Impact

Solvers may perform computations without compensation, potentially leading to network instability and loss of trust.

What the attacker needed

Attacker deploys malicious contracts; Solvers pick up requests; Contract not paused

The fix

The protocol team fixed this issue by adopting a pull model for fee distribution, where parties can withdraw their funds at their discretion.

How it was found

  1. The attacker deploys many smart contracts that can toggle whether they accept Ether.
  2. Each contract submits many requests with high fees to attract solvers.
  3. Solvers pick up the requests and process them on the Seda chain.
  4. Results are batched and posted on-chain.
  5. When a solver tries to post results, the attacker disables Ether reception, causing fee transfers to revert.
  6. After the timeout period, the attacker withdraws the funds from all requests.

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 solver completes a request, the system sends the fee to the solver and any leftover fee back to the requester. If the requester is a smart contract that refuses to accept the leftover fee, the whole payment fails. An attacker can use this to make solvers do work for free.

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 000000

View all

32 more disclosed reports, best first.

More from SEDA Protocol

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.