---
title: MSF-Quick Swap (MSFQ) Overview
url: https://www.emergentmind.com/topics/msf-quick-swap-msfq
type: topic
---

# MSF-Quick Swap (MSFQ) Overview

Searching arXiv for the cited works to ground the article in the latest indexed versions.
arXiv search query: 2211.15804
MSF-Quick Swap (MSFQ) is not a single technical construct across the supplied literature. In the provided sources, the designation refers to three different mechanisms: Most Servers First with Quick Swap, a nonpreemptive scheduling policy for multiserver jobs in datacenters [2509.01893]; a mapped name for the “Quick Swap” protocol for fairer HTLC-based cross-chain atomic swaps with griefing-premiums and cancellation hashes [2211.15804]; and a trustless, high-speed cross-chain transaction protocol that eliminates HTLCs by using pre-signed adaptor signatures, a minimal Ethereum smart contract, and an oracle [2503.12719]. The shared label therefore denotes distinct objects in queueing theory and decentralized exchange design rather than a unified protocol family.

## 1. Terminological scope and disambiguation

The ambiguity is explicit in the supplied material: one source defines MSFQ as “Most Servers First with Quick Swap,” another states that the acronym “MSF-Quick Swap (MSFQ)” does not appear in the paper and is being mapped onto that paper’s “Quick Swap” protocol, and a third uses MSFQ for a PTLC-based cross-chain protocol [2509.01893] [2211.15804] [2503.12719].

| Usage of MSFQ | Technical domain | Canonical source |
|---|---|---|
| Most Servers First with Quick Swap | Nonpreemptive multiserver job scheduling | [2509.01893] |
| Quick Swap (mapped to MSFQ in the supplied alignment) | HTLC-based atomic cross-chain swaps | [2211.15804] |
| MSFQ using pre-signed adaptor signatures | Near-instant cross-chain transactions | [2503.12719] |

This terminological overlap is a recurrent source of confusion. In the scheduling paper, “Quick Swap” denotes a queue-length-driven phase-switch mechanism layered on top of Most Servers First. In the HTLC paper, “Quick Swap” denotes a fairness-oriented swap protocol using griefing-premiums and cancellation hashes. In the adaptor-signature paper, MSFQ denotes a scriptless, oracle-gated construction aimed at market makers and high-frequency traders. The sources therefore require contextual disambiguation before any technical claim can be interpreted.

## 2. MSFQ as Most Servers First with Quick Swap in multiserver scheduling

In “Improving Nonpreemptive Multiserver Job Scheduling with Quickswap,” MSFQ is a nonpreemptive scheduling policy for multiserver jobs designed to preserve the high utilization of Most Servers First (MSF) while lowering mean response time and tail latency through a controlled phase-switch mechanism [2509.01893]. The system consists of a single pool of \(k\) servers. Jobs are rigid and stateful: a job is an ordered pair \((x,s)\), where \(x\in\{1,2,\dots,k\}\) is the server requirement and \(s\) is the service time. Class-\(i\) jobs arrive according to an independent Poisson process with rate \(\lambda_i\), and class-\(i\) service durations are i.i.d. exponential \(S_i\sim \exp(\mu_i)\). A feasible schedule is a multiset \(u=(u_1,\dots,u_k)\) satisfying \(\sum_{i=1}^k i\cdot u_i \le k\).

The baseline comparison is between FCFS and MSF. FCFS is nonpreemptive and respects arrival order, but head-of-line blocking can leave many servers idle and can degrade mean response time or even stability. MSF instead prioritizes jobs with larger server needs and greedily admits as many jobs as possible in descending order of server requirement. In the one-or-all case, where only 1-server and \(k\)-server jobs exist, MSF alternates between two exhaustive phases: a phase serving \(k\)-server jobs exclusively and a phase serving 1-server jobs, up to \(k\) in parallel. The paper attributes MSF’s poor practical behavior to a feedback loop: long large-job phases allow small jobs to accumulate, and long small-job phases allow large jobs to accumulate, producing extreme variability in waiting times.

