Cross-Chain Borrowing will not work as intended
The cross-chain borrowing feature is broken because the destination chain's collateral check only considers local collateral, not the collateral supplied on the source chain. As a result, any cross-chain borrow attempt reverts due to insufficient collateral.
0xc0ffEE Follow with xiaoming90
Originally disclosed on Sherlock
Source: https://github.com/sherlock-audit/2025-05-lend-audit-contest-judging/issues/711
Found by
0xc0ffEE, xiaoming90
Summary
Root Cause
Internal Pre-conditions
External Pre-conditions
Attack Path
The protocol's design or intention is to allow Bob to deposit collateral on Chain A, and then let him use that collateral in Chain A to borrow assets from Chain B.
Assume that Bob supplied 10000 USDC as collateral in Chain A. He calls borrowCrossChain() on Chain A to borrow from Chain B. When the LayerZero delivers the message to Chain B, Chain B's CrossChainRouter._handleBorrowCrossChainRequest() -> CoreRouter.borrowForCrossChain() -> LErc20.borrow() will be executed.
File: CrossChainRouter.sol
581: function _handleBorrowCrossChainRequest(LZPayload memory payload, uint32 srcEid) private {
..SNIP..
624: // Execute the borrow on destination chain
625: CoreRouter(coreRouter).borrowForCrossChain(payload.sender, payload.amount, payload.destlToken, destUnderlying);
626:
File: CoreRouter.sol
195: function borrowForCrossChain(address _borrower, uint256 _amount, address _destlToken, address _destUnderlying)
196: external
197: {
198: require(crossChainRouter != address(0), "CrossChainRouter not set");
199:
200: require(msg.sender == crossChainRouter, "Access Denied");
201:
202: require(LErc20Interface(_destlToken).borrow(_amount) == 0, "Borrow failed"); // <= Revert!
203:
204: IERC20(_destUnderlying).transfer(_borrower, _amount);
205: }
Inside the internal code of LErc20.borrow(), it will call borrowFresh() -> Lendtroller.getHypotheticalAccountLiquidityInternal()
The problem or issue here is that Chain B's Lendtroller.getHypotheticalAccountLiquidityInternal() function only takes into account the collateral of Chain B. Also, note that Lendtroller.getHypotheticalAccountLiquidityInternal() is the original Compound V2 function. Thus, the borrowing will eventually revert due to insufficient collateral because it cannot see Bob's Chain A collateral.
Impact
Core protocol functionality is broken
PoC
No response
Mitigation
No response
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the cross-chain borrow handler on the destination chain calls the standard Compound V2 liquidity check, which only sees local collateral and ignores the source chain's collateral.
Impact
Core protocol functionality is broken; cross-chain borrowing always reverts.
What the attacker needed
Collateral supplied on Chain A; cross-chain borrow attempted
How it was found
- Bob supplies 10000 USDC as collateral on Chain A.
- Bob calls borrowCrossChain() on Chain A to borrow from Chain B.
- LayerZero delivers the message to Chain B, triggering _handleBorrowCrossChainRequest().
- Chain B executes CoreRouter.borrowForCrossChain() which calls LErc20.borrow().
- LErc20.borrow() calls Lendtroller.getHypotheticalAccountLiquidityInternal(), which only checks Chain B collateral.
- The borrow reverts due to insufficient collateral.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
This report is about a feature that lets someone use money they deposited on one blockchain as security to borrow on another blockchain. The problem is that the borrowing blockchain only looks at what was deposited on itself, not on the other chain, so it always thinks the person has no collateral and refuses the loan.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.