Status DataClose notification

Overlayer Disclosed Report

Audit Report

Separate-instance hub -> non-hub OFT transfers revert on destination credit due to local totalBridgedOut underflow, locking bridged user funds outside the normal user flow

Target

Target is hidden

This information is not publicly available.

Vulnerability details

Impact summary

A user can successfully burn OVA on the hub through the normal public OFT send() flow, but the first inbound credit on a separate non-hub deployment reverts with Panic(0x11) because the destination instance decrements its own local totalBridgedOut from zero. As a result, the bridged amount is locked outside the normal user flow and unrecoverable by the user without privileged/manual intervention.

Affected components

  • contracts/overlayer/OverlayerWrapCore.sol: _debit, _credit, _managerMint, _managerRedeem
  • contracts/overlayer/OverlayerWrap.sol: mint, redeem
  • The OFT send/receive path between separate OverlayerWrap deployments

Root cause

totalBridgedOut is tracked per deployment, but the OFT bridge accounting treats it as if it were shared across deployments. In OverlayerWrapCore._debit, the source deployment increments local totalBridgedOut after the burn. In OverlayerWrapCore._credit, the destination deployment decrements its own local totalBridgedOut after crediting. On the first inbound transfer to a non-hub deployment, local totalBridgedOut == 0, so totalBridgedOut -= amountReceivedLD underflows and reverts with Panic(0x11).

Why this is real-scenario

This was confirmed with two distinct OverlayerWrap deployments, distinct chain IDs, and distinct endpoint IDs. The hub-side bridge used the real public send() path, and the destination execution used the endpoint-mediated lzReceive() path. A same-instance control passed, isolating the bug away from generic OFT send/receive behavior and onto separate-instance accounting. Retrying the same inbound message failed again with the same Panic(0x11), confirming that the user cannot recover through the normal flow.

Preconditions

  • A hub deployment and a separate non-hub deployment exist.
  • The user has bridgeable OVA balance on the hub.
  • The non-hub deployment is receiving its first inbound transfer while local totalBridgedOut is still zero.
  • No privileged access is required.
  • No frontrunning is required.
  • No unusual capital is required.

Validation steps

Validation steps

  • Deployed separate hub and non-hub OverlayerWrap instances with distinct chain IDs / endpoint IDs and the same configured hubChainId.
  • Minted OVA on the hub through the normal public mint flow.
  • Ran a same-instance OFT round trip as a control and confirmed it succeeds.
  • Ran a separate-instance hub -> non-hub bridge through the real public send() path and endpoint-mediated destination receive path.
  • Confirmed the first destination relay reverts with Panic(0x11).
  • Retried the same inbound message and confirmed it reverts again with the same Panic(0x11).

Step-by-step reproduction

  1. Deploy a hub OverlayerWrap and a separate non-hub OverlayerWrap.
  2. Configure both deployments with the same hubChainId, and configure peers for bridging.
  3. Mint 20 OVA to a user on the hub through the normal public mint flow.
  4. Run a same-instance control by sending 5 OVA from the hub to itself and relaying the packet.
  5. Confirm the same-instance control succeeds and restores the user’s balance and totalBridgedOut.
  6. Send 10 OVA from the hub deployment to the separate non-hub deployment using the real public send() function.
  7. Confirm the source-side burn succeeds and the hub’s totalBridgedOut increases to 10 OVA.
  8. Relay the stored packet into the non-hub deployment through the endpoint-mediated lzReceive() path.
  9. Observe that destination execution reverts with Panic(0x11).
  10. Retry the same inbound message.
  11. Observe that the retry reverts again with the same Panic(0x11) and the destination user balance remains zero.

Expected result

In a correct OFT bridge flow, the hub burn should succeed, the destination credit should also succeed, the destination user should receive the bridged amount, and no retry should be needed for normal bridge completion.

Actual result

The hub burn succeeds, but the separate non-hub destination relay reverts with Panic(0x11). The destination user balance remains 0, the destination totalSupply remains 0, and retrying the same inbound message fails again with the same revert. The user’s funds are therefore locked outside the normal user flow and unrecoverable by the user without privileged/manual intervention.

Evidence

Same-instance control
  before: hub user=20 OVA, hub totalBridgedOut=0 OVA
  after send: hub user=15 OVA, hub totalBridgedOut=5 OVA
  after relay: hub user=20 OVA, hub totalBridgedOut=0 OVA

Separate hub -> non-hub
  after hub send: hub user=10 OVA, non-hub user=0 OVA, hub totalBridgedOut=10 OVA, non-hub totalBridgedOut=0 OVA
  first destination relay revert: execution reverted: Panic due to OVERFLOW(17) | decoded=Panic(0x11)
  after first relay: hub user=10 OVA, non-hub user=0 OVA, hub totalBridgedOut=10 OVA, non-hub totalBridgedOut=0 OVA, non-hub totalSupply=0 OVA
  retry relay revert: execution reverted: Panic due to OVERFLOW(17) | decoded=Panic(0x11)
  after retry: hub user=10 OVA, non-hub user=0 OVA, hub totalBridgedOut=10 OVA, non-hub totalBridgedOut=0 OVA, non-hub totalSupply=0 OVA

Suggested fix

Make totalBridgedOut hub-only accounting, or otherwise ensure that only the hub deployment mutates it. Also add a dedicated multi-instance hub/non-hub regression test covering the first inbound transfer to a fresh non-hub deployment.

Code references

  • contracts/overlayer/OverlayerWrapCore.sol: _debit increments local totalBridgedOut
  • contracts/overlayer/OverlayerWrapCore.sol: _credit decrements local totalBridgedOut
  • contracts/overlayer/OverlayerWrapCore.sol: _managerMint is hub-gated
  • contracts/overlayer/OverlayerWrapCore.sol: _managerRedeem is hub-gated
  • contracts/overlayer/OverlayerWrap.sol: public mint
  • contracts/overlayer/OverlayerWrap.sol: public redeem

Attachments

Attachments are hidden

This information is not publicly available.

Comments are hidden

This information is not publicly available.