Status DataClose notification

Overlayer Disclosed Report

Audit Report

totalBridgedOut Underflow in _credit() Causes Permanent DoS on Destination Chains

Target

Target is hidden

This information is not publicly available.

Vulnerability details

The OverlayerWrapCore contract contains a critical vulnerability in the _credit() function that causes a permanent Denial of Service (DoS) on destination chains.

The vulnerability exists because:

  • totalBridgedOut is a chain-local variable that is NOT synchronized across chains
  • On destination chains, totalBridgedOut starts at 0 and never increases (since _debit() is only called on Hub chain)
  • When receiving cross-chain transfers on destination chains, _credit() attempts to execute totalBridgedOut -= amountReceivedLD
  • This causes an arithmetic underflow: 0 - amount = underflow
  • Solidity 0.8+ built-in overflow/underflow protection triggers Panic(0x11) and reverts the transaction

Impact: Cross-chain transfers to destination chains become completely non-functional, effectively isolating destination chains from the cross-chain ecosystem.

Validation steps

Scenario: Cross-Chain Transfer from Hub to destination Chain

  1. Initial State:

    • Hub Chain: totalBridgedOut = 0
    • destination Chain: totalBridgedOut = 0
  2. User bridges 100 OVA from Hub to destination:

    • Hub Chain _debit() is called: totalBridgedOut += 100 → totalBridgedOut = 100
    • LayerZero message is sent to destination chain
  3. destination Chain receives the message:

    • destination Chain _credit() is called with amount = 100
    • Code executes: totalBridgedOut -= 100 → 0 -= 100
    • UNDERFLOW! Transaction reverts with Panic(0x11)
  4. Result:

    • User's 100 OVA is burned on Hub chain
    • User receives 0 OVA on destination chain (transaction reverted)
    • Cross-chain functionality is permanently broken on destination chains

Run PoC with

npx hardhat test test/TotalBridgedOutUnderflow_EN.ts

Attachments

Attachments are hidden

This information is not publicly available.

Comments are hidden

This information is not publicly available.