# User not refunded for failed Zeta gas payment in cross chain transaction

Aborted cross-chain transactions on ZetaChain, especially cross-chain swaps, freeze user funds because the abort path never refunds the sender.

- Payout: Contest reward
- Severity: medium
- Program: ZetaChain
- Credited: deliriusz
- Disclosed: 2024-09-06
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2023-11-zetachain-findings/issues/504
- Library page: https://bugbountylibrary.com/r/c4%3A2023-11-zetachain%3AM-07
- Tags: domain:web3 impact:funds-loss kind:contest platform:code4rena sev:medium tech:go technique:source-review vuln:business-logic

**Target:** Cosmos SDK crosschain module (VoteOnObservedInboundTx keeper)
**Root cause:** When inbound CCTX processing errors, status is set to Aborted; refund logic only exists for ERC20 coin type to ZetaChain, and cross-chain swaps have no refund path at all, so funds remain locked.
**Steps:**
1. User submits cross-chain transaction (or cross-chain swap) into ZetaChain
2. Inbound tx gathers enough votes in `VoteOnObservedInboundTx` and is processed immediately
3. Processing reverts (e.g. UniswapV2 pool imbalance, no valid pool, insufficient gas)
4. Code sets `cctx.CctxStatus.ChangeStatus(types.CctxStatus_Aborted, err.Error())` and returns without refunding
5. For cross-chain swaps the PayGasAndUpdateCctx error branch aborts with no refund; user funds frozen
**How found:** Code review of the inbound CCTX vote handler's error branches, noticing refund only handled for ERC20-to-ZetaChain and absent for cross-chain swap abort path.
**Exploitation:** Not an attacker-driven exploit; failure conditions (manipulated UniswapV2 pool, missing pool, stale gas prices) cause abort and lock user funds, recoverable only via manual TSS quorum refund.
**Insight:** In cross-chain/bridge state machines, audit every error/abort branch for asset custody: check that each early-return path either reverts state or explicitly refunds, and compare refund coverage across coin types and swap vs transfer flows.
