# Decentralized Exchange that Mitigate a Bribery Attack

Crypto.world

> HTLCs are the workhorse contract behind payment channels, atomic swaps, and contingent payments, but they break when miners are bribed to censor a payee's transaction until the timelock expires.

**arXiv**: 2510.20645

**Published**: 2025-10-23

**Authors**: Nitin Awathare

## AI summary

## Overview

**Research area:** Blockchain cryptography and security — specifically payment-channel / atomic-swap protocols built on Hashed Time-Locked Contracts (HTLCs), and the game-theoretic security of these contracts against bribery.

**Technical level:** Intermediate to Advanced. The paper assumes familiarity with HTLCs, UTXO-style and smart-contract blockchains, transaction fees, and basic game-theoretic reasoning about rational miners.

**Scope:** The paper exposes two new bribery attacks — one on MAD-HTLC and one on He-HTLC — and proposes DEMBA, a two-phase HTLC protocol designed to resist every bribery scenario considered, evaluated on Bitcoin and Ethereum.

## What This Paper Is About

HTLCs are the workhorse contract behind payment channels, atomic swaps, and contingent payments, but they break when miners are bribed to censor a payee's transaction until the timelock expires. MAD-HTLC (Oakland'21) and He-HTLC (NDSS'23) try to fix this by giving miners a financial stake in enforcing the "right" outcome, and both analyze only two bribery cases: Alice colluding with a miner, or Bob colluding with a miner. The author shows that both protocols remain exploitable — including by a miner bribing *other miners*, a scenario neither prior analysis covers — and builds DEMBA, which removes the miner's power to confiscate tokens entirely and instead makes the two exchange participants accountable to each other.

## Key Contributions

1. **Miner-to-Miner Bribery Attack (M2MBA) on He-HTLC.** A miner censors Alice's preimage-revealing transaction, waits for an honest Bob to reveal his own preimage after time *T*, then claims Bob's collateral through He-HTLC's `col-M` path — splitting the proceeds with the miners who censored Alice. The paper notes a single miner could do this alone, but collusion produces a more stable income (analysis placed in Appendix D).
2. **Bribery-based Block Broadcasting Attack (B3A) on MAD-HTLC.** A stronger attack than He-HTLC's SDRBA and HyDRA: Bob finalizes and broadcasts a partially-mined block only if it contains a coinbase bribe paying him, plus the transactions he wants. The author states Bob can extract nearly the same profit as he would by attacking a naive HTLC, with an additional cost of only *br* compared with the naive-HTLC attack (under the assumption f_A^col = f_B^dep). Unlike SDRBA, B3A does not assume the miner withholds pre_B from other miners.
3. **DEMBA, a protocol claimed to resist all bribery scenarios** — Alice bribing miners, Bob bribing miners, and miner-to-miner bribery — supported by game-theoretic analysis. Both parties post collateral; the deposit contract reads the preimages revealed by the two collateral contracts rather than letting anyone redeem the deposit manually, so a third party (miner) can never confiscate tokens.
4. **Implementation and cost/latency evaluation on Bitcoin and Ethereum**, reported to beat or match MAD-HTLC and He-HTLC on cost in most paths while matching or exceeding them on time to complete (TTC).

## Main Findings

- **Naive HTLC attack profit (baseline):** Bob gains v^dep − [(k+1)·br + f_B^dep + f_B^{C_Bob}], where *k* is the number of blocks mined between t_pub and *T* (the figure uses k = 4) and br > f_A^dep.
- **M2MBA payoff on He-HTLC:** the bribing miner M_i earns v^col − (k − k_{M_i})·br, and other colluding miners earn br·k_{M_j}. In the worked example with k = 4 and k_{M_3} = 1, M_3 gains v^col − 3·br > f_B^col, whereas honest mining of tx_B^dep would yield only f_B^col. The attack requires v^col > f_A^dep and v^col > f_B^col, which the author argues is a reasonable assumption because fees are much smaller than transferred value.
- **Attack succeeds even with honest users:** in M2MBA, neither Alice nor Bob deviates — Alice reveals pre_A (it is simply not included), and Bob, seeing nothing on-chain, honestly publishes pre_B after *T*. The failure is entirely in the mining layer.
- **B3A payoff on MAD-HTLC:** Bob's net gain is v^dep − [(k+2)·br + (br or f_B^col) + f_B^{C_Bob}]. Two block templates are acceptable to Bob: Case 1 (bribe of v^dep − br to Bob, miner takes v^dep via tx_M^dep, Bob redeems v^col) or Case 2 (bribe of v^dep + v^col − 2·br to Bob, miner takes both via tx_M^dep and tx_M^col). The paper claims this yields nearly the same profit as attacking naive HTLC.
- **Root cause diagnosis:** MAD-HTLC and He-HTLC both grant enforcement power to an uninvolved third party, the miner. Simply revoking confiscation power would reintroduce naive-HTLC vulnerabilities, so DEMBA instead requires collateral from *both* Alice (v_A^col) and Bob (v_B^col).
- **DEMBA's commitment structure:** Alice can commit three ways — revealing pre_A sends v^dep to her; revealing only pre_A′ returns v^dep to Bob; revealing both burns v^dep. The third option exists to punish Bob if he bribed miners to censor her valid reveal, and Alice uses it only if she had already revealed pre_A. Bob has exactly one commitment: revealing pre_B.
- **DEMBA's fee schedule as an incentive tool:** fees paid must satisfy f_preA^col < f_preA′^col < f_preAA′^col, while fees actually earned by miners satisfy fm_preA^col > fm_preA′^col > fm_preAA′^col; the gap is burned. For tx_preB^col, miners earn more before *T* and less after, while Bob pays more after *T*. Honest behaviour makes paid = earned.
- **Deterrence logic:** if Bob bribes miners to censor tx_preA^dep, Alice redeems C_A^col with both preimages after *T*, v^dep is burned, and Bob ends up with v_B^col − k·br (br > f_A^dep). He gains nothing over honest behaviour.
- **Bitcoin cost results:** DEMBA reduces costs by 42% vs. MAD-HTLC but costs 17% more than He-HTLC for Alice's token claim; Bob's refund cost for both collateral and exchange tokens drops by 42% vs. He-HTLC and 150% vs. MAD-HTLC.
- **Ethereum cost results:** DEMBA saves 38% vs. MAD-HTLC and costs 7% more than He-HTLC for Alice, while reducing Bob's refund cost by 23% and 71% vs. He-HTLC and MAD-HTLC respectively. The paper describes these margins as smaller than on Bitcoin.
- **Latency:** DEMBA matches or exceeds He-HTLC and MAD-HTLC on time to complete while costing less. Exact TTC figures are not reported in the excerpt provided.
- **Not reported in the provided excerpt:** the full game-theoretic derivation in Section VI, the concrete parameter choices (v^col, v^dep, l, v^ded, br), the implementation setup details in Section VII, the related-work survey in Section VIII, and the concluding discussion in the appendix.

## Methodology in Plain English

The author works in three layers.

First, *protocol modelling*. HTLCs are described abstractly as a deposit contract plus a collateral contract, with named redemption paths (`dep-A`, `dep-B`, `dep-M`, `col-B`, `col-M`, and in DEMBA also `dep-Burn`), so the argument does not depend on Bitcoin- or Ethereum-specific encoding. Each path is defined by which preimage (pre_A, pre_A′, or pre_B) a redeemer must supply and by the deadline *T* or *T + l*.

Second, *attack construction*. Bob's existing bribe contract C_Bob is extended into concrete attack contracts — C_M2M for miner-to-miner collusion — and each attack is walked through block by block with a small worked example (k = 4 blocks, attacker M_3 mining one of them). Payoffs are written as closed-form expressions comparing what a party earns honestly versus what it earns by attacking, so the reader can check that attacking dominates.

Third, *defence by incentive design*. Rather than trying to out-guess miners, DEMBA removes their ability to take the money: the deposit contract cannot be redeemed manually and instead reads the preimages emitted by the two collateral contracts. Fees are then shaped so that deviating is strictly unprofitable and the difference between fee paid and fee earned is burned. Game-theoretic analysis (Section VI) backs the claim that any deliberate false commitment loses money for the deviator, and implementations on Bitcoin and Ethereum measure the real transaction cost and time to complete.

## Why This Matters

**Impact on research.** Prior analyses of HTLC bribery assumed bribery flows only between a protocol participant (Alice or Bob) and a miner. This paper shows the miner-to-miner channel is a distinct and sufficient attack surface, and that a meta-attack on MAD-HTLC can match naive-HTLC profits. That reframes what "bribery-resistant HTLC" must mean and gives the field a new baseline that any future scheme has to defend against.

**Real-world applications:**

- **Lightning Network routing** — payment channels rely on HTLCs; censoring a preimage reveal is exactly the failure mode that can strand routed funds.
- **Atomic swaps and cross-chain exchanges** — the paper's title application: swap counterparties need assurance that a bribed miner cannot redirect the swap.
- **Contingent payments and escrow** — conditional token release where a miner's ability to seize escrow is unacceptable.
- **Vaults** — time-locked custody constructions that inherit HTLC-style redeem paths.

**Industry relevance.** Exchange and wallet operators must decide which HTLC variant to deploy; the paper gives concrete cost deltas on Bitcoin and Ethereum (42%/17% and 38%/7% for Alice, plus large refund savings for Bob) so that the trade-off between security and fee overhead is quantified rather than assumed. It also addresses non-custodial DEX and bridge designers who currently assume MAD-HTLC or He-HTLC is sufficient.

## Future Directions

- **Generalising beyond the three modelled scenarios.** DEMBA is argued secure against Alice-bribes, Bob-bribes, and miner-to-miner bribery; whether combinations (e.g. Alice and a miner colluding while another miner also colludes) fall inside the analysis is not settled in the excerpt.
- **Parameter selection and deployment.** The protocol depends on choosing v_A^col, v_B^col, v^ded, the delay *l*, and the fee ladder f_preA^col < f_preA′^col < f_preAA′^col. The paper does not report a general calibration procedure in the provided text, and the relationship between *l* and bribe-avoidance (inherited from He-HTLC) would need re-examination under M2MBA-style collusion.
- **Cross-layer interaction with other censorship defences.** The two-phase design assumes transactions eventually land; how DEMBA composes with mempool-level attacks, fee-market congestion (the Harris–Zohar overload strategy cited in the introduction), and MEV-driven reordering is left open.
- **Formal verification or multi-agent simulation.** The security argument is game-theoretic with rational, profit-maximising miners; empirically testing collusion stability across mining-pool concentration levels (the "more stable income" claim deferred to Appendix D) would strengthen the case.

## Target Audience

Protocol researchers and graduate students working on payment channels, atomic swaps, and blockchain incentive design; security engineers at exchanges, bridges, and Lightning implementations who must pick an HTLC construction; and readers with a background in distributed systems or game theory who want a concrete example of how a "provably secure" contract can fail once an unmodelled adversary (a colluding miner) is added. Readers new to HTLCs will need the background section first, since the paper moves quickly into path-by-path payoff algebra.

## Authors’ abstract

Despite the popularity of Hashed Time-Locked Contracts (HTLCs) because of their use in wide areas of applications such as payment channels, atomic swaps, etc, their use in exchange is still questionable. This is because of its incentive incompatibility and susceptibility to bribery attacks. State-of-the-art solutions such as MAD-HTLC (Oakland'21) and He-HTLC (NDSS'23) address this by leveraging miners' profit-driven behaviour to mitigate such attacks. The former is the…

[The full abstract on arXiv](https://arxiv.org/abs/2510.20645)

[Read the original paper](https://arxiv.org/abs/2510.20645)

---

Canonical: https://crypto.world/paper/decentralized-exchange-that-mitigate-a-bribery-attack-2510.20645
