Skip to content
Business logic Audit finding Intermediate

Incorrect liquidity check on destination chain

The destination chain in a cross-chain lending protocol incorrectly validates that the collateral provided by the source chain covers all of the user's borrows on the destination chain, including same-chain and cross-chain borrows originating there. This causes valid cross-chain borrow requests to be rejected even when the user has sufficient collateral on the source chain.

future Follow with h2134, jokr and 2 others

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2025-05-lend-audit-contest-judging/issues/864

Found by

future, h2134, jokr, mussucal, rudhra1749

Summary

During cross-chain borrows, the destination chain is expected to verify that the payload.collateral provided by the source chain covers only the cross-chain borrow amount being originated from that source chain. However, the current implementation incorrectly checks that the payload.collateral covers all of the user’s same-chain borrows of destination chain and cross-chain borrows originated from the destination chain, which is invalid logic.

Solidity
(uint256 totalBorrowed,) = lendStorage.getHypotheticalAccountLiquidityCollateral(
    payload.sender,
    LToken(payable(payload.destlToken)),
    0,
    payload.amount
);

require(payload.collateral >= totalBorrowed, "Insufficient collateral");

https://github.com/sherlock-audit/2025-05-lend-audit-contest/blob/main/Lend-V2/src/LayerZero/CrossChainRouter.sol#L616-L622

This causes the borrow requests to fail even if the user has sufficient collateral on the source chain to support the new cross-chain borrow.

Root Cause

The destination chain incorrectly validates the borrow by checking whether payload.collateral can cover:

  • Same-chain borrows on the destination chain
  • Cross-chain borrows originated from the destination chain

This is incorrect because the collateral being validated (payload.collateral) resides on the source chain, not the destination chain. It should only be checked against the cross-chain borrows taken from the source chain.

Internal Preconditions

None

External Preconditions

Impact

Valid cross-chain borrow requests are incorrectly rejected.

PoC

No response provided.

Mitigation

Update the destination chain logic to validate only that the payload.collateral covers the borrow being initiated from the source chain and previous borrows from source chain. Avoid including:

  • Same-chain borrows on the destination chain
  • Other cross-chain borrows originating from the destination chain

The original report as published on Sherlock, by future. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.

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

The destination chain's liquidity check includes same-chain borrows and cross-chain borrows originating from the destination chain, rather than only the cross-chain borrow being initiated from the source chain.

Impact

Valid cross-chain borrow requests are incorrectly rejected, preventing users from borrowing even when they have sufficient collateral on the source chain.

What the attacker needed

Cross-chain borrow functionality; user has collateral on source chain

The fix

The destination chain logic should be updated to validate only that the payload.collateral covers the borrow being initiated from the source chain and previous borrows from the source chain, excluding same-chain borrows on the destination chain and other cross-chain borrows originating from the…

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.

In a cross-chain lending system, you can use collateral on one blockchain to borrow on another. The destination chain is supposed to check that your collateral covers only the new loan you are requesting from the source chain. Instead, it also counts other loans you have on the destination chain, so it wrongly thinks you don't have enough collateral and rejects your request.

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.

More from LEND

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.