MSFQ modifies this behavior by enforcing faster switching. In the one-or-all model, MSFQ with threshold \(\ell\in[0,k-1]\) operates in four phases. Phase 1 serves class-\(k\) jobs exclusively until none remain. Phase 2 serves class-1 jobs until \(n_1<k\). Phase 3 continues serving class-1 jobs until \(n_1\le \ell\). Phase 4 drains the class-1 jobs already in service and blocks admission of new small jobs; when \(n_1=0\), the system returns to Phase 1. The queue-length threshold \(\ell\) therefore controls swap timing. The source states that \(\ell=0\) reduces to MSF, while \(\ell=k-1\) maximally dampens accumulation feedback and yields short phase durations.

This construction is explicitly nonpreemptive. No job migration or forced interruption occurs. The “quick swap” is instead implemented by admission control: once the threshold condition is reached, the policy stops admitting additional small jobs and lets the current in-service set drain. In one-or-all systems, the packing logic is trivial; in more general systems, the paper retains MSF’s descending server-need order and supplements it with quickswap triggers.

## 3. Stability theory, response-time analysis, and evaluated variants of scheduling MSFQ

The scheduling paper proves a full stability result in the one-or-all case. MSFQ is positive recurrent for all \(\ell\), \(0\le \ell<k\), whenever
\[
\frac{\lambda_1}{k\mu_1} + \frac{\lambda_k}{\mu_k} < 1.
\]
It also proves that no scheduling policy is stable if
\[
\frac{\lambda_1}{k\mu_1} + \frac{\lambda_k}{\mu_k} \ge 1.
\]
Combining these results, the paper concludes that in the two-class one-or-all multiserver-job system, MSFQ has the optimal stability region for all \(\ell\), \(0\le \ell<k\) [2509.01893].

The mean-response-time framework is phase-based. Let \(H_i\) be the duration of phase \(i\in\{1,2,3,4\}\), \(m_i\) the fraction of time in phase \(i\), and \(N_i^S\) and \(N_i^L\) the numbers of small and large jobs at the beginning of phase \(i\). The total mean response time is decomposed as
\[
E[T] = \frac{\lambda_k}{\lambda}\Big(E[T_1^L]m_1+E[T_{2,3,4}^L](m_2+m_3+m_4)\Big)+\frac{\lambda_1}{\lambda}\Big(E[T_{1,4}^S](m_1+m_4)+E[T_2^S]m_2+E[T_3^S]m_3\Big).
\]
The paper then develops the constituent terms by combining an extended renewal-reward theorem, M/G/1 with Exceptional First Service (EFS), age/excess identities, and an absorbing M/M/\(k\) subchain for Phase 3. The summary theorem states that the mean response time under MSFQ depends on the first and second moments of \(H_i\) and \(N_i\) for all phases, and that these moments follow by differentiating the transforms provided in the analysis.

The same source introduces two broader variants. Static Quickswap cycles through classes in a fixed order, serving each class exclusively in a working phase and then draining it. Adaptive Quickswap preserves MSF’s priority order, admits any job that fits, and triggers a quickswap when there exists a waiting job class not currently in service and all currently served classes have no waiting jobs. Static Quickswap is stable whenever
\[
\sum_j \frac{\lambda_j}{\lfloor k/j \rfloor \mu_j} < 1,
\]
and if all class sizes \(j\) divide \(k\), it attains the optimal stability region. The paper does not attach an analogous throughput-optimality theorem to Adaptive Quickswap.

The empirical results are correspondingly differentiated. In a one-or-all synthetic workload with \(k=32\), \(p_1=0.9\), \(p_k=0.1\), and \(\mu_1=\mu_k=1\), MSFQ with \(\ell=k-1\) dramatically outperforms MSF, First-Fit, and nMSR, with up to two orders of magnitude lower MRT and weighted MRT at high \(\lambda\). In a multiclass synthetic workload with \(k=15\) and classes \(1,3,5,15\), Adaptive Quickswap is best and Static Quickswap is also strong. On a Google Borg trace-derived workload with 26 classes and \(k=2048\), both Quickswap variants deliver up to two orders-of-magnitude improvement at high load, and Static Quickswap is about \(5\times\) better than MSF despite its simplicity. The source also states that analysis predictions closely match simulation across \(\lambda\).

