Skip to content
Business logic Audit finding Intermediate

Expired transfers will lock user funds on the sending chain

The cancelling relayer is paid in the wrong asset on the sending chain, so if that asset is not present, the cancel transaction reverts and user funds remain locked. An attacker could exploit this to lock funds permanently if the user relies on a relayer.

0xRajeev Follow

Originally disclosed on Code4rena

Submitted by 0xRajeev

The cancelling relayer is being paid in receivingAssetId on the sendingChain instead of in sendingAssetID. If the user relies on a relayer to cancel transactions, and that receivingAssetId asset does not exist on the sending chain (assuming only sendingAssetID on the sending chain and receivingAssetId on the receiving chain are assured to be valid and present), then the cancel transaction from the relayer will always revert and user’s funds will remain locked on the sending chain.

The impact is that expired transfers can never be cancelled and user funds will be locked forever if user relies on a relayer.

Recommend changing receivingAssetId to sendingAssetId in transferAsset() on TransactionManager.sol L514.

LayneHaber (Connext) confirmed and patched:

https://github.com/connext/nxtp/pull/25

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

Root cause

The code uses receivingAssetId instead of sendingAssetId when paying the relayer on the sending chain.

Impact

Expired transfers can never be cancelled and user funds will be locked forever if the user relies on a relayer.

What the attacker needed

User relies on a relayer; receivingAssetId not present on sending chain

The fix

The issue was fixed by changing receivingAssetId to sendingAssetId in the transferAsset function.

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.

When a transfer expires, a helper (relayer) cancels it and gets a fee. The code pays the fee in the wrong token on the sending chain. If that token doesn't exist there, the cancellation fails and the user's money stays stuck.

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.