Impartially aborted CCTXs are incorrectly marked as refunded, resulting in a loss of funds
When a cross-chain transaction (CCTX) is aborted on ZetaChain, the system marks it as refunded even if the refund deposit fails, for example because the token is paused or the liquidity cap is exceeded. This causes users to lose their funds, and admins cannot manually refund because the flag is already set.
0xAlix2 Follow with BrothersInCode and berndartmueller
Originally disclosed on Sherlock
Source: https://github.com/sherlock-audit/2025-04-zetachain-cross-chain-judging/issues/320
Found by
0xAlix2, BrothersInCode, berndartmueller
Summary
Inbound CCTXs for either paused ZRC20 tokens or those that exceed the ZRC20 liquidity cap during the abort process will not be refunded to the user, manifesting as a loss of funds.
Root Cause
In the case of a CCTX that gets aborted on ZetaChain, the parent caller function ProcessAbort() sets cctx.CctxStatus.IsAbortRefunded = true, regardless of whether the abort deposit succeeded or not.
For example, if getAndCheckZRC20() errors, due to
- temporarily paused ZRC20 token, or, more likely,
- ZRC20 liquidity cap reached (especially problematic if a user sent an inbound with a large ZRC20 amount, which exceeds the liquidity cap)
the CCTX amount is not refunded.
Additionally, a ZetaChain admin is also unable to manually refund such an aborted CCTX via the MsgRefundAbort message due to the CctxStatus.IsAbortRefunded flag being set to true.
Internal Pre-conditions
- CCTX needs to be aborted on ZetaChain
- Inbound with a large ZRC20 amount is sent to ZetaChain, which errors during the ZEVM deposit and the amount exceeds the liquidity cap
External Pre-conditions
N/A
Attack Path
N/A
Impact
CCTX is incorrectly marked as aborted without refunding the user
PoC
Mitigation
Ensure that the CCTX is only marked as IsAbortRefunded = true if the refund was successful.
Discussion
sherlock-admin2
The protocol team fixed this issue in the following PRs/commits: https://github.com/zeta-chain/node/pull/3901
gjaldon
The issue has been addressed by marking the CCTX as AbortRefunded only when there was no error during the abort process or when only the OnAbort callback failed.
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
Users lose funds when their aborted cross-chain transaction cannot be refunded due to a paused token or liquidity cap, and admins cannot manually refund because the flag is already set.
What the attacker needed
CCTX aborted on ZetaChain; Inbound with large ZRC20 amount exceeding liquidity cap
The fix
The CCTX should only be marked as refunded if the refund was successful.
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 transaction fails on a blockchain, the system should return the user's money. Here, the system incorrectly records that the money was returned even when it wasn't, so the user loses their funds and even an admin cannot fix it.
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.