Target is hidden
This information is not publicly available.
The OverlayerWrapCore contract overrides LayerZero's OFT _debit() and _credit() functions to maintain cross-chain accounting using the storage variable totalBridgedOut.
This accounting is only valid on the hub chain. On any spoke (non-hub) chain:
totalBridgedOut is initialized to 0 and never increases (because _debit() can only run when the contract already holds tokens)._credit() executes:totalBridgedOut -= amountReceivedLD; // Underflow when totalBridgedOut == 0
Since the contract uses Solidity ^0.8.20, this causes an arithmetic underflow revert.
Result:
Every inbound bridge to any spoke chain fails. Tokens are burned on the source chain but never minted on the destination → permanent loss of user funds.
OverlayerWrap on the hub chain (with hubChainId set to the current chain ID).block.chainid != hubChainId).OverlayerWrap tokens on the hub chain._credit() hook is triggered → transaction reverts with underflow.OverlayerWrap with hubChainId set to current chain ID (hub).Deploy the same contract on a second network where block.chainid != hubChainId.
Call the internal test helper (or simulate LayerZero inbound call):
await spoke.testCredit(user.address, ethers.parseEther("100"), 0);
totalBridgedOut remains 0.Please note i needed to modify and install extra packages outside the package.json to compile the project. But after compiling properly my POC works i have provided screenshot of it. Unfortunately i cant provide package.json in POC files bcz of the format not supported
Attachments are hidden
This information is not publicly available.
Comments are hidden
This information is not publicly available.