Skip to content
DoS Audit finding Intermediate

All Cross-Chain operations can be DOS

The CrossChainRouter contract holds ETH to pay LayerZero messaging fees, and every cross-chain operation spends from that shared balance. A malicious user can make many tiny cross-chain operations to drain the ETH, after which all cross-chain operations revert and are blocked.

Hueber Follow with Kirkeelee, Kvar and 7 others

Originally disclosed on Sherlock

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

Found by

Hueber, Kirkeelee, Kvar, Phaethon, molaratai, moray5554, newspacexyz, xiaoming90, yoooo, zxriptor

Summary

Root Cause

Internal Pre-conditions

External Pre-conditions

Attack Path

The protocol team will transfer ETH to the router to be used as gas for LayerZero's cross-chain messaging. All cross-chain operations (e.g., borrowCrossChain, liquidateCrossChain, repayCrossChainBorrow) in the CrossCahinRouter contract require ETH residing in the contract in order for the LayerZero's _lzSend cross-chain messaging to work because any cross-chain message send requires a fee.

However, the problem with this design is that a malicious user can drain all the ETH residing on the CrossChainRouter contract intended for LayerZero fee by making many unnecessary cross-chain operations, likely with a very small amount (e.g., opening a dust cross-chain borrow position or dust repayment)

When no ETH is residing in the router, all Cross-Chain operations on the router will be fail/revert and be DOSed.

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

Solidity
File: CrossChainRouter.sol
801:     /**
802:      * @notice Sends LayerZero message
803:      */
804:     function _send(
805:         uint32 _dstEid,
806:         uint256 _amount,
807:         uint256 _borrowIndex,
808:         uint256 _collateral,
809:         address _sender,
810:         address _destlToken,
811:         address _liquidator,
812:         address _srcToken,
813:         ContractType ctype
814:     ) internal {
815:         bytes memory payload =
816:             abi.encode(_amount, _borrowIndex, _collateral, _sender, _destlToken, _liquidator, _srcToken, ctype);
817: 
818:         bytes memory options = OptionsBuilder.newOptions().addExecutorLzReceiveOption(1_000_000, 0);
819: 
820:         _lzSend(_dstEid, payload, options, MessagingFee(address(this).balance, 0), payable(address(this)));
821:     }

Impact

Loss of assets and core feature broken. It can lead to the loss of assets because if liquidation can be blocked or delayed, it will result in a loss for the protocol. If repayment cannot be performed or delayed by malicious user, users cannot repay or cannoty repay their debt in a timely manner, causing their debt to accumulate and their account eventually get liquidated unfairly.

PoC

No response

Mitigation

No response

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

Likely the router pays LayerZero fees from a single shared ETH balance using the contract's full balance, so any user can consume that balance through repeated low-value cross-chain calls.

Impact

All cross-chain operations could be blocked, which may delay or prevent liquidations and repayments, potentially causing unfair liquidations and losses for the protocol and users.

What the attacker needed

Router holds ETH for LayerZero fees; attacker can make cross-chain calls; attacker can fund many small operations

How it was found

  1. The protocol team transfers ETH to the router to cover LayerZero gas fees.
  2. A malicious user performs many unnecessary cross-chain operations, such as dust borrows or dust repayments.
  3. Each operation spends ETH from the router's shared balance as the LayerZero fee.
  4. The router's ETH balance is drained, so later cross-chain calls revert.

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 smart contract needs a small amount of cryptocurrency (ETH) to pay a messaging service each time it sends a cross-chain message. The contract keeps one shared pot of ETH for all users. An attacker can send lots of tiny cross-chain messages, each using up some of that pot, until it is empty. Once empty, nobody can use any cross-chain feature because the fee cannot be paid.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More from LEND

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.