---
title: "Blockchains for Traders"
book: "Markets III: Commodities, Energy and Crypto"
subject: quant
language: en
chapter: 14
exercises: 8
source: https://one-course.com/books/quant/3/en/chapter/14-blockchains-for-traders
---

# Chapter 14 — Blockchains for Traders

A trader sees a [stablecoin](#def-m3-blockchains-for-traders-stable) priced at a discount on a decentralised venue and a premium on an exchange. She withdraws [tokens](#def-m3-blockchains-for-traders-key) from the exchange to capture the gap. The withdrawal waits in a queue, is broadcast, waits for a block, then for the confirmations the receiving venue requires; the transaction’s fee, bid in an auction she does not see, doubles while it waits. When the [tokens](#def-m3-blockchains-for-traders-key) arrive the gap has closed. Crypto markets settle on [blockchains](#def-m3-blockchains-for-traders-chain), and every property of a chain that an engineer might find abstract (how blocks are made, when they are final, what a transaction costs) is, for a trader, a latency, a cost or a risk. This chapter explains what a trader needs of the machinery: ledgers and consensus, [finality](#def-m3-blockchains-for-traders-finality), transactions and their fees, the [mempool](#def-m3-blockchains-for-traders-mempool), the layered chains built on top, [bridges](#def-m3-blockchains-for-traders-bridge) between them, and [stablecoins](#def-m3-blockchains-for-traders-stable), the dollars of this market.

## 14.1 Ledgers, consensus and finality

**Definition 14.1 (Blockchain, consensus protocol).**

A *blockchain* is a ledger kept by many independent computers as a chain of blocks, each containing a batch of transactions and a cryptographic hash of the block before, so that changing any past block would change every later one. A *consensus protocol* is the rule by which those computers agree on which block extends the chain.

**Definition 14.2 (Proof of work, proof of stake, validator).**

Under *proof of work* the right to propose a block is won by solving a costly computational puzzle, and the chain with the most accumulated work is the valid one. Under *proof of stake* it is assigned among *validators*, participants who lock (stake) the chain’s native [token](#def-m3-blockchains-for-traders-key) as collateral that can be destroyed if they misbehave, and who propose and attest to blocks.

**Definition 14.3 (Finality).**

*Finality* is the point after which a transaction can no longer be reversed: probabilistic under [proof of work](#def-m3-blockchains-for-traders-pow), where each further block makes a reversal exponentially less likely; economic under proof-of-stake protocols that finalise checkpoints, where reversing one would destroy a large share of the stake.

For a trader, [finality](#def-m3-blockchains-for-traders-finality) is a settlement cycle (One Quant Book 1, chapter 5) with a different shape. A venue credits a deposit only after a number of confirmations it chooses, trading off its own risk of a reversed deposit against its customers’ wait.

**As of September 2026 — Block times and finality.**

Bitcoin targets one block every ten minutes; a common convention treats six confirmations, about an hour, as final. Ethereum moved from [proof of work](#def-m3-blockchains-for-traders-pow) to [proof of stake](#def-m3-blockchains-for-traders-pow) on 15 September 2022 (the Merge); time is divided into 12-second slots and 32-slot epochs, and a block is finalised after two epochs, about 12.8 minutes. Ethereum block 26 048 449, produced at 16:17 UTC on 24 September 2026, had a [gas](#def-m3-blockchains-for-traders-gas) limit of 60 million, of which it used 22.1 million, at a [base fee](#def-m3-blockchains-for-traders-gas) of 1.49 gwei.

## 14.2 Transactions, gas and the fee market

**Definition 14.4 (Private key, token).**

A *private key* is the secret number whose signature authorises transactions from an address; whoever holds it controls the address’s assets. A *token* is a transferable unit recorded by a [blockchain](#def-m3-blockchains-for-traders-chain): the chain’s native coin, or a unit whose balances a program on the chain keeps.

**Definition 14.5 (Smart contract, oracle).**

A *smart contract* is a program deployed on a [blockchain](#def-m3-blockchains-for-traders-chain) whose code and state are public and whose functions anyone can call by sending a transaction; the chain executes it and records the result. An *oracle* is a mechanism that brings data from outside a chain (a price, an event’s outcome) into a smart contract.

**Definition 14.6 (Gas, base fee, priority fee).**

*Gas* is the unit in which Ethereum measures the computation and storage a transaction uses; each block has a gas limit. A transaction pays, per unit of gas, the block’s *base fee*, which is burned and set by protocol, plus a *priority fee* (a tip) that it chooses and that goes to the block’s proposer.

**Proposition 14.7 (The base fee rule).**

Under EIP-1559 a block’s [gas](#def-m3-blockchains-for-traders-gas) target is half its limit, and the next block’s [base fee](#def-m3-blockchains-for-traders-gas) is the parent’s multiplied by $1 + \tfrac18\,(g - g^{*})/g^{*}$, where $g$ is the parent’s [gas](#def-m3-blockchains-for-traders-gas) used and $g^{*}$ its target: at most $+12.5\%$ after a full block and $-12.5\%$ after an empty one. After $k$ full blocks the [base fee](#def-m3-blockchains-for-traders-gas) is $1.125^k$ times its starting level.

**Proof.** This is the EIP’s update with $g = 2g^{*}$ (full) or $g = 0$ (empty); iterate for $k$ blocks. The integer arithmetic of the protocol rounds each step down (and makes an increase at least one wei). ∎

Twenty full blocks, four minutes on Ethereum, multiply the [base fee](#def-m3-blockchains-for-traders-gas) by 10.5: from 10 gwei to 105.45 gwei. A swap using 150 000 [gas](#def-m3-blockchains-for-traders-gas) with a 2-gwei tip then costs $48.35 at an ether price of $3 000 (illustrative), against $5.40 before. Fees are what a trader’s latency is measured in when blocks are congested.

![A demand shock under EIP-1559: from block 5 to block 34 demand for gas is four times higher. Blocks fill, the base fee rises 12.5% a block until demand falls back to the target (half the limit), and decays when the shock ends. Illustrative demand; exact protocol arithmetic. Data: the chapter’s tutorial.](https://one-course.com/images/onecourse/chapters/quant-3/m3-blockchains-for-traders/fig-c166ff5956b3.svg)

***Figure 14.1.** A demand shock under EIP-1559: from block 5 to block 34 demand for [gas](#def-m3-blockchains-for-traders-gas) is four times higher. Blocks fill, the [base fee](#def-m3-blockchains-for-traders-gas) rises 12.5% a block until demand falls back to the target (half the limit), and decays when the shock ends. Illustrative demand; exact protocol arithmetic. Data: the chapter’s tutorial.*

## 14.3 The mempool

**Definition 14.8 (Mempool).**

The *mempool* is the set of signed transactions that nodes have received and relayed but that are not yet in a block: public, in most chains, to anyone who runs a node.

A transaction in the public [mempool](#def-m3-blockchains-for-traders-mempool) is an order that everyone can see before it executes. That visibility is the root of the extraction of [Chapter 22](https://one-course.com/books/quant/3/en/chapter/22-maximal-extractable-value#ch-m3-maximal-extractable-value): a searcher who sees a large swap waiting can place its own transactions before and after it. It also means a trader’s transfer is visible to competitors, and that its inclusion depends on what others bid: the [priority fee](#def-m3-blockchains-for-traders-gas) is an auction for position, and a transaction with too low a tip can wait for many blocks.

![The life of a transaction and where a trader’s time goes: waiting for inclusion depends on the fee paid against others’, waiting for finality on the chain. Schematic.](https://one-course.com/images/onecourse/chapters/quant-3/m3-blockchains-for-traders/fig-7540b4bb5448.svg)

***Figure 14.2.** The life of a transaction and where a trader’s time goes: waiting for inclusion depends on the fee paid against others’, waiting for [finality](#def-m3-blockchains-for-traders-finality) on the chain. Schematic.*

## 14.4 Base layers, rollups, sequencers and bridges

Base layers are slow and expensive because every node executes every transaction. Most activity has moved to chains built on top of them.

**Definition 14.9 (Rollup, sequencer).**

A *rollup* is a chain that executes transactions off the base layer and posts them, in compressed batches, to the base layer, which then guarantees their data and, through fraud or validity proofs, their correctness. Its *sequencer* is the operator that orders the rollup’s transactions and produces its blocks; on most rollups it is a single operator.

![A rollup orders transactions off the base layer and posts them there in batches; a bridge locks tokens on one chain and mints a claim on them on another. The sequencer and the bridge’s contracts or signers are the points of trust. Schematic.](https://one-course.com/images/onecourse/chapters/quant-3/m3-blockchains-for-traders/fig-278c2d0c37c5.svg)

***Figure 14.3.** A [rollup](#def-m3-blockchains-for-traders-rollup) orders transactions off the base layer and posts them there in batches; a [bridge](#def-m3-blockchains-for-traders-bridge) locks [tokens](#def-m3-blockchains-for-traders-key) on one chain and mints a claim on them on another. The [sequencer](#def-m3-blockchains-for-traders-rollup) and the [bridge](#def-m3-blockchains-for-traders-bridge)’s contracts or signers are the points of trust. Schematic.*

A single [sequencer](#def-m3-blockchains-for-traders-rollup) decides the order of transactions on its [rollup](#def-m3-blockchains-for-traders-rollup), which is the same power, and the same temptation, as a block builder’s on the base layer; it also sees transactions before they are ordered. [Rollup](#def-m3-blockchains-for-traders-rollup) transactions are cheap and fast to include, but they are final on the base layer only when the batch is.

**As of September 2026 — Who sequences the rollups.**

Of the 101 layer-2 projects in L2BEAT’s summary on 24 September 2026, 3 had a decentralised set of [sequencers](#def-m3-blockchains-for-traders-rollup); for 67, a user could sequence his own transactions through the base layer if the [sequencer](#def-m3-blockchains-for-traders-rollup) failed, and for 21 there was no such mechanism.

**Definition 14.10 (Bridge).**

A *bridge* moves [tokens](#def-m3-blockchains-for-traders-key) between chains: it locks or burns them on one chain and releases or mints a corresponding [token](#def-m3-blockchains-for-traders-key) on the other, on the strength of a proof or of a set of signers that attest to the lock.

A [bridge](#def-m3-blockchains-for-traders-bridge) concentrates assets in one set of contracts and keys, which makes it the largest target in crypto. In March 2022 attackers who had obtained a majority of the signing keys of the Ronin [bridge](#def-m3-blockchains-for-traders-bridge) withdrew about $600 million of [tokens](#def-m3-blockchains-for-traders-key); in April the US Treasury attributed the theft to a North Korean group.

## 14.5 Stablecoins: mint and redeem

**Definition 14.11 (Stablecoin, depeg).**

A *stablecoin* is a [token](#def-m3-blockchains-for-traders-key) designed to hold a fixed value against a currency, usually the dollar, most often by an issuer that holds reserves (cash, bills, repo) and mints [tokens](#def-m3-blockchains-for-traders-key) against deposits and burns them against redemptions. A *depeg* is a period in which the [token](#def-m3-blockchains-for-traders-key) trades away from its target value in the secondary market.

The peg is held by arbitrage between two markets. In the primary market, a few institutions deposit dollars with the issuer and receive [tokens](#def-m3-blockchains-for-traders-key), or return [tokens](#def-m3-blockchains-for-traders-key) and receive dollars, at one for one. In the secondary market, everyone else trades [tokens](#def-m3-blockchains-for-traders-key) on exchanges. When the [token](#def-m3-blockchains-for-traders-key) trades below a dollar, an institution with primary access buys it and redeems it; when it trades above, it mints and sells. The peg is only as good as that arbitrage, which depends on the reserves being worth a dollar and on redemption being open.

![How a reserve-backed stablecoin holds its peg: institutions with primary access mint and redeem at one for one and trade the difference against the secondary market. If redemption stops or the reserves are doubted, nothing holds the peg. Schematic.](https://one-course.com/images/onecourse/chapters/quant-3/m3-blockchains-for-traders/fig-d43c7f20da8a.svg)

***Figure 14.4.** How a reserve-backed [stablecoin](#def-m3-blockchains-for-traders-stable) holds its peg: institutions with primary access mint and redeem at one for one and trade the difference against the secondary market. If redemption stops or the reserves are doubted, nothing holds the peg. Schematic.*

**As of September 2026 — Stablecoins.**

Total [stablecoin](#def-m3-blockchains-for-traders-stable) supply was about USD 303 billion on 10 September 2026, of which USDT about USD 183 billion and USDC about USD 74 billion (aggregator figures). In March 2023 Circle could not withdraw USD 3.3 billion of USDC’s reserves, about 8% of them, from the failed Silicon Valley Bank; USDC traded as low as about 86 cents before the reserves were recovered and the peg restored. The Federal Reserve’s researchers note that most holders cannot redeem from the issuer and can only trade in secondary markets, and that issuance and redemption were constrained by banking hours.

## 14.6 Tutorial: the base fee and the cost of a transaction

**Goal.** Implement the base-fee rule in the protocol’s integer arithmetic, project it through full blocks and a demand shock, and cost a transaction. **End state:** [Figure 14.1](#fig-m3-blockchains-for-traders-shock) and the numbers of the weekend problem.

1. **The rule.** [Proposition 14.7](#prop-m3-blockchains-for-traders-basefee) as the EIP writes it. `def next_base_fee (parent_base_fee: int , gas_used: int , gas_limit: int ) -> int : """Base fee (wei) of the next block under EIP-1559.""" target = gas_limit // ELASTICITY if gas_used == target: return parent_base_fee if gas_used > target: delta = max (parent_base_fee * (gas_used - target) // target // DENOMINATOR, 1 ) return parent_base_fee + delta delta = parent_base_fee * (target - gas_used) // target // DENOMINATOR return parent_base_fee - delta def project (base_fee: int , usage: list [float ], gas_limit: int ) -> list [int ]: """Base fees of the next blocks when each block uses the given fraction of its gas limit.""" out = [] for u in usage: base_fee = next_base_fee(base_fee, int (u * gas_limit), gas_limit) out.append(base_fee) return out def tx_cost_usd (gas: int , base_fee_gwei: float , priority_gwei: float , eth_usd: float ) -> float : """Cost of a transaction: gas used times (base fee + priority fee), in dollars.""" return gas * (base_fee_gwei + priority_gwei) * 1e-9 * eth_usd` **Listing 14.1.** The EIP-1559 base fee, its projection and a transaction’s cost. code/firm/gasfee/firm_gasfee.py
2. **The shock.** Demand for [gas](#def-m3-blockchains-for-traders-gas) falls with the [base fee](#def-m3-blockchains-for-traders-gas); the fee rises until demand meets the target. `def demand_shock (blocks: int = 60 , start: int = 5 , end: int = 35 , mult: float = 4.0 , base_gwei: float = 10.0 ) -> list [tuple [int , float , float ]]: """(block, base fee in gwei, share of the gas limit used). Demand for gas at base fee b is LIMIT * min(1, a / b), with a set so that demand equals the target at the starting base fee; from `start` to `end` demand is `mult` times higher.""" a0 = 0.5 * base_gwei b = int (base_gwei * GWEI) out = [] for n in range (blocks): a = a0 * (mult if start <= n < end else 1.0 ) share = min (1.0 , a / (b / GWEI)) out.append((n, b / GWEI, share)) b = next_base_fee(b, int (share * LIMIT), LIMIT) return out` **Listing 14.2.** A demand shock under the base-fee rule. code/markets-3/14-blockchains-for-traders/python/m3_chain.py
3. **Run** `m3_chain.full_blocks(20)` , `arbitrage_breakeven()` and `fig_chain.py` .

**What to change next.** Make the shock’s demand more elastic and see how high the [base fee](#def-m3-blockchains-for-traders-gas) goes; add a distribution of competitors’ tips and compute the tip that maximises an arbitrage’s expected profit.

## 14.7 Build: fees and confirmation times

**Purpose.** Every on-chain action of the miniature firm (a transfer between venues, a swap, a liquidation) must be costed and timed before it is sent: the fee component projects [base fees](#def-m3-blockchains-for-traders-gas) and prices transactions; the confirmation model tells the transfer planner of [Chapter 16](https://one-course.com/books/quant/3/en/chapter/16-spot-markets#ch-m3-spot-markets) how long funds are in flight.

**Interface.** `next_base_fee(parent_base_fee, gas_used, gas_limit)` in wei; `project(base_fee, usage, gas_limit)`; `tx_cost_usd(gas, base_fee_gwei, priority_gwei, eth_usd)`; `confirmation_seconds(chain, confirmations)`.

**Rules.** Integer wei arithmetic exactly as in the EIP (floor division, minimum increase of one wei); unknown chains are an error, never a default.

**Acceptance tests.** `code/firm/gasfee/tests/`: $\pm12.5\%$ at full and empty blocks; unchanged at target; the one-wei minimum; twenty full blocks give $1.125^{20}$; confirmation times.

**Stretch.** Blob fees for [rollup](#def-m3-blockchains-for-traders-rollup) data; other chains’ fee markets; inclusion probability as a function of the tip from observed [mempools](#def-m3-blockchains-for-traders-mempool).

Sources and further reading

- S. Nakamoto, *Bitcoin: A Peer-to-Peer Electronic Cash System* , 2008.
- V. Buterin et al., *EIP-1559: Fee market change for ETH 1.0 chain* ; ethereum.org, proof-of-stake and The Merge documentation.
- Ethereum block 26 048 449 via a public JSON-RPC node; L2BEAT, scaling summary, 24 September 2026.
- Federal Reserve, FEDS Notes, “In the shadow of bank runs: lessons from the Silicon Valley Bank failure and its impact on stablecoins”, 17 December 2025.
- CoinDesk, “US officials tie North Korea’s Lazarus hackers to $625M Axie Infinity Ronin exploit”, 14 April 2022.
- Stablecoin supply: StablecoinBeat tracker, September 2026.

## 14.8 Exercises

**Exercise 14.1 ★.**

The [base fee](#def-m3-blockchains-for-traders-gas) is 20 gwei and the parent block used 75% of its limit. Give the next [base fee](#def-m3-blockchains-for-traders-gas).

**Solution of Exercise 14.1.**

$20 \times (1 + \tfrac18 \times 0.25/0.5) = 21.25$ gwei.

**Exercise 14.2 ★.**

How long does a venue that requires six Bitcoin confirmations make a depositor wait, on average? And for an Ethereum deposit credited at [finality](#def-m3-blockchains-for-traders-finality)?

**Solution of Exercise 14.2.**

About an hour (six blocks of ten minutes on average); about 12.8 minutes (two epochs) for Ethereum [finality](#def-m3-blockchains-for-traders-finality).

**Exercise 14.3 ★.**

Why does a [stablecoin](#def-m3-blockchains-for-traders-stable)’s peg depend on who may redeem it?

**Solution of Exercise 14.3.**

The peg is held by arbitrage between redemption at one dollar and the market price; only holders with primary access can do that arbitrage. If few can redeem, or redemption is closed (banking hours, a frozen reserve), the market price can fall below a dollar with nothing to pull it back.

**Exercise 14.4 ★★.**

How many consecutive full blocks double the [base fee](#def-m3-blockchains-for-traders-gas)? How many empty blocks halve it?

**Solution of Exercise 14.4.**

Full blocks: $\ln 2/\ln 1.125 = 5.9$, so six more than double it ($1.125^6 = 2.03$). Empty blocks: $\ln 0.5/\ln 0.875 = 5.2$, so five leave 51% and six leave 45%.

**Exercise 14.5 ★★.**

A swap uses 150 000 [gas](#def-m3-blockchains-for-traders-gas); the [base fee](#def-m3-blockchains-for-traders-gas) is 30 gwei, the tip 2 gwei and ether $3 000. What does it cost?

**Solution of Exercise 14.5.**

$150\,000 \times 32 \times 10^{-9} \times 3\,000 = \$14.40$.

**Exercise 14.6 ★★.**

Explain why a [rollup](#def-m3-blockchains-for-traders-rollup) transaction can be cheap and fast and yet not final.

**Solution of Exercise 14.6.**

A [rollup](#def-m3-blockchains-for-traders-rollup)’s [sequencer](#def-m3-blockchains-for-traders-rollup) includes it at once and cheaply, but the base layer guarantees it only when the batch is posted and (for an optimistic [rollup](#def-m3-blockchains-for-traders-rollup)) its challenge period has passed, or (for a validity [rollup](#def-m3-blockchains-for-traders-rollup)) its proof is verified; until then the [sequencer](#def-m3-blockchains-for-traders-rollup)’s ordering could in principle be replaced.

**Exercise 14.7 ★★★.**

*Coding.* With `demand_shock`, find the highest [base fee](#def-m3-blockchains-for-traders-gas) reached and the block at which blocks first stop being full.

**Solution of Exercise 14.7.**

The [base fee](#def-m3-blockchains-for-traders-gas) peaks at 39.20 gwei; blocks stop being full at block 11, once the [base fee](#def-m3-blockchains-for-traders-gas) has risen enough to bring demand below the limit.

**Exercise 14.8 ★★★.**

*Find the flaw.* “A [stablecoin](#def-m3-blockchains-for-traders-stable) backed one for one by Treasury bills cannot lose its peg.”

**Solution of Exercise 14.8.**

The peg also needs redemption to work when holders want it: banking hours, a custodian failure (as at Silicon Valley Bank in 2023), a legal freeze or the issuer’s own solvency can stop redemptions, and secondary prices then fall regardless of what the reserves are worth.

## 14.9 Problem: The Gas Spike

**Problem 14.1.**

Weekend problem — an arbitrage racing a congested chain

A searcher runs an arbitrage that earns $60 before [gas](#def-m3-blockchains-for-traders-gas), uses 150 000 [gas](#def-m3-blockchains-for-traders-gas) and tips 2 gwei. The [base fee](#def-m3-blockchains-for-traders-gas) is 10 gwei and ether costs $3 000 (illustrative). A popular [token](#def-m3-blockchains-for-traders-key) launch fills every block.

**Part I — The fee.**

1. What does the arbitrage pay in [gas](#def-m3-blockchains-for-traders-gas) now?
2. What is the [base fee](#def-m3-blockchains-for-traders-gas) after one full block, and after twenty?
3. What does the arbitrage then pay in [gas](#def-m3-blockchains-for-traders-gas) ?
4. How long do twenty blocks take?
5. Who receives the [base fee](#def-m3-blockchains-for-traders-gas) , and who the tip?

**Part II — The break-even.**

6. At what [base fee](#def-m3-blockchains-for-traders-gas) does the arbitrage stop paying?
7. After how many full blocks is that reached?
8. What if the arbitrage earned $120?
9. Why might the searcher raise its tip during the spike?
10. What happens to the [base fee](#def-m3-blockchains-for-traders-gas) when the launch ends?

**Part III — Alternatives.**

11. Would a [rollup](#def-m3-blockchains-for-traders-rollup) be cheaper, and what would the searcher give up?
12. How does a private submission change the searcher’s competition?
13. Why is the [base fee](#def-m3-blockchains-for-traders-gas) burned rather than paid to the proposer?
14. What does the spike do to users who are not arbitrageurs?
15. What does the searcher learn from the [mempool](#def-m3-blockchains-for-traders-mempool) during the spike?

**Part IV — Judgement.**

16. Is the fee market a good way to allocate block space?
17. What does a trader moving funds between venues need from this chapter?
18. Why do fees matter more for small arbitrages than large ones?
19. State the *named result* : the base-fee multiplier after twenty full blocks, and the number of full blocks after which the arbitrage stops paying.
20. In one sentence: what does a transaction’s fee buy?

**Solution of Problem 14.1.**

**1.** $5.40. **2.** 11.25 gwei after one, 105.45 gwei after twenty. **3.** $48.35. **4.** About four minutes (twenty 12-second slots). **5.** The [base fee](#def-m3-blockchains-for-traders-gas) is burned; the tip goes to the block’s proposer. **6.** $60/(150\,000 \times 10^{-9} \times 3\,000) - 2 = 131.33$ gwei. **7.** After 22 full blocks ($\ln 13.13/\ln 1.125 = 21.9$). **8.** The break-even rises to 264.67 gwei, reached after 28 full blocks. **9.** Competition for inclusion: other searchers bid for the same opportunity, and the tip, not the [base fee](#def-m3-blockchains-for-traders-gas), decides the order. **10.** It falls by up to 12.5% a block until demand meets the target. **11.** Yes, but its fills are final only when batches settle, liquidity and opportunities differ, and its [sequencer](#def-m3-blockchains-for-traders-rollup) controls ordering. **12.** It hides the transaction from other searchers until inclusion, at the cost of paying the builder rather than competing in the open [mempool](#def-m3-blockchains-for-traders-mempool). **13.** So that proposers cannot profit from inflating it, and to make fees predictable; burning also returns value to all holders. **14.** Their transactions cost ten times more or wait. **15.** Which transactions and contracts are competing, and the tips others pay. **16.** It prices congestion transparently and predictably, but it allocates space to the highest payers, which in a spike are those with the most to extract. **17.** How long transfers take to be final and what they cost in congestion, so that a cross-venue trade is priced with both. **18.** [Gas](#def-m3-blockchains-for-traders-gas) is a fixed cost per transaction, so it takes a larger share of a small profit. **19.** *Named result:* twenty full blocks multiply the [base fee](#def-m3-blockchains-for-traders-gas) by 10.5 (10 to 105.45 gwei); the $60 arbitrage stops paying after 22 full blocks. **20.** Position and inclusion in a block.

## 14.10 Interview questions

**Interview question 14.1 ★ trader.**

What does [finality](#def-m3-blockchains-for-traders-finality) mean, and why does it matter for moving funds between exchanges?

**Solution of Interview question 14.1.**

The point after which a transaction cannot be reversed. A venue credits deposits only after it, so a transfer between exchanges is locked for that time and exposed to prices; a reversed deposit is a loss for the venue.

*What the interviewer is looking for: settlement latency as inventory risk.*

**Interview question 14.2 ★ developer.**

Explain EIP-1559’s [base fee](#def-m3-blockchains-for-traders-gas) and [priority fee](#def-m3-blockchains-for-traders-gas).

**Solution of Interview question 14.2.**

The [base fee](#def-m3-blockchains-for-traders-gas) is set by protocol from the previous block’s [gas](#def-m3-blockchains-for-traders-gas) used (up or down by at most 12.5%) and burned; the [priority fee](#def-m3-blockchains-for-traders-gas) is chosen by the user and paid to the proposer to be included before others.

*What the interviewer is looking for: the update rule, the burn, and the tip as the auction.*

**Interview question 14.3 ★★ researcher, trader.**

How does a reserve-backed [stablecoin](#def-m3-blockchains-for-traders-stable) keep its peg, and how can it fail?

**Solution of Interview question 14.3.**

Primary-market arbitrage by institutions that mint and redeem at one dollar against secondary prices. It fails if reserves lose value or become inaccessible, if redemption is suspended or restricted, or if the issuer’s solvency or legal standing is doubted.

*What the interviewer is looking for: mechanism plus the conditions it needs.*

**Interview question 14.4 ★★ risk.**

What are the risks of holding assets bridged from one chain to another?

**Solution of Interview question 14.4.**

The bridged [token](#def-m3-blockchains-for-traders-key) is a claim on assets locked in the [bridge](#def-m3-blockchains-for-traders-bridge): smart-contract bugs, compromised signing keys, the [bridge](#def-m3-blockchains-for-traders-bridge)’s governance, and [depegs](#def-m3-blockchains-for-traders-stable) between the bridged and the native [token](#def-m3-blockchains-for-traders-key).

*What the interviewer is looking for: the [bridge](#def-m3-blockchains-for-traders-bridge) as a concentrated custodian.*

**Interview question 14.5 ★★ developer.**

A deposit shows one confirmation. When should your system credit it, and what can go wrong?

**Solution of Interview question 14.5.**

Credit only after the chain’s [finality](#def-m3-blockchains-for-traders-finality) (or a confirmation count set by the amount at risk and the chain’s reorg history); until then show it as pending. Risks: a reorganisation drops the transaction, a double spend, or a fork.

*What the interviewer is looking for: risk-based confirmation policy.*

**Interview question 14.6 ★★★ developer, researcher.**

Design a fee estimator that tells a trading system what tip to pay to be included within two blocks with 95% probability.

**Solution of Interview question 14.6.**

Observe the [mempool](#def-m3-blockchains-for-traders-mempool) and recent blocks: the distribution of tips of included transactions by block, the pending queue and its tips, and the [base fee](#def-m3-blockchains-for-traders-gas) path. Estimate, for each tip, the probability of inclusion in the next two blocks ([base fee](#def-m3-blockchains-for-traders-gas) projected, competition from pending transactions and expected new arrivals), and choose the lowest tip above 95%; update each block and back-test against realised inclusions.

*What the interviewer is looking for: data, a probabilistic model, and calibration against outcomes.*
