Status DataClose notification

Overlayer Disclosed Report

Audit Report

Regression in F-2026-1525 remediation can permanently lock bridged `OverlayerWrap` on the first Hub -> Spoke transfer to a fresh spoke deployment

Target

Target is hidden

This information is not publicly available.

Vulnerability details

This is a new in-scope regression introduced by the remediation of F-2026-1525 from the February 2026 Hacken audit report (Hub Chain OverLayer Supply Reduction After OFT Transfers Lead to supply() DoS). That prior finding concerned hub-side backing accounting after OFT burns reduced local totalSupply(). The remediation introduced totalBridgedOut so hub-side accounting can use totalSupply() + totalBridgedOut after OFT burns. However, the remediation was applied to every deployment instead of only to the hub deployment, which introduced a new spoke-side failure mode that was not present in the original issue.

The root cause of this regression is in the in-scope file contracts/overlayer/OverlayerWrapCore.sol: the remediation added totalBridgedOut bookkeeping, but _debit() always increments it and _credit() always decrements it on every deployment.

function _debit(
    address from_,
    uint256 amountLD_,
    uint256 minAmountLD_,
    uint32 dstEid_
)
    internal
    virtual
    override
    returns (uint256 amountSentLD, uint256 amountReceivedLD)
{
    (amountSentLD, amountReceivedLD) = super._debit(
        from_,
        amountLD_,
        minAmountLD_,
        dstEid_
    );
    totalBridgedOut += amountSentLD;
}

function _credit(
    address to_,
    uint256 amountLD_,
    uint32 srcEid_
) internal virtual override returns (uint256 amountReceivedLD) {
    amountReceivedLD = super._credit(to_, amountLD_, srcEid_);
    totalBridgedOut -= amountReceivedLD;
}

This is unsafe because totalBridgedOut is local storage per deployment, not shared cross-chain state. The amount added on the hub deployment is not reflected on the spoke deployment. Broadly, the post-remediation code reverts on inbound credit whenever the destination deployment's local totalBridgedOut is smaller than the incoming amount. The reward-relevant critical variant is a fresh spoke deployment: its local totalBridgedOut starts at 0, its local totalSupply() starts at 0, and user minting is restricted to the hub chain. In that state, the first inbound Hub -> Spoke transfer causes totalBridgedOut -= amountReceivedLD to underflow and revert with Panic(0x11).

This can be triggered through a normal bridge flow:

  1. A user mints OverlayerWrap on the hub deployment.
  2. The user initiates a Hub -> Spoke OFT transfer.
  3. On the hub deployment, _debit() burns tokens and increments the hub deployment's local totalBridgedOut.
  4. The LayerZero message reaches a fresh spoke deployment.
  5. On the spoke deployment, _credit() credits through super._credit(...) and then subtracts the received amount from the spoke deployment's own totalBridgedOut.
  6. The fresh spoke deployment never received the hub-side increment, so its local totalBridgedOut is still 0.
  7. The subtraction underflows, so the destination transaction reverts and the mint is rolled back.
  8. Retrying the same message does not help: the destination deployment still has totalBridgedOut == 0, so the same subtraction reverts again.
  9. This fresh-spoke case has no permissionless recovery path. totalBridgedOut on that spoke can only be increased by _debit() on the same deployment, but the failed first inbound transfer leaves the spoke with no minted OverlayerWrap, and minting is hub-only.

In the critical fresh-spoke case, the source-side burn succeeds while the destination-side credit fails, so the user's bridged OverlayerWrap claim is not recreated on the destination chain. The user no longer holds the burned tokens on the source chain and also does not receive the corresponding tokens on the destination chain. Because the destination instance remains at totalBridgedOut == 0 and has no local supply, retries deterministically fail for the same reason and users have no permissionless way to increase that spoke's totalBridgedOut to unblock delivery. As a result, the bridged amount becomes permanently locked absent a code change, redeployment, or manual off-protocol remediation. This is a regression-specific critical impact: the prior remediation restored hub-side accounting but simultaneously introduced a new permanent-lock failure mode on spoke-side inbound transfers. This satisfies the program's high-likelihood / high-impact pattern for a fresh spoke: any user can trigger it through a normal Hub -> Spoke transfer, no privileged role is required, no large capital is needed, and the user can choose an amount exceeding 1% of their own deposit.

For reference, contracts/overlayerbacking/AaveHandler.sol uses totalSupply() + totalBridgedOut, which shows the remediation was intended to preserve hub-side effective supply for backing calculations. This report is therefore not a restatement of F-2026-1525; it is a separate regression in the post-fix implementation. The fix is to scope totalBridgedOut updates to the hub deployment only, e.g. by guarding the updates with if (block.chainid == hubChainId).

Validation steps

  1. Use the PoC tests in test/totalBridgedOut-Underflow-on-Spoke-Chains.ts.
  2. The file contains:
    • PoC: should revert when crediting a fresh destination instance for the reward-relevant critical fresh-spoke variant.
    • PoC: should revert when inbound amount exceeds destination totalBridgedOut for the generalized trigger condition.
  3. The PoC deploys a local LayerZeroEndpointV2Mock from contracts/test/LayerZeroEndpointV2Mock.sol and two independent OverlayerWrapMock instances to model the hub and spoke deployments.
  4. In the critical fresh-spoke PoC, mint 20e18 OverlayerWrap to alice on the hub instance.
  5. Call hubWrap.testDebit(alice, 10e18, 10e18, 0) and verify:
    • hubWrap.totalBridgedOut() == 10e18
    • hubWrap.totalSupply() == 10e18
    • spokeWrap.totalBridgedOut() == 0
  6. Call spokeWrap.testCredit(alice, 10e18, 0).
  7. Confirm the call reverts with Panic(0x11).
  8. Verify spokeWrap.totalSupply() == 0 after the revert while the hub instance supply remains reduced by the debited amount.
  9. This demonstrates that the source-side burn succeeds but the destination-side credit fails because the post-F-2026-1525 remediation tracks totalBridgedOut as local state on each deployment.
  10. The first PoC targets the reward-relevant critical case: a fresh spoke where destination.totalBridgedOut() == 0 and destination.totalSupply() == 0, so no permissionless retry path exists after the first inbound transfer fails.
  11. The supplementary PoC then shapes a non-fresh destination state and shows that the same revert still occurs whenever incomingAmount > destination.totalBridgedOut().
  12. Accordingly, the test file validates both the critical fresh-spoke permanent-lock variant and the broader regression condition introduced by the remediation itself, not the pre-existing hub-side issue reported as F-2026-1525.

Attachments

Attachments are hidden

This information is not publicly available.

Comments are hidden

This information is not publicly available.