Skip to content
Business logic Audit finding Intermediate

Malicious router can block cross-chain-transfers

A router could agree off-chain to a cross-chain transfer, causing the user to lock funds on the sending chain, but then fail to respond or respond with a zero-amount transaction. This locks the user's funds for the entire expiry period while the router risks nothing.

0xRajeev Follow

Originally disclosed on Code4rena

Submitted by 0xRajeev, also found by cmichel and shw

The agreement between the user and the router seems to already happen off-chain because all the fields are required for the initial In variantTransactionData call already. A router could pretend to take on a user’s cross-chain transfer, the user sends their prepare transaction, locking up funds on the sending chain. But then the router simply doesn’t respond or responds with a prepare transaction of amount=0.

The user’s funds are then locked for the entire expiry time, whereas the router does not have to lock up anything as the amount is 0, even no gas if they simply don’t respond. In this way, a router can bid on everything off-chain without a penalty, and take down everyone that accepts the bid.

Recommend that maybe there could be a penalty mechanism for non-responsive routers that agreed off-chain, slashing part of their added liquidity. Could also be that the bid signature already helps with this, but I’m not sure how it works as the off-chain part is not part of the repo.

LayneHaber (Connext) acknowledged:

This is true, and we are building penalty mechanisms outside of these contracts. For now we are considering adding in a permissioned launch, see #49

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

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

A router can bid on many transfers without penalty, causing users who accept the bid to have their funds locked for the expiry period.

What the attacker needed

User accepts a router's off-chain bid; router acts maliciously

The fix

A penalty mechanism for non-responsive routers should be added, such as slashing part of their added liquidity.

How it was found

  1. Router agrees off-chain to take on a user's cross-chain transfer.
  2. User sends a prepare transaction, locking funds on the sending chain.
  3. Router does not respond or responds with a prepare transaction of amount=0.
  4. User's funds remain locked for the entire expiry time.

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 transfer, a user locks funds on one blockchain and a router (a helper) is supposed to release funds on another. Here, the router can promise to help but then do nothing, leaving the user's money stuck until a timeout. The router loses nothing because they never locked any funds themselves.

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 0xRajeev

View all

61 more disclosed reports, best first.

More from Connext Amarok contest

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.