A common misconception is that MSFQ’s contribution is throughput only. The paper’s central claim is broader: MSFQ aims to retain MSF’s utilization advantages while sharply reducing waiting-time variability and tail latency by shortening the windows during which one class accumulates behind another. Another misconception is that the closed-form MRT analysis extends to general multiclass systems; the source states that exact MRT analysis is developed for one-or-all, while broader multiclass claims are supported by principled variants and simulation evidence.

## 4. MSFQ mapped to “Quick Swap” for HTLC-based atomic cross-chain swaps

In “Towards faster settlement in HTLC-based Cross-Chain Atomic Swaps,” the protocol is called “Quick Swap”; the supplied alignment states that the acronym “MSF-Quick Swap (MSFQ)” does not appear in the paper and maps MSFQ onto that protocol [2211.15804]. In this usage, the subject is not datacenter scheduling but fairer settlement in HTLC-based atomic cross-chain swaps.

The starting point is the standard two-party HTLC construction. Alice samples a secret \(s\), computes \(H=H(s)\), locks \(x_a\) on Chain-a in an HTLC redeemable by Bob if he can provide \(s\) before \(t_a\), and Bob locks \(y_b\) on Chain-b in an HTLC redeemable by Alice if she provides \(s\) before \(t_b\), with \(t_a>t_b\). The paper characterizes this structure as equivalent to an American call option without a premium. The initiator has free optionality: she can wait, exercise only if favorable, or allow the contract to time out. The counterparty’s capital remains locked, bearing opportunity cost, and the paper identifies this as a griefing problem.

The game-theoretic model formalizes that asymmetry. The players are the initiator \(A\) and the counterparty \(B\), each of type interested or malicious. Beliefs are represented by \(\theta_1\) and \(\theta_2\), actions under HTLC are continue and stop, and actions under Quick Swap are continue, stop, and cancel. Price dynamics use a geometric Brownian motion model for the spot price \(S_t\), with expected price
\[
\mathbb{E}[S_{t+\lambda}\mid S_t] = S_t e^{\mu \lambda}.
\]
Opportunity cost is denoted by \(c(\cdot)\), griefing-premium by \(L_g\), and in Quick Swap the paper sets \(Q=c(x_a t_a)\) and \(c(y_b t_b)=Q/2\); Alice locks \(L_g^A=1.5Q\) and Bob locks \(L_g^B=Q\).

The central analytical claim is a fairness result. Under HTLC, equilibria in which Alice delays or stops are plausible because optionality is free. Under Quick Swap, with properly sized griefing-premiums, cancel strictly dominates stop, and the equilibria favor either prompt continuation or prompt cancellation. The fairness notion is explicit: no compliant party ends worse off than not participating. This suggests that the paper’s target is not merely shorter latency but also a redistribution of the economic burden created by lock-up asymmetry and volatile prices.

## 5. Protocol mechanics, premium sizing, and cyclic multiparty extension of Quick Swap

The Quick Swap protocol uses on-chain hashlocks, timelocks, and multi-condition scripts combining a shared payment hash and cancellation hashes. The supplied alignment maps “payment hash” to \(H_1\), “cancellation hashes” to \(H_2\) and \(H_3\), timelocks to \(D\), \(\Delta\), \(t_a\), and \(t_b\), and the two parties to Alice and Bob [2211.15804].

