Target is hidden
This information is not publicly available.
A user can initiate a normal public bridge from a hub OverlayerWrap deployment to a fresh non-hub OverlayerWrap deployment. The source-side send() burns the user’s tokens first and increments the source deployment’s totalBridgedOut. The queued packet then reaches the destination deployment’s real public lzReceive() path, but _credit() reverts because it decrements the destination-local totalBridgedOut from zero. Retrying the same packet under unchanged code and state fails again, and the user cannot recover through normal protocol actions. The bridged amount is therefore locked after the source-side debit has already persisted.
contracts/overlayer/OverlayerWrapCore.sol:510-543
OverlayerWrapCore._debit()OverlayerWrapCore._credit()OverlayerWrapCore.totalBridgedOutnode_modules/@layerzerolabs/oft-evm/contracts/OFTCore.sol:175-221
send()_send() that debits before message dispatchnode_modules/@layerzerolabs/oft-evm/contracts/OFTCore.sol:266-297
_lzReceive() that calls _credit()node_modules/@layerzerolabs/oapp-evm/contracts/oapp/OAppReceiver.sol:95-109
lzReceive() entrypointOverlayerWrapCore._debit() always increments local totalBridgedOut, and OverlayerWrapCore._credit() always decrements local totalBridgedOut. Those mutations run on every deployment, including non-hub deployments. On a fresh non-hub deployment, local totalBridgedOut == 0. The first inbound credit into that deployment therefore executes totalBridgedOut -= amountReceivedLD against zero and reverts with arithmetic panic 0x11.
send() entrypoint inherited from OFTCore.lzReceive() path, not through direct internal _credit() calls.send() debits first, queues a packet, and destination delivery later calls lzReceive() as the endpoint.test/real/BridgeNonHubLock.real.ts includes a control path that successfully delivers public packets when the destination has matching positive totalBridgedOut, so the harness is capable of executing a valid path.totalBridgedOut update, so the confirmed lock is not caused by fake misconfiguration.OverlayerWrap deployment exists and has minted user balance available to bridge.OverlayerWrap deployment exists in the same OFT mesh and starts with local totalBridgedOut == 0.lzReceive() path.send() flow.See FINAL_REPRO_STEPS.md for the exact command and full operator steps. In the confirmed flow, the user mints on the hub, calls the public send() entrypoint to the non-hub peer, the source burn and totalBridgedOut increment persist, and the queued destination packet then reverts with panic 0x11 when delivered through lzReceive().
The source-side send should burn on the source deployment, the destination deployment should mint the bridged amount to the recipient, and the user should preserve the bridged value across the OFT mesh.
The source-side burn succeeds and the queued packet is created. Destination delivery then reverts in _credit() before any destination mint occurs. Retrying the same packet fails again with the same panic. The user ends with no bridged tokens on either side for that transfer and cannot recover through normal protocol actions.
The confirmed real-scenario suite is test/real/BridgeNonHubLock.real.ts.
TEST B proves the source-side debit persists before destination execution:
send():
20 OVA0 OVAtotalSupply(): 20 OVAtotalSupply(): 0 OVAtotalBridgedOut(): 0totalBridgedOut(): 0send() and before delivery:
0 OVA0 OVAtotalSupply(): 0 OVAtotalSupply(): 0 OVAtotalBridgedOut(): 20 OVAtotalBridgedOut(): 0truenonHubEndpoint.deliver(guid) reverts with panic 0x11.0 OVA on both deploymentstotalSupply() remains 0 OVAtotalSupply() remains 0 OVAtotalBridgedOut() remains 20 OVAtotalBridgedOut() remains 0TEST C retries the exact same failed destination packet through retryPayload(guid) without changing contract logic or storage. The retry reverts again with panic 0x11, the packet remains queued, and the hub still shows totalBridgedOut() == 20 OVA. Under unchanged vulnerable code and state, retry does not rescue the funds.
TEST D exercises normal user-level actions after the failed receive:
redeem() reverts because the bridged amount has already been burned on the hub deploymentsend() back to the hub reverts because the user never received any non-hub balance0x11No normal user-level recovery path succeeds in the confirmed scenario.
Restrict totalBridgedOut accounting to the hub deployment only. A minimal fix is:
totalBridgedOut in _debit() only when block.chainid == hubChainIdtotalBridgedOut in _credit() only when block.chainid == hubChainIdAdd regression tests that exercise:
send() into a fresh non-hub deploymentcontracts/overlayer/OverlayerWrapCore.sol:510-543node_modules/@layerzerolabs/oft-evm/contracts/OFTCore.sol:175-221node_modules/@layerzerolabs/oft-evm/contracts/OFTCore.sol:266-297node_modules/@layerzerolabs/oapp-evm/contracts/oapp/OAppReceiver.sol:95-109contracts/test/LayerZeroEndpointHarness.sol:57-157test/real/BridgeNonHubLock.real.ts:174-423Attachments are hidden
This information is not publicly available.
Comments are hidden
This information is not publicly available.