Malicious Liquidator Can Liquidate Without Providing Collateral
In the cross-chain liquidation flow, the destination chain never pulls the underlying repayment token from the liquidator before sending the seize message to the source chain. A liquidator who does not approve the token can still receive the borrower's seized collateral on the source chain while the repayment on the destination chain fails, so the borrower's debt is not reduced.
Source: https://github.com/sherlock-audit/2025-05-lend-audit-contest-judging/issues/636
Found by
0x23r0, 0xc0ffEE, Kvar, MRXSNOWDEN, Phaethon, SarveshLimaye, Tychai0s, alphacipher, anchabadze, dmdg321, dystopia, future, ggg_ttt_hhh, hgrano, jokr, oxelmiguel, stonejiajia, t.aksoy
Summary
In the current implementation of cross-chain liquidation, when a liquidation is requested on chainB (the destination chain), there is no transfer of the underlying token from the liquidator. If the seize operation succeeds on chainA (the source chain), the underlying tokens are transferred to the liquidator, and the repayment is executed on chainB. However, if the seize fails, the underlying tokens are transferred from the contract to the liquidator on chainB.
In this scenario, if the seize operation is successful but the liquidator has not approved the underlying token on chainB, the repayment may fail while the liquidator still successfully receives the underlying tokens from the liquidatee on chainA. This creates a potential exploit.
Root Cause
The root cause of this issue is that, on chainB, there is no transfer of the underlying tokens from the liquidator at the start of the liquidation process.
Internal pre-conditions
N/A
External pre-conditions
N/A
Attack Path
N/A
PoC
function liquidateCrossChain(
...
) external {
LendStorage.LiquidationParams memory params = LendStorage.LiquidationParams({
...
});
_validateAndPrepareLiquidation(params);
_executeLiquidation(params);
}
function _validateAndPrepareLiquidation(LendStorage.LiquidationParams memory params) private view {
require(params.borrower != msg.sender, "Liquidator cannot be borrower");
require(params.repayAmount > 0, "Repay amount cannot be zero");
// Get the lToken for the borrowed asset on this chain
params.borrowedlToken = lendStorage.underlyingTolToken(params.borrowedAsset);
require(params.borrowedlToken != address(0), "Invalid borrowed asset");
// Important: Use underlying token addresses consistently
address borrowedUnderlying = lendStorage.lTokenToUnderlying(params.borrowedlToken);
// Verify the borrow position exists and get details
LendStorage.Borrow[] memory userCrossChainCollaterals =
lendStorage.getCrossChainCollaterals(params.borrower, borrowedUnderlying);
bool found = false;
for (uint256 i = 0; i < userCrossChainCollaterals.length;) {
if (userCrossChainCollaterals[i].srcEid == params.srcEid) {
found = true;
params.storedBorrowIndex = userCrossChainCollaterals[i].borrowIndex;
params.borrowPrinciple = userCrossChainCollaterals[i].principle;
break;
}
unchecked {
++i;
}
}
require(found, "No matching borrow position");
// Validate liquidation amount against close factor
uint256 maxLiquidationAmount = lendStorage.getMaxLiquidationRepayAmount(
params.borrower,
params.borrowedlToken,
false // cross-chain liquidation
);
require(params.repayAmount <= maxLiquidationAmount, "Exceeds max liquidation");
}
function _executeLiquidation(LendStorage.LiquidationParams memory params) private {
// First part: Validate and prepare liquidation parameters
uint256 maxLiquidation = _prepareLiquidationValues(params);
require(params.repayAmount <= maxLiquidation, "Exceeds max liquidation");
// Secon part: Validate collateral and execute liquidation
_executeLiquidationCore(params);
}
function _executeLiquidationCore(LendStorage.LiquidationParams memory params) private {
// Calculate seize tokens
address borrowedlToken = lendStorage.underlyingTolToken(params.borrowedAsset);
(uint256 amountSeizeError, uint256 seizeTokens) = LendtrollerInterfaceV2(lendtroller)
.liquidateCalculateSeizeTokens(borrowedlToken, params.lTokenToSeize, params.repayAmount);
require(amountSeizeError == 0, "Seize calculation failed");
// Send message to Chain A to execute the seize
_send(
params.srcEid,
seizeTokens,
params.storedBorrowIndex,
0,
params.borrower,
lendStorage.crossChainLTokenMap(params.lTokenToSeize, params.srcEid), // Convert to Chain A version before sending
msg.sender,
params.borrowedAsset,
ContractType.CrossChainLiquidationExecute
);
}
Impact
A malicious liquidator can liquidate without providing the necessary collateral resulting the liquidatee's debt is not deducted.
Mitigation
Consider implementing an escrow mechanism for the collateral from the liquidator before initiating the liquidation process to ensure that the collateral is secured.
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 destination-chain liquidation path sends the cross-chain seize message without first transferring or escrowing the liquidator's repayment tokens, so the two halves of the swap are not atomic.
Impact
A malicious liquidator could obtain the seized collateral while the borrower's debt is not deducted, because the repayment step on the destination chain can fail after the seize succeeds on the source chain.
What the attacker needed
Cross-chain borrow position exists; liquidator does not approve repayment token
The fix
The protocol should escrow or pull the liquidator's repayment tokens before initiating the cross-chain seize, as the report's mitigation suggests.
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.
A lending protocol lets someone repay part of a borrower's debt in exchange for a discount on their collateral; this is called liquidation. Here the two halves happen on two different blockchains, and the code sends the 'give me the collateral' message before it has actually collected the repayment money. So a liquidator can take the collateral without paying, leaving the borrower still owing the debt.
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.