The step sequence is specified. In preprocessing, Alice samples \(s_1\) and \(s_3\), computes \(H_1=H(s_1)\) and \(H_3=H(s_3)\), and shares them with Bob; Bob samples \(s_2\), computes \(H_2=H(s_2)\), and shares it with Alice. At \(t_1\), Bob locks the griefing-premium \(Q\) on Chain-b. At \(t_2=t_1+\tau_b\), Alice locks \(1.5Q\) on Chain-a and also locks principal \(x_a\) on Chain-a, redeemable by \(H_1\), with refund possible after \(t_a\) or earlier upon \(H_2\). At \(t_3=t_2+\tau_a\), Bob locks principal \(y_b\) on Chain-b, redeemable by \(H_1\), with refund possible after \(t_b\) or earlier upon \(H_3\). If Alice redeems before \(D\), she reveals \(s_1\) to claim \(y_b\), refunds \(1.5Q\), and Bob then uses \(s_1\) to redeem \(x_a\) and refund \(Q\). If Alice cancels before \(D\), she reveals \(s_3\) to refund \(1.5Q\); Bob uses \(s_3\) to refund \(y_b\), reveals \(s_2\) to refund \(Q\), and Alice uses \(s_2\) to refund \(x_a\).

Premium sizing is designed to make griefing strictly dominated. The source imposes
\[
Q \ge c(x_a\,t_a)
\]
and
\[
1.5Q - Q \ge c(y_b\,t_b) \quad \Rightarrow \quad Q \ge 2\,c(y_b\,t_b).
\]
Under these conditions, for Bob at \(t_3\), stop yields losing \(Q\) at \(D+\Delta\), whereas cancel yields recovering \(Q\); for Alice at \(t_4\), delaying to \(D\) forfeits \(1.5Q\), while either continue or cancel earlier avoids that loss. The paper also gives volatility-aware sizing by adding a volatility buffer to \(L_g\) when \(\sigma\) is high.

The settlement-speed claim is framed comparatively. HTLC allows endogenous delays \(T'\) and \(T\), and the expected settlement time rises with \(\mathbb{E}[T'+T]\), especially in volatile markets. Quick Swap instead enforces prompt continuation or prompt cancellation by time \(D\), with \(D\) chosen such that \(\tau_a+\tau_b < D < t_b\) and \(\Delta\) used as a small buffer. The source states that this caps indecision, shortens settlement, and removes the success-rate dependence on \(T\) and \(T'\). In the paper’s simulations, HTLC success rate falls rapidly with delay and, for \(\sigma=0.2\), is approximately \(0.6\) even at \(T=T'=0\), while Quick Swap’s success rate depends solely on \(x_a\).

The construction is extended to cyclic multiparty settings. In a three-party or \(n\)-party cycle, each party locks principal and griefing-premium with a shared payment hash \(\bar H\), party-specific cancellation hashes \(H_i\), and staggered timelocks \(T_0>T_1>\dots>T_n\). The source states that revealing the payment preimage triggers all redemptions, while revealing cancellation secrets triggers coordinated cancellations and refunds. The stated formal result is correctness, safety, and liveness in cyclic settings, with griefing-premiums sized to cover cumulative opportunity cost downstream.

The trade-offs are explicit. Compared with baseline HTLC, Quick Swap improves fairness, reduces indecision periods, and enhances participant-friendliness, but requires additional premium capital, roughly doubles the transactions and communication rounds, and depends on compatible support for hashlocks, timelocks, script branching, and aligned hash and timelock semantics.

## 6. MSFQ as a near-instant, trustless cross-chain protocol based on pre-signed adaptor signatures

In “Enabling High-Frequency Trading with Near-Instant, Trustless Cross-Chain Transactions via Pre-Signing Adaptor Signatures,” MSFQ denotes a protocol for trustless, high-speed cross-chain atomic swaps that eliminates HTLCs by using pre-signed adaptor signatures, a minimal Ethereum smart contract, and an oracle [2503.12719]. The stated objective is to accommodate market makers and high-frequency traders who must quote tight spreads and complete swaps within seconds rather than tens of minutes. The source states that the protocol reduces transaction times between Bitcoin and Ethereum swaps to approximately 15 seconds for a market maker.

