# Arbitrary destination gas limit for CoinType_Zeta cctxs results in paying lower gas fees

ZetaChain's CoinType_Zeta cctxs let senders set an arbitrarily low destination gas limit, so gas fees are underpaid and the TSS address covers the real cost.

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

**Target:** cross-chain transaction gas payment and outbound signing (zetaclient evm_signer, x/crosschain keeper)
**Root cause:** PayGasInZetaAndUpdateCctx does not enforce a minimum OutboundTxGasLimit for CoinType_Zeta, unlike CoinType_Gas/ERC20 which overwrite it with a hardcoded value; the sender-supplied limit is used to compute fees, then clamped to 100k only at broadcast time.
**Steps:**
1. Call `ZetaConnectorEth.send` with a destination gas limit of 1 (0 rejected by Uniswap getAmountIn).
2. Observer includes the low gas limit in `MsgVoteOnObservedInboundTx`.
3. `PayGasAndUpdateCctx` computes outbound gas fee from the low limit, deducting almost nothing from the transfer amount.
4. `TryProcessOutTx` clamps the gas limit to 100k before broadcasting, so the TSS address pays the real gas cost.
**How found:** Code review comparing gas limit handling across coin types: noticed CoinType_Gas and CoinType_ERC20 overwrite OutboundTxGasLimit with a hardcoded value, while CoinType_Zeta uses the sender-supplied value, then traced the fee calculation and the later 100k clamp in evm_signer.
**Exploitation:** Attacker repeatedly sends Zeta token cross-chain transactions with gas limit 1, paying near-zero gas fees while the protocol's TSS address subsidizes the actual 100k gas cost on the destination chain.
**Insight:** When a protocol has multiple asset/coin types, compare validation and fee logic across types; a missing clamp in one branch can let users shift costs to the protocol.
