Skip to content
Business logic Audit finding Advanced

Cross-chain liquidation uses incorrect lToken address, preventing repayment and breaking liquidation flow

The cross-chain liquidation flow uses the wrong lToken address when finalising repayment on Chain B, causing the borrow position lookup to fail. As a result, the borrower's debt is not reduced even though collateral has been seized on Chain A, leaving the protocol undercollateralised.

0xc0ffEE Follow with 0xnegan, 37H3RN17Y2 and 10 others

Originally disclosed on Sherlock

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

Found by

0xc0ffEE, 0xnegan, 37H3RN17Y2, HeckerTrieuTien, Phaethon, aman, dimah7, future, ggg_ttt_hhh, holtzzx, jokr, newspacexyz, rudhra1749

Summary

The liquidation flow fails due to the incorrect use of the lToken address from Chain A when processing on Chain B. Specifically, after collateral is seized on Chain A, a message is sent back to Chain B using the Chain A version of the lToken, causing findCrossChainCollateral() to fail. This results in the borrow position not being found, and the repayment on Chain B does not proceed.

Root Cause

In CrossChainRouter.sol: 280 _executeLiquidationCore (on Chain B), the seized collateral is sent to Chain A using: https://github.com/sherlock-audit/2025-05-lend-audit-contest-sylvarithos/blob/551944cd87d138620b89c11674a92f1dcbe0efbe/Lend-V2/src/LayerZero/CrossChainRouter.sol#L280

Solidity
function _executeLiquidationCore(LendStorage.LiquidationParams memory params) private {
    ...
    // Send message to Chain A to execute the seize
    _send(
        params.srcEid,
        seizeTokens,
        params.storedBorrowIndex,
        0,
        params.borrower,
280     lendStorage.crossChainLTokenMap(params.lTokenToSeize, params.srcEid), // Convert to Chain A version before sending
        msg.sender,
        params.borrowedAsset,
        ContractType.CrossChainLiquidationExecute
    );
}

This correctly translates the collateral token into its Chain A version, since that's where the collateral exists.
However, in CrossChainRouter.sol: 445 _handleLiquidationSuccess (on Chain B again), this same destlToken is used to find the borrow position: https://github.com/sherlock-audit/2025-05-lend-audit-contest-sylvarithos/blob/551944cd87d138620b89c11674a92f1dcbe0efbe/Lend-V2/src/LayerZero/CrossChainRouter.sol#L445

Solidity
function _handleLiquidationSuccess(LZPayload memory payload) private {
    // Find the borrow position on Chain B to get the correct srcEid
445    address underlying = lendStorage.lTokenToUnderlying(payload.destlToken);

    // Find the specific collateral record
    (bool found, uint256 index) = lendStorage.findCrossChainCollateral(
        payload.sender,
        underlying,
        currentEid, // srcEid is current chain
        0, // We don't know destEid yet, but we can match on other fields
        payload.destlToken,
        payload.srcToken
    );

This fails because payload.destlToken refers to the Chain A token address, which does not exist in Chain B's crossChainCollaterals mapping.

Internal Pre-conditions

  1. Borrower has active cross-chain borrow from Chain A collateral to Chain B borrow.
  2. Liquidator initiates a liquidation on Chain B.
  3. Seize token execution completes on Chain A.

External Pre-conditions

None — this issue arises from internal logic inconsistency between chains.

Attack Path

  1. Liquidator initiates a valid liquidation on Chain B.
  2. Chain B sends a message to Chain A to seize collateral.
  3. Chain A processes the seize and sends back success payload including destlToken = Chain A version.
  4. Chain B attempts to finalize repayment using payload.destlToken.
  5. Since this is not a valid lToken on Chain B, findCrossChainCollateral() fails.
  6. Liquidation repayment is never applied; protocol state remains incorrect.

Impact

  • The liquidation repayment flow is broken.
  • The borrower's borrow position remains active even though collateral has been seized.
  • The protocol can become inconsistent and undercollateralized.
  • Liquidators may receive seized tokens without corresponding debt reduction, leading to systemic accounting errors.

Mitigation

In _handleLiquidationSuccess, should use payload.srcToken.

Solidity
- function _handleLiquidationSuccess(LZPayload memory payload) private {
+ function _handleLiquidationSuccess(LZPayload memory payload, uint32 srcEid) private {
    // Find the borrow position on Chain B to get the correct srcEid
-   address underlying = lendStorage.lTokenToUnderlying(payload.destlToken);
+   address lToken = lendStorage.underlyingTolToken(payload.srcToken);

    // Find the specific collateral record
    (bool found, uint256 index) = lendStorage.findCrossChainCollateral(
        payload.sender,
-       underlying,
+       payload.srcToken
-       currentEid, // srcEid is current chain
-       0, // We don't know destEid yet, but we can match on other fields
+       srcEid,
+       currentEid
-       payload.destlToken,
+       lToken
        payload.srcToken
    );

The original report as published on Sherlock, by 0xc0ffEE. 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

Impact

The liquidation repayment flow is broken, so the borrower's debt remains active even though collateral has been seized, which could leave the protocol undercollateralised and cause accounting errors.

What the attacker needed

Borrower has an active cross-chain borrow; Liquidator initiates liquidation on Chain B; Seize execution completes on Chain A

The fix

The code should use the source token address (payload.srcToken) and the correct source chain ID when looking up the borrow position in _handleLiquidationSuccess.

How it was found

  1. A liquidator initiates a valid liquidation on Chain B.
  2. Chain B sends a message to Chain A to seize collateral.
  3. Chain A processes the seize and sends back a success payload including the Chain A version of the lToken.
  4. Chain B attempts to finalise repayment using that Chain A lToken address.
  5. The lookup for the cross-chain collateral fails because the address is not valid on Chain B.
  6. The liquidation repayment is never applied and the protocol state remains incorrect.

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 protocol, a liquidator repays a borrower's debt on one chain and seizes their collateral on another. This report shows that after seizing the collateral, the system tries to find the borrower's debt record using an address that only exists on the other chain, so the lookup fails and the debt is never marked as repaid. The borrower keeps their debt while losing collateral, which can make the protocol unsafe.

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 by 0xc0ffEE

View all

27 more disclosed reports, best first.

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.