The trust and threat model differs sharply from HTLC-based Quick Swap. Atomicity is still the core property: either both legs complete or both sides reclaim funds after timeouts. There is no centralized custodian. Adversaries include counterparties that abort or attempt to front-run, passive observers, mempool adversaries, MEV on Ethereum, and chain reorgs. The oracle is assumed decentralized and threshold-based, releasing the adaptor secret only when the stated condition is met. Bitcoin support is via Taproot and Schnorr on secp256k1; Ethereum support is via ECDSA identities and factory smart contracts.

The cryptographic core is an additive Schnorr adaptor construction. Standard Schnorr signing uses
\[
s = k + e x \bmod n,
\]
with verification
\[
sG = R + eX.
\]
The paper’s MSFQ construction defines an external secret \(s_a\), commitment \(C = H(s_a)\), Bob’s full Schnorr scalar \(s_B = k + e x \bmod n\), and partial signature
\[
s^* = s_B - s_a \bmod n.
\]
When \(s_a\) is released, the final signature is
\[
s_{\text{final}} = s^* + s_a = s_B,
\]
and the extraction property is
\[
s_a = s_{\text{final}} - s^* \bmod n.
\]
Swap parameters are bound into the Bitcoin spend key with a Taproot tweak,
\[
P_{\text{tweak}} = P + \mathrm{TagHash}(\text{“TapTweak”}, P \,\|\, m_{\text{swap}})\cdot G.
\]

The operational flow for the ETH \(\rightarrow\) BTC direction is pre-signed and oracle-gated. Bob, the maker, prepares the Bitcoin side off-chain: he chooses \(k\), computes \(R=kG\), forms \(m_{\text{swap}}\), computes the tweak and challenge, chooses adaptor secret \(s_a\), forms \(C=H(s_a)\), and sends the structured proposal and partial signature to Alice. Alice verifies the proposal and deploys a minimal Ethereum swap instance with immutable beneficiary, commitment \(C\), amounts, timeouts, oracle key, and swap ID, then locks ETH. Once the oracle observes the lock event, it signs the event data and releases \(s_a\). The final Bitcoin signature is computed immediately off-chain and broadcast. After publication of the final Bitcoin signature, Bob extracts \(s_a\) from \(s_{\text{final}}-s^*\) and uses it to claim the ETH from the contract.

The latency claim is narrowly defined. The maker’s critical path is approximately one Ethereum block, about \(12\)–\(15\) seconds on mainnet. Finalizing the Bitcoin signature and broadcasting it is sub-second. The source distinguishes this from full Bitcoin settlement: on-chain confirmation still follows Bitcoin’s cadence, but the maker’s exposure window is materially shortened and can be hedged.

The comparison with HTLCs is correspondingly structural. HTLCs require long timeouts and expose hash preimages and explicit scripts on-chain. The adaptor-signature MSFQ instead encodes conditions “scriptlessly” under Schnorr linearity and Taproot tweaks, so observers see normal signatures and tweaked keys. The paper attributes to this design lower latency, smaller script footprints, lower Bitcoin fees, improved privacy, and tighter spreads for market makers. It also states that with a reliable oracle and factory, operational success is near-100% under normal network conditions, while failure paths are governed by timeouts.

The security analysis emphasizes nonce security, replay prevention, adaptor-secret leakage only at the intended point, authenticated oracle outputs, immutable Ethereum beneficiaries to mitigate MEV theft, and timeout cushions for reorgs. The paper also discusses extensions to Lightning Network PTLCs and Ethereum rollups, where overall latency can fall further.

Across the supplied literature, then, “MSFQ” designates three distinct technical ideas: a queueing policy that accelerates phase transitions in nonpreemptive multiserver scheduling, a griefing-premium-based refinement of HTLC atomic swaps, and a scriptless, oracle-gated adaptor-signature protocol for near-instant cross-chain execution. The common lexical element “Quick Swap” consistently denotes a mechanism for accelerating transitions or settlement, but the underlying mathematical models, correctness criteria, and deployment assumptions differ fundamentally.

Source: https://www.emergentmind.com/topics/msf-quick-swap-msfq