Skip to content
Business logic Audit finding Intermediate

Failed job can’t be recovered. NFT may be lost.

The executeJob function deletes the job record before attempting the bridge call, so if the call fails the job cannot be retried and the NFT is permanently lost. An attacker could cause the bridge call to fail, for example by providing insufficient gas, resulting in the loss of the NFT.

Chom Follow

Originally disclosed on Code4rena

Submitted by Chom, also found by 0x52, 0xA5DF, adriro, and ladboy233

HolographOperator.sol#L329 HolographOperator.sol#L419-L429

function executeJob(bytes calldata bridgeInRequestPayload) external payable {
...
delete _operatorJobs[hash];
...
    try
      HolographOperatorInterface(address(this)).nonRevertingBridgeCall{value: msg.value}(
        msg.sender,
        bridgeInRequestPayload
      )
    {
      /// @dev do nothing
    } catch {
      _failedJobs[hash] = true;
      emit FailedOperatorJob(hash);
    }
}

First, it will delete _operatorJobs[hash]; to have it not replayable.

Next, assume nonRevertingBridgeCall failed. NFT won’t be minted and the catch block is entered.

_failedJobs[hash] is set to true and event is emitted

Notice that _operatorJobs[hash] has been deleted, so this job is not replayable. This mean NFT is lost forever since we can’t retry executeJob.

Recommended Mitigation Steps

Move delete _operatorJobs[hash]; to the end of function executeJob covered in if (!_failedJobs[hash])

...
if (!_failedJobs[hash]) delete _operatorJobs[hash];
...

But this implementation is not safe. The selected operator may get slashed. Additionally, you may need to check _failedJobs flag to allow retry for only the selected operator.

gzeon (judge) commented:

While the use of non-blocking call is good to unstuck operator, consider making the failed job still executable by anyone (so the user can e.g. use a higher gas limit) to avoid lost fund. Kinda like how Arbitrum retryable ticket works. Can be high risk due to asset lost.

Trust (warden) commented:

I think it’s a design choice to make it not replayable. Sponsor discussed having a refund mechanism at the source chain, if we were to leave it replayable the refunding could lead to double mint attack.

alexanderattar (Holograph) commented:

This is a valid point and the desired code is planned but wasn’t implemented in time for the audit. We will add logic to handle this case.

gzeon (judge) increased severity to High and commented:

Since asset can be lost, I think it is fair to judge this as High risk.

alexanderattar (Holograph) resolved and commented:

We have a fix for this: https://github.com/holographxyz/holograph-protocol/pull/98/files#diff-552f4c851fa3089f9c8efd33a2f10681bc27743917bb63000a5d19d5b41e0d3f


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

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 job record is deleted before the external call, so a failed call leaves no way to retry.

Impact

The NFT could be permanently lost because the failed job cannot be retried.

What the attacker needed

A job that fails during bridge call

The fix

The job record should only be deleted after a successful bridge call, and failed jobs should be retryable, but the text notes this may require additional checks to prevent double minting.

How it was found

  1. Call executeJob with a bridge request payload.
  2. The function deletes the job record.
  3. The bridge call fails, entering the catch block.
  4. The job is marked as failed and cannot be retried.

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 job is processed, the contract first removes the job from its records and then tries to transfer an NFT. If the transfer fails, the job is marked as failed but cannot be run again because it was already removed. This means the NFT is stuck forever, and someone could deliberately make the transfer fail to cause this loss.

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 by Chom

View all

13 more disclosed reports, best first.

More from Holograph contest

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.