# The Paradox Of Just-in-Time Liquidity in Decentralized Exchanges: More
Providers Can Sometimes Mean Less Liquidity

Agostino Capponi, Ruizhe Jia, and Brian Zhu111Department of Industrial
Enginering and Operations Research, Columbia University, New York (NY).

(29 November 2023)

###### \text{{Abstract}}

We study just-in-time (JIT) liquidity provision within blockchain-based
decentralized exchanges (DEXs). In contrast to passive liquidity providers
(LPs) who deposit assets into liquidity pools before observing order flows,
JIT LPs take a more active approach. They monitor pending orders from public
blockchain mempools and swiftly supply liquidity, only to withdraw it in the
same block. Our game-theoretical analysis uncovers a paradoxical scenario: the
presence of a JIT LP, rather than enhancing liquidity as expected, can
inadvertently reduce it. A central reason behind the paradox is the adverse
selection problem encountered by passive LPs, stemming from the presence of
informed arbitrageurs. Unlike passive LPs, JIT LPs have the advantage of
analyzing the order flow prior to providing liquidity and block confirmation.
We show that this second-mover advantage mitigates their adverse selection
costs and potentially crowds out passive LPs, particularly when order flows
are not highly elastic to changes in pool liquidity. These equilibrium effects
may lead to an overall reduction of pool liquidity and to an increased
execution risk for liquidity demanders. To alleviate the detrimental effects
of JIT liquidity, we propose a two-tiered fee structure for passive and JIT
LPs. We show that this structure may prevent crowding out and improve welfare.

##  1 Introduction

Market liquidity is essential in financial markets, playing a key role in
maintaining the stability and efficiency of trading. It significantly affects
the price impact of trades and transaction costs for investors. Low market
liquidity result in decreased trading volumes and diminished gains from
trades. Consequently, regulatory bodies like the U.S. Securities and Exchange
Commission (SEC) and The Bank For International Settlements (BIS) have raised
concerns about current market liquidity and the design of existing market
structures.

Regulators are constantly in search of innovative solutions to enhance
liquidity provision. Advancements in blockchain technology have spurred
significant developments in Decentralized Finance (DeFi), notably in
decentralized exchanges (DEXs) that employ Automated Market Makers (AMMs),
positioning them at the forefront of financial innovation. A prominent example
is the BIS’s Project Mariana, which explores the incorporation of AMMs in
foreign exchange trading, especially in combination with central bank digital
currencies (BIS (2023)). Unlike conventional market structures, AMMs bring
unique benefits, such as automated pricing and more evenly distributed risk
among liquidity providers (see Malinova and Park (2023)). This innovative
market model shows great promise in transforming liquidity provision within
financial markets.

However, a key obstacle to the broader adoption and effectiveness of this
innovation is the profitability challenge faced by market makers. Analysis of
Uniswap V3 liquidity positions shows that half of these positions are
unprofitable (Loesch et al. (2021)). Additionally, game-theoretical models
indicate that liquidity providers are subject to infrastructure rent
extraction, which weakens their incentive to supply liquidity (Capponi and Jia
(2021)). This problem leads to insufficient market depth in AMMs, resulting in
higher transaction costs and lower trading volumes. Recent data from September
2023 indicates a stagnation in trading volume and market depth in AMM pools
(CoinGecko (2023)). Addressing this issue of liquidity depth is vital for AMMs
to effectively lower transaction costs.

In response to these challenges, a novel approach known as just-in-time
liquidity (JIT) has emerged (see Wan and Adams (2022) for more details). JIT
leverages the unique order execution mechanism of public blockchains, where
transactions are processed in discrete blocks and visible in the public memory
pool before execution. This transparency enables certain liquidity providers
(LPs) to preview pending market orders, respond with matching liquidity, earn
fees from executing swaps, and then withdraw their liquidity, all within a
single block.222This mechanism resembles that of a sandwich attack analyzed in
Capponi, Jia, and Wang (2023), with the difference that the order is now
sandwiched between a liquidity supply and a liquidity withdrawal action. This
ability to pre-screen and strategically select which market orders to match
significantly mitigates the risk of adverse selection. This feature, in sharp
contrast to the lack of transparency in centralized exchanges where market
orders are not visible beforehand, highlights the transformative potential of
JIT liquidity.

With this new form of liquidity provision, the DEX ecosystem would feature two
types of liquidity providers. Passive liquidity providers commit their tokens
for a fixed duration, lacking choice over the market orders they face, thereby
exposed to risks from market volatility. Conversely, active providers leverage
the JIT liquidity mechanism, strategically depositing their tokens in response
to pending market orders. This strategy grants them a second-mover advantage,
enabling the avoidance of unfavorable trades and the pickoff risks.

Can "just-in-time" (JIT) liquidity enhance overall market liquidity? At first
glance, it appears to alleviate costs in liquidity provision, particularly by
allowing market makers to judiciously choose their participation based on
visible order flow. Moreover, the addition of active liquidity provision to
existing passive provision would seemingly indicate a higher amount of market
liquidity in the system.

We argue that this perspective might be overly simplistic. Our analysis,
utilizing a game-theoretical framework, suggests that the influence of high-
frequency market makers on aggregate liquidity is intricately connected to how
uninformed order flow responds to liquidity depth.

We show that, for tokens with high elasticity of uninformed order flow to pool
depth, active and passive liquidity providers are strategic complements.
Active providers, while capturing a substantial share of transaction fees,
indirectly support passive providers by boosting overall trading volume. Their
entry reduces transaction costs, attracts more trader order flow, and benefits
passive providers, encouraging their continued participation in DEXs.
Consequently, this interaction leads to an increase in overall aggregate
market liquidity.

In contrast, when the elasticity of uninformed order flow to pool depth is
low, active and passive providers become strategic substitutes. Active
providers accrue the majority of transaction fees from uninformed flows.
However, this does not correspond with a proportional increase in overall
trading volume, thus failing to offset the reduced fees of passive providers.
This imbalance can lead to a decrease in passive providers’ engagement in
liquidity provision, thus undermining the aggregate market liquidity.

The potential exit of passive liquidity providers poses a significant risk,
notably diminishing visible pre-trade liquidity in DEXs. This reduction in
liquidity transparency, coupled with the unpredictability of additional
contributions by active providers, can lead to heightened price impacts and
price uncertainty. Such market conditions are likely to deter uninformed
traders from trading, negatively affecting their participation in DEXs and
consequently reducing overall gains from trades.

To optimize the benefits of this novel liquidity provision mechanism in AMM
without undermining market liquidity, a reevaluation of the market design is
needed. We propose a two-tiered fee system implemented via smart contracts to
balance incentives between active and passive liquidity providers. This system
mirrors the rebates and reduced costs found in centralized exchanges for
designated market makers. Active market makers, identified by their rapid
token redemption, would share a portion of their fees with passive providers,
who hold tokens longer. This mechanism aims to mitigate the crowding-out
effect and compensate passive liquidity providers for the risk of always being
in the market, ensuring both types of market makers are adequately
incentivized. We solve for the optimal fee structure that maximizes gains from
trade and ensures an increase in the aggregate market liquidity after the
entry of active LPs.

###  1.1 Literature Review

Our study expands the existing body of literature on DEXs and AMMs. Existing
literature has so far focused on analyzing the benefits and costs of passive
liquidity provision on DEXs. Capponi and Jia (2021) argue that, under the
current blockchain order execution mechanism, the arbitrage losses incurred by
passive liquidity providers are unavoidable and proposes an optimal design of
the DEX pricing functions that mitigate these losses and maximize social
welfare. Park (2023) show that the liquidity invariance pricing function
enables front-running, and increases traders’ costs. Lehar and Parlour (2023)
compare centralized and decentralized exchanges, accounting for information
asymmetry frictions. Aoyagi and Ito (2021) investigates market dynamics and
trading patterns stemming from the coexistence of centralized and
decentralized exchanges. Barbon and Ranaldo (2021) compare trading costs and
price efficiency of centralized and decentralized exchanges, advocating for
the growing competitiveness of automated market makers. Hasbrouck, Rivera, and
Saleh (2022) show that charging higher trading fees at a DEX would reduce the
price impact of trades, and consequently increase trading volumes. Milionis et
al. (2022) provide a “Black-Scholes formula” for AMMs, which quantifies in
closed-form the adverse selection costs faced by liquidity providers.
Hasbrouck, Rivera, and Saleh (2023) and Milionis et al. (2022) quantify the
’optionality’ relinquished by pool deposits, under the assumption of an
external price process that that restricts AMM liquidity providers to fixed
durations, preventing position adjustments or liquidity withdrawals. A recent
study by Malinova and Park (2023) discuss the potential application of AMMs in
equity trading, suggesting AMMs as alternatives to traditional limit order
books.

Relative to the above surveyed studies, our paper breaks new ground by
analyzing a novel model of active liquidity provision, which has not been
previously explored. We assess whether JIT liquidity can alleviate frictions
inherent in the current AMM designs and enhance overall market liquidity.

Our research is also broadly related with the market microstructure
literature, particularly regarding speed heterogeneity and the impact of high-
frequency trading (HFT) in traditional centralized exchanges. Han, Khapko, and
Kyle (2014) contribute to this discourse by demonstrating that slower market
makers, in comparison to HFT entities, exhibit delayed responses in order
cancellations, thereby becoming more susceptible to toxic flow. In their
paper, they show that the presence of HFTs leads to wider spreads and reduced
liquidity, or HFTs might entirely supplant slower market makers without
changing the spread, potentially making full crowding out beneficial in
certain CEX scenarios. Our paper, however, highlights the potential risks
associated with the crowding out of low-frequency market makers, a concern
that warrants careful consideration in the evolving landscape of DEXs and
AMMs. We also refer to the survey paper by Menkveld (2015) for a discussion on
the adverse selection costs imposed by faster market makers on slower market
makers.

Our paper also contributes to the small body of literature on JIT liquidity.
Wan and Adams (2022) describes the mechanism of JIT, and provides statistics
on the success and failure rates of JIT transactions, along with information
about the number of accounts involved. Xiong et al. (2023) conducts an
empirical study of over 30,000 JIT liquidity provision instances, analyzing
metrics such as the liquidity-to-swap volume ratio, share dilution for passive
LPs, and price improvement for traders. We relate our model to their empirical
findings in Section 3.

###  1.2 Institutional Details

JIT liquidity is a special form of liquidity provision where a liquidity
provider mints and burns a trading position on a DEX before and after a swap.
To submit a transaction, a provider must broadcast it in the peer-to-peer
blockchain network and bid a priority fee. Once the transaction is received by
the blockchain validators333Validators ensure the authenticity of
transactions, incorporate them into new blocks, and then add these blocks to
the chain, thereby earning the priority fees corresponding to those
transactions., it becomes a pending order in their mempools. At discrete
times, one validator is chosen to append the next block to the chain. As the
block space is limited, the validator will execute orders in her mempool in
descending order of priority fees.

Pending orders are publicly visible to all blockchain users. A JIT liquidity
provider would execute the following actions: (i) spot a pending uninformed
order of swapping tokens in a liquidity pool, (ii) add liquidity to the pool,
(iii) letting the swap execute, and (iv) remove the liquidity from the pool.
This sequence of transactions would take place in a single block. For example,
suppose there is $10,000 of liquidity in the pool concentrated in a $0.01
price range. A liquidity provider sees that a user has submitted a swap of
$5,000 worth of Ethereum tokens for Bitcoin tokens, which incurs a trading fee
of $100. Within the same block, the JIT liquidity provider adds $90,000 of
liquidity in that small range which now represents 90% of liquidity in the
range. This means that the JIT provider would receive 90% of the $100 fee,
leaving the passive liquidity provider with just 10 dollars compared to his 90
dollars (minus gas fees). We refer to Wan and Adams (2022) for a more detailed
introduction to JIT.

##  2 Model

There are two types of liquidity providers: passive LPs and a JIT LP. There
are three types of traders: an informed trader, an uninformed trader, and an
arbitrageur. The agents play a sequential game of liquidity provision and
trading on an AMM. The AMM determines the execution price of a swap between
two coins: a risky coin $R$ initially priced at $p>0$ and a stable coin $S$
priced at 1 that acts as a numeraire.

###  2.1 Automated Market Maker

#### Pricing Function.

Denote $r_{0}$ and $s_{0}$ as the initial reserves of risky and stable coins,
respectively. The AMM employs the Uniswap V3 pricing function, defined as

$\displaystyle
F(r,s;a,b)=(r+b^{-1/2}(r_{0}s_{0})^{1/2})(s+a^{1/2}(r_{0}s_{0})^{1/2}),$

where parameters $a$ and $b$ set the liquidity provision price range
$[a,b]\subseteq[0,\infty]$, ensuring that the price $p$ falls within this
range. Notably, when $a=0$ and $b=\infty$, this function aligns with the
constant product model of Uniswap V2. In contrast, Uniswap V3 introduces
flexibility for Liquidity Providers (LPs) to choose their active liquidity
provision range. For our analysis, however, we assume that LPs are constrained
to deposit within a predefined range, $[a,b]$, rather than allowing them to
select this range endogenously.

Liquidity providers must deposit coins at the fundamental exchange rate,
i.e.,

$\displaystyle\frac{F_{r}(r_{0},s_{0};a,b)}{F_{s}(r_{0},s_{0};a,b)}=p,$

where $F_{r}$ and $F_{s}$ denote, respectively, the partial derivatives of the
function $F$ with respect to $r$ and $s$. Note that $F_{r}/F_{s}$ is the rate
at which an infinitesimal amount of risky coins is swapped for stable coins
(see also Capponi and Jia (2021)).

#### Invariance Relationship.

The AMM’s design mandates that the liquidity pool’s inventory satisfies the
invariance condition:

$\displaystyle F(r,s;a,b)=r_{0}s_{0},$

both before and after any trades. In addition, the trader must pay a trading
fee proportional to the quantity of risky or stablecoins that are to be
swapped. We denote by $f$ the per-unit fee. We assume that this fee goes
directly to the liquidity providers.444Many studies in the literature,
including Lehar and Parlour (2021) and Hasbrouck, Rivera, and Saleh (2022),
make similar assumptions. In some exchanges such as Uniswap, the fee is
incorporated into the liquidity pool through the creation of new tokens, as
captured for instance in Capponi and Jia (2021). We set the gas fee paid by
the agents to prioritize their execution to zero. Under this assumption, JIT
liquidity providers always enter the market, which is the case of interest for
our study.555If there is a nonzero priority fee, JIT liquidity providers will
deposit only if their earnings from fees and the price impact of trades
outweigh the predetermined priority fee.

###  2.2 Sequential Game

#### Period 1: Passive LPs Contribute to Liquidity Pools.

In Period 1, a total of $N$ identical passive LPs, each labeled by an index
$i\in[N]$, participate. Their action is to decide on their contribution
amounts to the liquidity pool. Specifically, each LP $i$ contributes
$D^{(i)}_{P}$ units of risky coins and $pD^{(i)}_{P}$ units of stablecoins.
Consequently, the total contribution from all passive LPs amounts to
$D_{P}\equiv\sum_{i\in[N]}D^{(i)}_{P}$ in risky coins and
$\sum_{i\in[N]}pD^{(i)}_{P}=pD_{p}$ in stablecoins.

#### Period 2: Arrival of Informed and Uninformed Traders.

In Period 2, one of two mutually exclusive and collectively exhaustive events
occurs:

An informed trader, possessing substantial amounts of both coin types and a
perfect predictive signal $\sigma$ for the future price $p^{\prime}$ of the
risky asset realized in Period 5, enters the market with probability
$\alpha\in[0,1]$. This trader decides to exchange either
$d_{R}\in\mathbb{R}_{+}$ units of risky coins or $d_{S}\in\mathbb{R}_{+}$
units of stablecoins. The trade order is then submitted to the public mempool
of the blockchain.

An uninformed trader, is also endowed with a large amount of both coin types
arrives in period 2, with probability $1-\alpha$. He trades for liquidity
reasons only, and has private valuation $p_{U}$ for the risky coins, given by

$\displaystyle p_{U}=\begin{dcases}\xi_{U}^{-1}p&\text{with probability
$\xi_{U}(\xi_{U}+1)^{-1}$}\\\ \xi_{U}p&\text{with probability
$(\xi_{U}+1)^{-1}$},\end{dcases}$

where $\xi_{U}>1+f$ is a constant. Similar to the informed trader, the
uninformed trader’s strategy involves deciding on amounts
$d_{R}\in\mathbb{R}_{+}$ and $d_{S}\in\mathbb{R}_{+}$ to swap, such that
$(d_{R},d_{S})\in\mathbb{R}_{+}^{2}\backslash\mathbb{R}_{++}^{2}$. This swap
order is also submitted to the blockchain’s public mempool.

#### Period 3: Decision of JIT LPs on Liquidity Supply.

In Period 3, a JIT LP, endowed with a large amount of both coin types, enters
the market. The JIT LP either participates or does not participate. We use the
indicator variable $\pi\in\\{0,1\\}$ to denote whether or not he participates
($\pi=1$ means participation and $\pi=0$ means he does not participate). Upon
arrival, the JIT LP determines the amount of liquidity to provide.
Specifically, the LP submits an order to deposit $D_{J}$ units of risky coins
and $pD_{J}$ units of stablecoins. This deposit is strategically placed just
before the traders’ swap. Immediately after the swap transaction, the JIT LP
submits an order to withdraw its share of liquidity from the pool.

#### Period 4: Settlement of Trades.

In Period 4, the block containing both the swap and JIT liquidity provision
transactions is validated, leading to the following sequence of events:

  * •

JIT LP Deposit: The order from the JIT LP Provider to deposit $D_{J}$ units of
risky coins and $pD_{J}$ units of stablecoins into the liquidity pool is
executed.

  * •

Swap Execution and Fee Distribution: The trader’s swap order is executed. The
passive LPs collectively receive a proportional share of the transaction fee,
calculated as $\frac{\sum_{i\in[N]}D^{(i)}_{P}}{\sum_{i\in[N]}D^{(i)}_{P}+\pi
D_{J}}$. The remaining portion of fees is earned by the JIT LP.

  * •

JIT LP Withdrawal: Post-swap, the JIT LP withdraws their deposits from the
pool.

#### Period 5: Market Response and Arbitrage.

In Period 5, events unfold in a manner perfectly correlated with those in
Period 2, leading to one of two mutually exclusive scenarios:

  * •

If an informed trader arrived in Period 2, the price of the risky coin adjusts
to $p^{\prime}$:

$\displaystyle p^{\prime}=\begin{dcases}\xi^{-1}p&\text{with probability
$\xi(\xi+1)^{-1}$}\\\ \xi p&\text{with probability
$(\xi+1)^{-1}$},\end{dcases}$

where $\xi>1+f$ is a constant.

  * •

If an uninformed trader arrived in Period 2, the price of the risky coin
remains at $p$. This leads to a reverse trade arbitrage opportunity, as
detailed in Capponi and Jia (2021). An arbitrageur enters the market and
conducts trades to adjust the AMM’s exchange rate back to $p$, thereby
restoring the liquidity pool’s reserves to their original levels.

All agents are risk-neutral and valuate their holdings after period 5 with no
discount factor. We assume that all exogenous parameters ($\alpha$, $\xi$,
$\xi_{U}$, $f$, and $\pi$) are common knowledge. Figure 1 depicts the timeline
of events in the sequential game.

$\displaystyle t=1$ passive LPs deposit informed trader arrives uninformed
trader arrives JIT LP deposits JIT LP
deposits
JIT LP
withdraws swap JIT LP deposits price shock reverse trade $\displaystyle
t=2$$\displaystyle t=3$$\displaystyle t=4$$\displaystyle t=5$ to public
mempool

Figure 1: Timeline of the sequential game.

###  2.3 Strategies and Utilities

#### Strategy Space.

Depending on the realization of price shocks, one of the following four
scenarios occurs:

  * •

Informed Sell: This happens if a price shock results in
$p^{\prime}=\xi^{-1}p$. The informed trader chooses to sell risky coins for
stable coins, reacting to the decrease in the risky coin’s price.

  * •

Informed Buy: This scenario unfolds when a price shock leads to
$p^{\prime}=\xi p$. Here, the informed trader purchases risky coins with
stable coins, due to the appreciation in the risky coin’s price.

  * •

Uninformed Sell: This occurs in the absence of a price shock, and with
$p_{U}=\xi_{U}^{-1}p$. The uninformed trader sells risky coins for stable
coins, as his private valuation for risky coins is low.

  * •

Uninformed Buy: This takes place when there is no price shock and with
$p_{U}=\xi_{U}p$. The uninformed trader buys risky coins using stable coins,
as his private valuation for risky coins is high.

Both types of traders and the JIT LP can distinguish between these scenarios,
but the passive LPs cannot. Define the set of scenarios as
$\Omega=\\{IS,IB,US,UB\\}$, representing informed sell, informed buy,
uninformed sell, and uninformed buy, respectively. The strategy spaces for the
passive LPs, JIT LPs, and traders are

$\displaystyle D_{P}^{(i)}\in[0,{e}_{P}/N]\ \forall\ i\in[N],$ $\displaystyle
D_{J}:[0,{e}_{P}]\times([0,{e}_{P}]\times\Omega\to\mathbb{R}_{+}^{2}\backslash\mathbb{R}_{++}^{2})\times\Omega\to\mathbb{R}_{+}$
$\displaystyle(d_{R},d_{S}):[0,{e}_{P}]\times\Omega\to\mathbb{R}_{+}^{2}\backslash\mathbb{R}_{++}^{2}.$

A strategy profile for this game is given by the tuple:

$\displaystyle\sigma\equiv(\sigma_{P},\sigma_{T},\sigma_{J})\equiv(\\{D_{P}^{(i)}\\}_{i\in[N]},\\{(d_{R},d_{S})(D_{P},\omega)\\}_{\omega\in\Omega},\\{D_{J}(D_{P},(d_{R},d_{S})(D_{P},\omega);\omega)\\}_{\omega\in\Omega}).$

Here, $(d_{R},d_{S})(D_{P},\omega)$ for $\omega\in\\{IS,IB\\}$ refers to the
informed trader’s strategy, and for $\omega\in\\{US,UB\\}$, it refers to the
uninformed trader’s strategy.

#### Utilities.

The JIT LP’s utility is given by:

$\displaystyle u_{J}(D_{J};\sigma_{-J},\omega)=\text{JIT LP's
Share}\times(\text{Pool Value After Swap}+\text{Fees})-\text{Deposit Value}$

Both traders’ utility when choosing a swap order $(d_{R},d_{S})$ is given by

$\displaystyle u_{T}((d_{R},d_{S});\sigma_{-T},\omega)$
$\displaystyle=\pi\times\text{Value Received with JIT Liquidity}$
$\displaystyle\hskip 28.45274pt+(1-\pi)\times\text{Value Received w/o JIT
Liquidity}-\text{Value Sent}-\text{Fees}$

The passive LPs’ total utility is given by

$\displaystyle u_{P}(D_{P};\sigma_{-P},\omega)$
$\displaystyle=\pi\times\text{passive LPs' Share}\times(\text{Pool Value After
Swap with JIT Liquidity}+\text{Fees})$ $\displaystyle\hskip
28.45274pt(1-\pi)\times(\text{Pool Value After Swap w/o JIT
Liquidity}+\text{Fees})-\text{Deposit Value}$

######  Assumption 2.1.

We assume the following tie-breaking criteria:

  * •

If two invariant levels yield the same utility for a liquidity provider, then
an passive LP prefers the larger invariant level and the JIT LP prefers the
smaller invariant level.

  * •

If two swap quantities yield the same utility, then a trader prefers the
smaller swap quantity.

Our solution concept for this game is a pure-strategy subgame-perfect Nash
equilibrium.

##  3 Equilibrium

The search for the subgame-perfect Nash equilibrium is conducted through
backward induction. Initially, we fix the deposits of passive LPs and then
determine the Nash equilibrium in the subgame involving either the informed or
uninformed trader and the JIT LP. We address each scenario separately.
Following this, we determine the optimal response of passive LPs given the
equilibrium strategies of traders and the JIT LP in their subgame.

######  Theorem 3.1.

A unique Nash equilibrium in the trader–JIT LP subgame exists if and only if
$\xi_{U}>2(1+f)(2+f)^{-1}$. This equilibrium is characterized by the following
properties:

  1. 1.

The trade size of uninformed traders is larger than that of informed traders.

  2. 2.

The JIT LP provides liquidity exclusively in response to uninformed traders’
arrival. The supplied liquidity is a fixed multiple of the total passive
liquidity:

$D_{J}^{\star}(D_{P},(d_{R},d_{S})^{\star}(\tilde{q}_{P};\omega);\omega)=\nu
D_{P},\omega\in\\{US,UB\\},$

where $\mu_{1}$ is a constant that increases with $\xi_{U}$ and

$\displaystyle\nu=\frac{f(1+\mu_{1})+\mu_{1}\sqrt{(1+f)(1+\mu_{1})}}{\mu_{1}-f}.$

The JIT LP’s decision to deposit or not is contingent on the type of trader
they face. Facing informed traders, who trade optimally based on their
knowledge of future prices, the JIT LP refrains from depositing, avoiding
adverse selection. Conversely, when an uninformed trader arrives, the JIT LP
is incentivized to deposit to earn fees and capitalize on the price impact of
the swap. Consequently, the informed trader, aware of the JIT LP’s non-deposit
in their presence, bases their swap quantity on the existing liquidity
provided by passive LPs. Uninformed traders, expecting a deeper pool due to
the JIT LP’s potential deposit, trade larger amounts.

In equilibrium, the optimal quantity of liquidity provided by the JIT LP is
not arbitrarily large, but rather a fixed multiple of the existing passive
liquidity. This is due to a critical balance the JIT LP must strike between
two competing factors. On one hand, there is the marginal benefit of acquiring
a larger share of the pool’s fees by increasing their deposit. On the other
hand, there is a marginal loss to consider, stemming from a lower price impact
caused by a deeper liquidity pool. If the JIT LP were to deposit an
excessively large amount, the resultant depth of the liquidity pool would
significantly diminish the price impact of traders’ swaps. This reduction in
price impact, in turn, would lead to a decrease in the gains the JIT LP could
expect from the price movements generated by these trades.

We now turn our attention to characterizing the strategy of passive Liquidity
Providers (LPs). The expected utility for a passive LP $i$, denoted as
$u_{P}(D^{(i)}_{P})$, is formulated as follows:

$\displaystyle u_{P}(D^{(i)}_{P})=\left[\alpha
C_{I}+(1-\alpha)\left((1-\pi)C_{U}^{(0)}+\pi\cdot
C_{U}^{(1)}\right)\right]pD^{(i)}_{P},$

where $C_{I}$ represents the adverse selection cost per unit of deposits
incurred due to trades with informed traders. The terms $C_{U}^{(0)}$ and
$C_{U}^{(1)}$ reflect the fee revenues from uninformed flow per unit of
deposits when the JIT liquidity provider is absent ($\pi=0$) and present
($\pi=1$), respectively. Consequently, $\alpha
C_{I}+(1-\alpha)\left((1-\pi)C_{U}^{(0)}+\pi\cdot C_{U}^{(1)}\right)$ is the
return from depositing.

It’s important to note that, unlike JIT liquidity providers, passive LPs do
not benefit from price impacts generated by uninformed traders’ flow. This is
because any price impacts resulting from trades with uninformed traders are
reversed by an arbitrageur, negating this potential source of revenue for
passive LPs.

######  Theorem 3.2.

Suppose that $\xi_{U}>2(1+f)^{2}(2+f)^{-1}$. Then, a unique subgame perfect
equilibrium exists. In this equilibrium, for each passive LP $i\in[N]$, the
optimal deposit amount, $D^{(i)\star}_{R}$, is given by:

$\displaystyle D^{(i)\star}_{P}=({e}_{P}/N)\cdot\mathbbm{1}\left\\{\alpha
C_{I}+(1-\alpha)\left((1-\pi)C_{U}^{(0)}+\pi\cdot C_{U}^{(1)}\right)\geq
0\right\\},$

where $C_{I}<0$, $C_{U}^{(0)}>0$, and $C_{U}^{(1)}>0$. The liquidity supplied
by the JIT LP upon an uninformed trader’s arrival is a fixed multiple of the
total passive liquidity:

$D_{J}^{\star}(D_{P},(d_{R},d_{S})^{\star}(\tilde{q}_{P};\omega);\omega)=\nu
D_{P}^{\star},\omega\in\\{US,UB\\}.$

If adverse selection costs outweigh expected fee revenues, passive LPs will
abstain from depositing. Notably, in this situation, $D_{J}^{\star}=\nu
D_{P}^{\star}=0$, so JIT LPs also refrain from depositing, and traders also do
not participate in the market. This scenario can result in a market breakdown
or liquidity freeze, where market liquidity vanishes and trading ceases.

One might wonder why traders do not engage in trading in the absence of
passive market liquidity, or why they don’t place market orders in
anticipation of JIT LPs filling them. The concern here is that JIT liquidity
might be minimal, leading to substantial price impacts for the traders. JIT
liquidity providers, who move after the traders, indeed have an incentive to
limit their supply to earn a large price impact in such cases. This
underscores the critical role of passive liquidity providers as a safety net
and an alternative for traders, protecting them from potential predatory
practices by JIT liquidity providers, analogous to the way High-Frequency
Trading (HFT) firms might prey on large orders, as discussed in Brunnermeier
and Pedersen (2005).

###  3.1 Crowding Out Effects

A crowding-out effect emerges when the return on deposited liquidity for
passive Liquidity Providers (LPs) decreases in the presence of a Just-in-Time
(JIT) LP, specifically when $C_{U}^{(0)}>C_{U}^{(1)}$. This situation
indicates a reduced benefit for passive LPs to deposit liquidity when a JIT LP
is active in the market.

This crowding-out effect becomes particularly significant under the following
conditions: when $\alpha C_{I}+(1-\alpha)C_{U}^{(0)}\geq 0$ and $\alpha
C_{I}+(1-\alpha)C_{U}^{(1)}<0$. In such scenarios, the arrival of a JIT LP can
lead to a liqudity freeze, an outcome that would not occur in the absence of
the JIT LP.

When there is no adverse selection (i.e., $\alpha=0$), the passive LPs’ total
utility is always positive. Conversely, when all order flows are informed
(i.e., $\alpha=1$), the utility becomes negative. This indicates that for
values of $\alpha$ within the range
$[\underline{\alpha},\overline{\alpha}]\subset[0,1]$, a JIT LP-induced
liquidity freeze will happen.

We now formalize this notion of crowding out and establish the conditions for
its occurrence.

######  Definition.

Given a unique subgame-perfect Nash equilibrium $\sigma^{\star}$, the JIT LP

  * •

crowds out the passive LPs under $\sigma^{\star}$ if
$C_{U}^{(0)}>C_{U}^{(1)}$;

  * •

complements the passive LPs under $\sigma^{\star}$ if $C_{U}^{(0)}\leq
C_{U}^{(1)}$.

######  Theorem 3.3.

Assuming the existence of a unique subgame-perfect Nash equilibrium
$\sigma^{\star}$, the JIT LPs complement the passive LPs under
$\sigma^{\star}$ if and only if $\sqrt{\xi_{U}}\geq\sqrt{f}+\sqrt{1+f}$.

Figure 2: $\sqrt{\xi_{U}}=\sqrt{f}+\sqrt{1+f}$ is a threshold for crowding-out
and complementing equilibria. Here $f=0.03$ (chosen to illustrate the
threshold the best) resulting in a $\xi_{U}$ threshold of $\approx 1.4116$.

Considering that the marginal benefit for uninformed traders in acquiring
additional liquidity is determined by $\xi_{U}$, their propensity to trade
(i.e., the elasticity of trade size to aggregate liquidity) is positively
correlated with $\xi_{U}$. Theorem 3.3, as depicted in Figure 2, indicates
that strategic complementarity occurs when this elasticity is sufficiently
high ($\sqrt{\xi_{U}}>\sqrt{f}+\sqrt{1+f}$); otherwise, the relationship
shifts to strategic substitution.

To understand the dynamics described in Theorem 3.3, consider how the
coefficients $C_{U}^{(0)}$ and $C_{U}^{(1)}$ are influenced by trading volumes
and liquidity levels:

$\displaystyle C_{U}^{(0)}\propto\text{Uninformed Trading Volume without JIT
LP},$ $\displaystyle C_{U}^{(1)}\propto\frac{\text{Passive
Liquidity}}{\text{Passive Liquidity + JIT Liquidity}}\times\text{Uninformed
Trading Volume with JIT LP}.$

Here, the return on passive LPs’ deposits is linked to their share of the
liquidity pool and the total uninformed trading volume attracted by the
Automated Market Maker (AMM). If the increase in uninformed trading volume is
proportionally less than the increase in liquidity provided by JIT LPs, the
returns on passive LPs’ deposits diminish. Conversely, if the increase in
uninformed trading volume outpaces the proportional increase in liquidity,
passive LPs’ returns will rise.

When uninformed traders’ demand for tokens is highly responsive to the depth
of the liquidity pool (high elasticity), active (JIT) and passive LPs become
strategic complements. In this scenario, active providers, while capturing a
significant portion of transaction fees, indirectly benefit passive providers
by boosting the overall trading volume. Their participation reduces
transaction costs and attracts more orders, supporting the involvement of
passive providers in Decentralized Exchanges (DEXs) and leading to increased
aggregate market liquidity.

Conversely, with low elasticity of uninformed order flow to pool depth, active
and passive providers turn into strategic substitutes. Here, active providers
accrue most transaction fees, but this does not translate into a proportional
increase in overall trading volume, failing to compensate for the reduced fee
share of passive providers. This imbalance may lead to reduced participation
of passive LPs in liquidity provision, adversely affecting the aggregate
market liquidity.

##  4 Uncertainty About Just-in-Time Liquidity

In this extension of our model, we introduce uncertainty into the Just-in-Time
(JIT) liquidity provision by allowing $\pi$, the probability of a JIT LP’s
arrival, to vary within the interval $[0,1]$. Previously, with
$\pi\in\\{0,1\\}$, the presence or absence of a JIT LP was certain for passive
LPs and traders. The introduction of intermediate values for $\pi$ thus adds a
layer of uncertainty regarding the JIT LP’s arrival. This uncertainty is
particularly intriguing when $\pi$ is set to values close to the extremes of
the interval, such as $\pi=\varepsilon$ or $\pi=1-\varepsilon$, where
$\varepsilon$ represents a small deviation from certainty. These correspond to
when agents are largely sure about whether a JIT LP will arrive or not, but
allow for small perturbation in the arrival probability.

The expected utility for a passive LP $i$, denoted as $u_{P}(D^{(i)}_{P})$, is
formulated as follows:

$\displaystyle u_{P}(D^{(i)}_{P})=\left[\alpha C_{I}+(1-\alpha)\cdot
C_{U}(\pi)\right]pD^{(i)}_{P},$

where $C_{I}$ represents the adverse selection cost per unit of deposits
incurred due to trades with informed traders. The terms $C_{U}(\pi)$ reflect
the expected revenues per unit of deposits from fees generated by uninformed
traders when the JIT liquidity provider is present with probability $\pi$. We
establish the existence of SPNE for this extension:

######  Theorem 4.1.

Define the threshold function $\underline{\xi}_{U}(\pi)$ as:

$\displaystyle\underline{\xi}_{U}(\pi)=2(1+f)^{3}[2+\pi f(3+f)]^{-1}.$

A subgame-perfect Nash equilibrium (SPNE) exists if and only if
$\xi_{U}>\underline{\xi}_{U}(\pi)$. When such an SPNE exists, it is unique.
The equilibrium is characterized by the following conditions:

  1. 1.

Passive LPs’ optimal deposit level, $D^{(i)\star}_{P}$, is determined as
$\frac{{e}_{P}}{N}\cdot\mathbbm{1}\\{\alpha C_{I}+(1-\alpha)\cdot
C_{U}(\pi)\geq 0\\}$.

  2. 2.

Uninformed traders trade in higher quantities compared to informed traders,
with the volume of uninformed trading increasing as $\pi$ increases. In
contrast, the trading volume of informed traders remains unchanged with
respect to $\pi$.

  3. 3.

JIT liquidity providers contribute liquidity proportional to the total passive
liquidity in scenarios where uninformed traders arrive. Specifically,
$D_{J}^{\star}=\nu(\pi)\cdot\sum_{i}D^{(i)\star}_{P}$ for
$\omega\in\\{US,UB\\}$.

To assess the impact of JIT liquidity providers (JIT LPs) on passive LPs for
varying probabilities of JIT LP arrival, $\pi\in[0,1]$, we introduce a
localized notion of crowding out and complementation. This approach allows us
to understand the marginal effects of JIT LP presence on passive LPs across
different probabilities of JIT arrival.

######  Definition.

Given a unique subgame-perfect Nash equilibrium $\sigma^{\star}(\pi)$ at a
given $\pi$, assuming it exists for all $\pi\in[0,1]$, the JIT LP:

  * •

marginally crowds out the passive LPs under $\sigma^{\star}(\pi)$ if the
derivative of the utility coefficient with respect to $\pi$,
$C_{U}^{\prime}(\pi)$, is negative.

  * •

marginally complements the passive LPs under $\sigma^{\star}(\pi)$ if
$C_{U}^{\prime}(\pi)$ is non-negative.

Marginal crowding out occurs when a small increase in the probability of JIT
LP arrival, denoted as $d\pi$, leads to a reduction in the total payoff per
unit of invariant level for passive LPs. Conversely, marginal complementation
happens when this small increase results in an increase in the passive LPs’
total payoff.

######  Theorem 4.2.

Assuming the existence of a unique subgame-perfect Nash equilibrium
$\sigma^{\star}$, the following conditions characterize the marginal effects
of JIT LPs on passive LPs as $\pi$ varies:

  * •

When $\pi$ is large (as it approaches 1 from the left), JIT LPs marginally
crowd out passive LPs under $\sigma^{\star}(\pi)$.

  * •

There exists a critical threshold $\bar{\xi}_{U}<(\sqrt{f}+\sqrt{1+f})^{2}$.
If $\xi_{U}\geq\bar{\xi}_{U}$, then JIT LPs marginally complement passive LPs
under $\sigma^{\star}(\pi)$ in a neighborhood immediately to the right of
$\pi=0$. Conversely, if $\xi_{U}<\bar{\xi}_{U}$, JIT LPs marginally crowd out
passive LPs under $\sigma^{\star}(\pi)$ in the same neighborhood.

The first point of Theorem 4.2 indicates that crowding out is inevitable when
the JIT LP’s probability of presence is sufficiently high. In such scenarios,
the additional benefit gained from a marginal increase in JIT LP arrival
probability is outweighed by the corresponding rise in expected JIT liquidity.
As the likelihood of JIT liquidity provision becomes increasingly certain, JIT
LPs are more likely to capture a larger share of the fees generated by
uninformed traders, diminishing the portion available to passive LPs.
Therefore, the optimal value of $\pi$ for passive LPs is always less than 1,
as crowding out already happens before $\pi$ reaches 1.

The second point of the theorem addresses situations where JIT liquidity is
relatively unlikely. Here, if the demand for coins by uninformed traders is
sufficiently elastic, then a marginal increase in JIT liquidity can be
complementary to passive LPs. In these cases, the presence of JIT LPs can
attract additional trading flow, enhancing the fee revenue captured by passive
LPs for a large majority of the time (with probability $1-\pi$). Figure 4
depicts these points.

Figure 3: $C_{U}(\pi)$ in neighborhoods of 0 and 1. Here $f=0.003$ and
$\xi_{U}=1.12$; we have marginal complementing in a right-neighborhood of
$\pi$ around $0$.

##  5 A Two-Tiered Fee Structure

To address the challenges posed by Just-in-Time (JIT) Liquidity crowding out
passive LPs, we propose implementing a two-tiered fee structure. This
structure aims to ensure that passive LPs stay while JIT LPs still supply
liquidity, improving aggregate liquidity and gains from trades.

In this two-tiered system, JIT LPs are allocated a portion of the transaction
fees based on a parameter $\lambda\in[0,1]$. Specifically, JIT LPs retain a
$\lambda$ fraction of their pro-rata share of the fees, while the remaining
$(1-\lambda)$ fraction is allocated to passive LPs. The value of $\lambda$
thus directly influences the fee distribution: a lower $\lambda$ results in a
greater share of fees being transferred to passive LPs. When $\lambda=1$, the
fee structure reverts to that of our baseline model, where JIT LPs retain
their entire pro-rata share of fees.

Under the proposed two-tiered fee structure, the expected utility for a
passive Liquidity Provider (LP) $i$, denoted as $u_{P}(D^{(i)}_{P})$, is
modified to account for the new distribution of fees. It is now expressed as:

$\displaystyle u_{P}(D^{(i)}_{P})=\left[\alpha C_{I}+(1-\alpha)\cdot
C_{U}(\pi,\lambda)\right]pD^{(i)}_{P},$

where $C_{I}$ remains the adverse selection cost per unit of deposits, a cost
that arises from trades with informed traders. The term $C_{U}(\pi,\lambda)$
now reflects the expected revenue per unit of deposits from fees generated by
uninformed traders. Additionally, it includes the share of fees $(1-\lambda)$
transferred from JIT LPs to passive LPs when the JIT liquidity provider’s
presence is given by the probability $\pi$.

######  Theorem 5.1.

Under the two-tiered fee structure, the threshold for the existence of a
subgame-perfect Nash equilibrium (SPNE) in the sequential game is defined by
the function $\underline{\xi}_{U}(\pi,\lambda)$, calculated as:

$\displaystyle\underline{\xi}_{U}(\pi,\lambda)=\frac{2(1+f)^{3}}{2+\pi[(2+f)\sqrt{(1+f)(1+\lambda
f)}-2]}.$

A subgame-perfect Nash equilibrium exists if and only if the private valuation
shock $\xi_{U}$ exceeds this threshold, i.e.,
$\xi_{U}>\underline{\xi}_{U}(\pi,\lambda)$. Furthermore, when this condition
is met, the SPNE is unique.

###  5.1 Preventing Freezes & Maximizing Welfare

The following theorem addresses how altering the fee distribution between
Just-in-Time (JIT) Liquidity Providers and passive LPs impacts the market
equilibrium and potentially prevents liquidity freezes:

######  Theorem 5.2.

Given a unique subgame-perfect Nash equilibrium $\sigma^{\star}(\pi,\lambda)$
for all $\pi,\lambda\in[0,1]$, it is observed that for any fixed
$\pi\in[0,1]$, transferring a greater proportion of fees ($\lambda$ decreases)
from JIT LPs to passive LPs:

  * •

Reduces the equilibrium deposits of JIT LPs relative to passive LPs’ deposits.
This translates to a decreased propensity for JIT LPs to deposit and
consequently, a reduction in uninformed traders’ equilibrium trading volume
per unit of passive liquidity deposits.

  * •

Increases the overall utility of passive LPs, implying that
$C_{U}(\pi,\lambda)$ decreases as $\lambda$ increases.

When $\lambda$ is reduced, JIT LPs face diminished incentives to provide
liquidity due to a smaller share of fees. This results in a decreased size of
the liquidity pool. Anticipating less JIT liquidity, uninformed traders expect
a shallower pool and therefore engage in less aggressive swapping, due to the
larger price impact and trading costs. For passive LPs, a lower $\lambda$
increases their attractiveness to remain in the pool as they now secure a
higher share of fees from JIT LPs’ activities.

To mitigate the risk of market breakdown and optimize the overall liquidity
and welfare in the market, a key strategy involves selecting the appropriate
level of $\lambda$. The objective is to balance the incentives: ensuring that
passive LPs are sufficiently motivated to participate in the liquidity pool,
while also ensuring that JIT LPs are not excessively burdened by fee
transfers, thus maintaining their incentive to provide liquidity.

The optimal choice of $\lambda$, as characterized by the following results, is
pivotal in enhancing overall market welfare. Welfare is defined as the
collective utility of all agents involved, including passive LPs, JIT LPs,
traders, and arbitrageurs. While it might initially appear that the
redistribution of coins within this closed system of agents leads to zero net
welfare, this is not the case. The uninformed trader’s private valuation of
the risky coin introduces positive welfare through gains from trade, as they
derive value from holding certain assets.

######  Theorem 5.3.

Assuming the existence of a unique subgame-perfect Nash equilibrium
$\sigma^{\star}(\pi,\lambda)$ for all $\pi,\lambda\in[0,1]$, the impact of
varying $\lambda$ on overall market welfare can be characterized as follows
for any fixed $\pi\in[0,1]$:

  * •

When the condition $C_{U}(\pi,\lambda)\geq 0$ holds for all $\lambda\in[0,1]$,
welfare increases as $\lambda$ increases. This implies that allowing the JIT
LP to retain a larger proportion of fees enhances gains from trade conditional
passive LPs not dropping out.

  * •

If there exists a critical value $\bar{\lambda}\in[0,1]$ such that
$C_{U}(\pi,\lambda)\geq 0$ for all $\lambda\leq\bar{\lambda}$ and
$C_{U}(\pi,\lambda)<0$ for all $\lambda>\bar{\lambda}$, then welfare increases
with $\lambda$ within the interval $[0,\bar{\lambda}]$. Beyond
$\bar{\lambda}$, where passive LPs start dropping out, welfare becomes zero,
indicating a market breakdown.

  * •

If $C_{U}(\pi,\lambda)<0$ for all $\lambda\in[0,1]$, then welfare remains zero
across the entire range of $\lambda$, reflecting a consistent absence of
passive LPs and a consequent market breakdown.

This optimal point is characterized by a fee transfer rate that is high enough
to incentivize passive Liquidity Providers (LPs) to remain in the liquidity
pool, yet not so high as to dissuade Just-in-Time (JIT) liquidity providers
from rationing their liquidity.

Figure 4: Passive LP-optimal and welfare-optimal choices of $\lambda$.

###  5.2 Practical Implementation of the Two-Tiered Fee Structure

This section outlines the practical implementation of a two-tiered fee
structure in DEXs like Uniswap, with a focus on Uniswap V3’s unique approach
using non-fungible tokens (NFTs) to represent individual liquidity positions.

In Uniswap V3, LPs receive an NFT upon depositing liquidity. This NFT contains
detailed information about the LP’s position, including the specified price
range and the amount of liquidity provided. The AMM smart contract tracks the
fees owed to each LP’s account, represented by these NFTs. Fee calculations
consider the trade size, each LP’s relative share of the pool within each
price tick, and the pool’s fee specifications. Fees generated from trades are
added directly to the pool. When LPs burn their pool tokens to redeem their
deposits, the corresponding fees, as tracked by the so-called global fee
variable in the AMM smart contract, are distributed to them. The method for
calculating fees and the global fee variable are consistent across all LPs and
are not influenced by the duration of liquidity provision. To adopt a two-
tiered fee structure, we propose the following implementation steps:

  * •

Commitment Duration Specification: Upon depositing liquidity, LPs must specify
a commitment duration level, $\phi\in\\{0,1\\}$. Here, $\phi=1$ signifies a
commitment to provide liquidity for at least one block, defining them as long-
term LPs. Conversely, $\phi=0$ indicates no such commitment, classifying them
as short-term LPs.

  * •

Enforcement of Commitment: LPs are allowed to burn their tokens and access the
withdrawal function only if their deposit duration exceeds their specified
$\phi$. This mechanism enforces the commitment made at the time of deposit.

  * •

Differentiated Fee Variables: The smart contract will establish a parameter
$\lambda$ and maintain two separate global fee variables—one for long-term LPs
and another for short-term LPs.

  * •

Fee Distribution during Trades: When a trade occurs, the smart contract first
accesses the global fee variable for short-term LPs. A portion of the total
fees from the trade is allocated to these short-term LPs, calculated as before
but accruing only $\lambda$ of the total computed value to their accounts.
Subsequently, the remaining fees are allocated to long-term LPs, accruing the
fees to their accounts. Essentially, $(1-\lambda)$ of the total fees, which
were previously allocated to short-term LPs, are now redirected to benefit
long-term liquidity providers.

## References

  * Aoyagi and Ito (2021) Aoyagi, J., and Y. Ito. 2021.  Coexisting Exchange Platforms: Limit Order Books and Automated Market Makers.  Working paper.
  * Barbon and Ranaldo (2021) Barbon, A., and A. Ranaldo. 2021.  On the Quality of Cryptocurrency Markets: Centralized Versus Decentralized Exchanges.  Working paper.
  * BIS (2023) BIS. 2023.  Project Mariana: cross-border exchange of wholesale CBDCs using automated market-makers.
  * Brunnermeier and Pedersen (2005) Brunnermeier, M. K., and L. H. Pedersen. 2005.  Predatory Trading.  _The Journal of Finance_ 60(4):1825–63.  doi:https://doi.org/10.1111/j.1540-6261.2005.00781.x.
  * Capponi and Jia (2021) Capponi, A., and R. Jia. 2021.  The Adoption of Blockchain-based Decentralized Exchanges.  SSRN Scholarly Paper 3805095.  doi:10.2139/ssrn.3805095.
  * Capponi, Jia, and Wang (2023) Capponi, A., R. Jia, and Y. Wang. 2023.  Maximal Extractable Value and Allocative Inefficiencies in Public Blockchains.  Working paper.
  * CoinGecko (2023) CoinGecko. 2023.  2023 Q3 Crypto Industry Report.
  * Han, Khapko, and Kyle (2014) Han, J., M. Khapko, and A. S. Kyle. 2014.  Liquidity with High-Frequency Market Making.  SSRN Scholarly Paper 2416396.  doi:10.2139/ssrn.2416396.
  * Hasbrouck, Rivera, and Saleh (2022) Hasbrouck, J., T. J. Rivera, and F. Saleh. 2022.  The Need for Fees at a DEX: How Increases in Fees Can Increase DEX Trading Volume.  SSRN Scholarly Paper 4192925.  doi:10.2139/ssrn.4192925.
  * Hasbrouck, Rivera, and Saleh (2023) ———. 2023.  An Economic Model of a Decentralized Exchange with Concentrated Liquidity.  SSRN Scholarly Paper 4529513.  doi:10.2139/ssrn.4529513.
  * Lehar and Parlour (2023) Lehar, A., and C. Parlour. 2023.  Decentralized Exchange: The Uniswap Automated Market Maker.  _Forthcoming in Journal of Finance_ .
  * Loesch et al. (2021) Loesch, S., N. Hindman, M. B. Richardson, and N. Welch. 2021.  Impermanent Loss in Uniswap v3.  arXiv.
  * Malinova and Park (2023) Malinova, K., and A. Park. 2023.  Learning from DeFi: Would Automated Market Makers Improve Equity Trading?  SSRN Scholarly Paper 4531670.  doi:10.2139/ssrn.4531670.
  * Menkveld (2015) Menkveld, A. 2015.  The Economics of High-Frequency Trading: Taking Stock.  _Annual Review of Financial Economics_ 8(1):1–24.
  * Milionis et al. (2022) Milionis, J., C. C. Moallemi, T. Roughgarden, and A. L. Zhang. 2022.  Automated Market Making and Loss-Versus-Rebalancing.  Working paper.
  * Park (2023) Park, A. 2023.  The Conceptual Flaws of Decentralized Automated Market Making.  _Management Science_ 69(11):6731–51.
  * Wan and Adams (2022) Wan, X., and A. Adams. 2022.  Just-in-Time Liquidity on the Uniswap Protocol.  White paper.
  * Xiong et al. (2023) Xiong, X., Z. Wang, W. Knottenbelt, and M. Huth. 2023.  Demystifying Just-in-Time (JIT) Liquidity Attacks on Uniswap V3.  _Cryptology ePrint Archive_ 2023/973.

##  Appendix A Proofs

###  A.1 Change of Variables.

We define the following variables for calculation convenience.

######  Definition.

The price-adjusted invariant levels are defined as follows:

  1. 1.

Price-adjusted invariant level for passive LPs:
$\tilde{q}_{P}^{(i)}=D^{(i)}_{P}/(p-p^{1/2}a^{1/2}),\tilde{q}_{P}^{(i)},\in[0,\tilde{e}_{P}/N]$,
$\tilde{e}_{P}=(1-p^{1/2}b^{-1/2})^{-1}e_{P}$)

  2. 2.

Aggregate invariant level for passive LPs:
$\tilde{q}_{P}=\sum_{i\in[N]}\tilde{q}_{P}^{(i)}$

  3. 3.

Price-adjusted invariant level for JIT LPs:
$\tilde{q}_{J}=D_{J}/(p-p^{1/2}a^{1/2})$

###  A.2 Proof of Theorems 3.1 and 3.2

It suffices to show the following results: Let
$\tilde{q}_{P}\in[0,\tilde{e}_{P}]$. There exists a Nash equilibrium for the
trader–JIT LP subgame if and only if $\xi_{U}>2(1+f)(2+f)^{-1}$; moreover, the
equilibrium is unique.

The equilibrium outcome is

$\displaystyle(d_{R},d_{S})^{\star}(\tilde{q}_{P};\omega)=\begin{dcases}(\mu_{I},\tilde{q}_{P},0)&\omega=IS\\\
(0,\mu_{I},p\tilde{q}_{P})&\omega=IB\\\
((1-\pi)\mu_{0}\tilde{q}_{P}+\pi\mu_{1}\tilde{q}_{P},0)&\omega=US\\\
(0,(1-\pi)\mu_{0}p\tilde{q}_{P}+\pi\mu_{1}p\tilde{q}_{P})&\omega=UB\end{dcases}$
$\displaystyle\tilde{q}_{J}^{\star}(\tilde{q}_{P},(d_{R},d_{S})^{\star}(\tilde{q}_{P};\omega);\omega)=\begin{dcases}0&\omega\in\\{IS,IB\\}\\\
\nu\tilde{q}_{P}&\omega\in\\{US,UB\\}\end{dcases}$

where $\mu_{I}$ is a constant increasing in $\xi$, $\mu_{0}$ and $\mu_{1}$ are
constants increasing in $\xi_{U}$ with $\mu_{0}<\mu_{1}$, and

$\displaystyle\nu=\frac{f(1+\mu_{1})+\mu_{1}\sqrt{(1+f)(1+\mu_{1})}}{\mu_{1}-f}$

For each $i\in[N]$, passive LP $i$’s best-response when the remaining agents
play the subgame’s Nash equilibrium is

$\displaystyle\tilde{q}_{P}^{(i)\star}=(\tilde{e}_{P}/N)\cdot\mathbbm{1}\left\\{\alpha
C_{I}+(1-\alpha)\left((1-\pi)C_{U}^{(0)}+\pi\cdot C_{U}^{(1)}\right)\geq
0\right\\}$

where $C_{I}<0$, $C_{U}^{(0)}>0$, and $C_{U}^{(1)}>0$. The explicit forms of
these constants are

$\displaystyle
C_{I}=\frac{2\xi^{1/2}(1+f)^{-1/2}}{\xi+1}f+2\left(\frac{\xi^{1/2}(1+f)^{-1/2}+\xi^{1/2}(1+f)^{1/2}}{\xi+1}-1\right)$
$\displaystyle C_{U}^{(0)}=\left(\mu_{0}+\frac{\mu_{0}}{1+\mu_{0}}\right)f$
$\displaystyle
C_{U}^{(1)}=\frac{1}{1+\nu}\left(\mu_{1}+\frac{(1+\nu)\mu_{1}}{1+\nu+\mu_{1}}\right)f$

######  Lemma A.1.

Let
$(d_{R},d_{S}):[0,\tilde{e}_{P}]\times\Omega\to\mathbb{R}_{+}^{2}\backslash\mathbb{R}_{++}^{2}$
be a trader’s strategy. If $(0,1)^{\top}(d_{R},d_{S})(\tilde{q}_{P};IS)>0$ for
some $\tilde{q}_{P}\in[0,\tilde{e}_{P}]$, then for any JIT LP’s strategy
$\tilde{q}_{J}:[0,\tilde{e}_{P}]\times([0,\tilde{e}_{P}]\times\Omega\to\mathbb{R}_{+}^{2}\backslash\mathbb{R}_{++}^{2})\times\Omega\to\mathbb{R}_{+}$,
the strategy profile $((d_{R},d_{S}),\tilde{q}_{J})$ is not a Nash equilibrium
in the trader–JIT LP subgame when $\omega=IS$.

###### Proof.

Note that $p^{\prime}=\xi^{-1}p$ when $\omega=IS$. If the trader swaps stable
coins, then their utility function is

$\displaystyle u_{T}((0,d_{S});\sigma_{-T},IS)$
$\displaystyle=(1-\pi)(\xi^{-1}p\cdot\delta_{R}(d_{S},\tilde{q}_{P})-(1+f)d_{S})$
$\displaystyle\hskip
28.45274pt+\pi(\xi^{-1}p\cdot\delta_{R}(d_{S},\tilde{q}_{P}+\tilde{q}_{J}(\tilde{q}_{P},(0,d_{S});IS))-(1+f)d_{S})$

When $\pi=0$, the trader’s marginal utility is

$\displaystyle\frac{\partial u_{T}}{\partial d_{S}}$
$\displaystyle=\xi^{-1}p\cdot\frac{\partial\delta_{R}}{\partial
d_{S}}(d_{S},\tilde{q}_{P})-(1+f)$
$\displaystyle=\xi^{-1}p\cdot\left.\frac{F_{s}}{F_{r}}\right|_{(\tilde{q}_{P}(1-p^{1/2}b^{-1/2})-\delta_{R}(d_{S},\tilde{q}_{P}),\tilde{q}_{P}(p-p^{1/2}a^{1/2})+d_{S})}-(1+f)<\xi^{-1}p\cdot\frac{1}{p}-(1+f)<0$

since swapping stable coins for risky coins moves the stable-to-risky spot
exchange rate lower than $1/p$. When $\pi=1$, a similar argument shows that
the trader’s marginal utility is negative as well. Since there exists some
$\tilde{q}_{P}\in[0,\tilde{e}_{P}]$ such that
$(0,1)^{\top}(d_{R},d_{S})(\tilde{q}_{P};IS)>0$ and the trader’s marginal
utility is always negative, $(d_{R},d_{S})=(0,0)$ is a profitable deviation. ∎

######  Proposition A.2.

Let $\tilde{q}_{P}\in[0,\tilde{e}_{P}]$. Then the unique non-trivial Nash
equilibrium of the trader–JIT LP subgame when $\omega=IS$ is given by

$\displaystyle(d_{R},d_{S})^{\star}(\tilde{q}_{P};IS)=(\xi^{1/2}(1+f)^{-1/2}\tilde{q}_{P},0)$
$\displaystyle\tilde{q}_{J}^{\star}(\tilde{q}_{P},(d_{R},d_{S});IS)=0$

###### Proof.

By Lemma A.1, the trader swaps risky coins on an equilibrium path when
$\omega=IS$, so

$\displaystyle
u_{J}(\tilde{q}_{J};\sigma_{-J},IS)=\frac{\tilde{q}_{J}}{\tilde{q}_{P}+\tilde{q}_{J}}(\xi^{-1}p(1+f)\cdot
d_{R}(\tilde{q}_{P};IS)-\delta_{S}(d_{R}(\tilde{q}_{P};IS),\tilde{q}_{P}+\tilde{q}_{J}))$

When $\pi=1$, note that

$\displaystyle\xi^{-1}p(1+f)\cdot
d_{R}(\tilde{q}_{P};IS)-\delta_{S}(d_{R}(\tilde{q}_{P};IS),\tilde{q}_{P}+\tilde{q}_{J})=-u_{T}((d_{R},0);\sigma_{-T},IS)<0$

on an equilibrium path since if otherwise, i.e.
$u_{T}((d_{R},0);\sigma_{-T},IS)\leq 0$, then by Assumption 2.1, the trader
has a profitable deviation to $(0,0)$. Thus $0$ is the JIT LP’s unique best-
response to any trader’s strategy on an equilibrium path. The informed
trader’s utility function is

$\displaystyle u_{T}((d_{R},0);\sigma_{-T},IS)$
$\displaystyle=(1-\pi)(\delta_{S}(d_{R},\tilde{q}_{P})-\xi^{-1}p(1+f)d_{R})$
$\displaystyle\hskip
28.45274pt+\pi(\delta_{S}(d_{R},\tilde{q}_{P}+\tilde{q}_{J}(\tilde{\tilde{q}_{P}},(d_{R},0);IS))-\xi^{-1}p(1+f)d_{R})$

Since $\tilde{q}_{J}(\tilde{q}_{P},(d_{R},0);IS)=0$, this simplifies to

$\displaystyle
u_{T}((d_{R},0);\sigma_{-T},IS)=\delta_{S}(d_{R},\tilde{q}_{P})-\xi^{-1}p(1+f)d_{R}$

Note that $u_{T}$ is concave in $d_{R}$. The first-order condition is

$\displaystyle\frac{\partial u_{T}}{\partial
d_{R}}=\frac{\partial\delta_{S}}{\partial
d_{R}}(d_{R},\tilde{q}_{P})-\xi^{-1}p(1+f)=0$

The result follows by solving for $d_{R}$. ∎

######  Lemma A.3.

Let
$(d_{R},d_{S}):[0,\tilde{e}_{P}]\times\Omega\to\mathbb{R}_{+}^{2}\backslash\mathbb{R}_{++}^{2}$
be a trader’s strategy. If $(1,0)^{\top}(d_{R},d_{S})(\tilde{q}_{P};IB)>0$ for
some $\tilde{q}_{P}\in[0,\tilde{e}_{P}]$, then for any JIT LP’s strategy
$\tilde{q}_{J}:[0,\tilde{e}_{P}]\times([0,\tilde{e}_{P}]\times\Omega\to\mathbb{R}_{+}^{2}\backslash\mathbb{R}_{++}^{2})\times\Omega\to\mathbb{R}_{+}$,
the strategy profile $((d_{R},d_{S}),\tilde{q}_{J})$ is not a Nash equilibrium
in the trader–JIT LP subgame when $\omega=IB$.

######  Proposition A.4.

Let $\tilde{q}_{P}\in[0,\tilde{e}_{P}]$. Then the unique non-trivial Nash
equilibrium of the trader–JIT LP subgame when $\omega=IB$ is given by

$\displaystyle(d_{R},d_{S})^{\star}(\tilde{q}_{P};IS)=(0,\xi^{1/2}(1+f)^{-1/2}p\tilde{q}_{P})$
$\displaystyle\tilde{q}_{J}^{\star}(\tilde{q}_{P},(d_{R},d_{S});IB)=0$

The proofs of results A.3 and A.4 are symmetric to those of results A.1 and
A.2.

######  Lemma A.5.

If $\tilde{q}_{J}^{\star}$ is a stationary point for the JIT LP’s utility
function given $\tilde{q}_{P}\in\mathbb{R}_{+}$ and
$(d_{R},d_{S})\in[0,\tilde{e}_{P}]$ $\times\
\Omega\to\bar{\mathbb{R}}^{2}_{+}\backslash\bar{\mathbb{R}}^{2}_{++}$ when
$\omega=US$, then $\tilde{q}_{J}^{\star}/c$ is a stationary point for the JIT
LP’s utility function given $\tilde{q}_{P}/c$ and $(d_{R},d_{S})/c$ when
$\omega=US$ for any $c>0$.

###### Proof.

When $\omega=US$,

$\displaystyle
u_{J}(\tilde{q}_{J};\sigma_{-J},US)=\frac{\tilde{q}_{J}}{\tilde{q}_{P}+\tilde{q}_{J}}(p(1+f)\cdot
d_{R}(\tilde{q}_{P};US)-\delta_{S}(d_{R}(\tilde{q}_{P};US),\tilde{q}_{P}+\tilde{q}_{J}))$

so the first-order condition is

$\displaystyle\frac{\partial u_{J}}{\partial\tilde{q}_{J}}$
$\displaystyle=\frac{\tilde{q}_{P}}{(\tilde{q}_{P}+\tilde{q}_{J})^{2}}(p(1+f)\cdot
d_{R}(\tilde{q}_{P};US)-\delta_{S}(d_{R}(\tilde{q}_{P};US),\tilde{q}_{P}+\tilde{q}_{J}))$
$\displaystyle\hskip
28.45274pt-\frac{\tilde{q}_{J}}{\tilde{q}_{P}+\tilde{q}_{J}}\cdot\frac{\partial\delta_{S}}{\partial
q}(d_{R}(\tilde{q}_{P};US),\tilde{q}_{P}+\tilde{q}_{J})=0$

By the 1-homogeneity of $\delta_{S}$ and 0-homogeneity of
$\partial\delta_{S}/\partial q$, we can express the first-order condition as

$\displaystyle\frac{\tilde{q}_{P}}{\tilde{q}_{P}+\tilde{q}_{J}}\left[p(1+f)\frac{d_{R}(\tilde{q}_{P};US)}{\tilde{q}_{P}+\tilde{q}_{J}}-\delta_{S}\left(\frac{d_{R}(\tilde{q}_{P};US)}{\tilde{q}_{P}+\tilde{q}_{J}},1\right)\right]-\frac{\tilde{q}_{J}}{\tilde{q}_{P}+\tilde{q}_{J}}\cdot\frac{\partial\delta_{S}}{\partial
q}\left(\frac{d_{R}(\tilde{q}_{P};US)}{\tilde{q}_{P}+\tilde{q}_{J}},1\right)=0$

Since $\tilde{q}_{J}^{\star}$ is a stationary point,

$\displaystyle\frac{\tilde{q}_{P}}{\tilde{q}_{P}+\tilde{q}_{J}^{\star}}\left[p(1+f)\frac{d_{R}(\tilde{q}_{P};US)}{\tilde{q}_{P}+\tilde{q}_{J}^{\star}}-\delta_{S}\left(\frac{d_{R}(\tilde{q}_{P};US)}{\tilde{q}_{P}+\tilde{q}_{J}^{\star}},1\right)\right]-\frac{\tilde{q}_{J}^{\star}}{\tilde{q}_{P}+\tilde{q}_{J}^{\star}}\cdot\frac{\partial\delta_{S}}{\partial
q}\left(\frac{d_{R}(\tilde{q}_{P};US)}{\tilde{q}_{P}+\tilde{q}_{J}^{\star}},1\right)=0$

By the 1-homogeneity of $\delta_{S}$ and 0-homogeneity of
$\partial\delta_{S}/\partial q$,

$\displaystyle\frac{\tilde{q}_{P}/c}{\tilde{q}_{P}/c+\tilde{q}_{J}^{\star}/c}$
$\displaystyle=\frac{\tilde{q}_{P}}{\tilde{q}_{P}+\tilde{q}_{J}^{\star}}$
$\displaystyle=\frac{\frac{\tilde{q}_{J}^{\star}}{\tilde{q}_{P}+\tilde{q}_{J}^{\star}}\cdot\frac{\partial\delta_{S}}{\partial
q}\left(\frac{d_{R}(\tilde{q}_{P};US)}{\tilde{q}_{P}+\tilde{q}_{J}^{\star}},1\right)}{p(1+f)\frac{d_{R}(\tilde{q}_{P};US)}{\tilde{q}_{P}+\tilde{q}_{J}^{\star}}-\delta_{S}\left(\frac{d_{R}(\tilde{q}_{P};US)}{\tilde{q}_{P}+\tilde{q}_{J}^{\star}},1\right)}=\frac{\frac{\tilde{q}_{J}^{\star}/c}{\tilde{q}_{P}/c+\tilde{q}_{J}^{\star}/c}\cdot\frac{\partial\delta_{S}}{\partial
q}\left(\frac{d_{R}(\tilde{q}_{P};US)/c}{\tilde{q}_{P}/c+\tilde{q}_{J}^{\star}/c},1\right)}{p(1+f)\frac{d_{R}(\tilde{q}_{P};US)/c}{\tilde{q}_{P}/c+\tilde{q}_{J}^{\star}/c}-\delta_{S}\left(\frac{d_{R}(\tilde{q}_{P};US)/c}{\tilde{q}_{P}/c+\tilde{q}_{J}^{\star}/c},1\right)}$

The result follows. ∎

######  Lemma A.6.

If the JIT LP’s utility function has a unique maximum for
$\tilde{q}_{J}\in\mathbb{R}_{+}$ and $d_{R}^{\star}$ solves the uninformed
trader’s problem given $\tilde{q}_{P}$ when $\pi=1$ and $\omega=US$, then
$d_{R}^{\star}/c$ solves the trader’s problem given $\tilde{q}_{P}/c$ when
$\pi=1$ and $\omega=US$ for any $c>0$.

###### Proof.

The trader’s problem given $\tilde{q}_{P}$ is

$\displaystyle\max_{d_{R}\in\mathbb{R}_{+}}\ $
$\displaystyle\delta_{S}(d_{R},\tilde{q}_{P}+\tilde{q}_{J}(\tilde{q}_{P},(d_{R},0);US))-\xi_{U}^{-1}p(1+f)d_{R}$

and the trader’s problem given $\tilde{q}_{P}/c$ is

$\displaystyle\max_{d_{R}\in\mathbb{R}_{+}}\ $
$\displaystyle\delta_{S}(d_{R},\tilde{q}_{P}/c+\tilde{q}_{J}(\tilde{q}_{P}/c,(d_{R},0);US))-\xi_{U}^{-1}p(1+f)d_{R}$

We now do a change of variables with $\tilde{d}_{R}=d_{R}/c$. By Lemma A.5 and
the unique maximum assumption, this problem is equivalent to

$\displaystyle\max_{\tilde{d}_{R}\in\mathbb{R}_{+}}\
c\cdot\delta_{S}(\tilde{d}_{R},\tilde{q}_{P}+\tilde{q}_{J}(\tilde{q}_{P},(\tilde{d}_{R},0);US))-c\xi_{U}^{-1}p(1+f)\tilde{d}_{R}$

The objective is $c$ times the original objective, so the result follows. ∎

######  Lemma A.7.

Then JIT LP’s utility function given $\tilde{q}_{P}\in[0,\tilde{e}_{P}]$ and
$(d_{R},d_{S})\in[0,\tilde{e}_{P}]\times\Omega\to\bar{\mathbb{R}}^{2}_{+}\backslash\bar{\mathbb{R}}^{2}_{++}$
when $\omega=US$ has a unique maximum for $\tilde{q}_{J}\in\mathbb{R}_{+}$ if
and only if $d_{R}(\tilde{q}_{P};US)>f\tilde{q}_{P}$.

###### Proof.

The explicit form of the JIT LP’s utility (suppressing arguments for the
trader’s strategy) is

$\displaystyle
u_{J}(\tilde{q}_{J};\sigma_{-J},US)=\frac{\tilde{q}_{J}}{\tilde{q}_{P}+\tilde{q}_{J}}\left(p(1+f)d_{R}-\frac{p(\tilde{q}_{P}+\tilde{q}_{J})d_{R}}{\tilde{q}_{P}+\tilde{q}_{J}+d_{R}}\right)$

with partial derivative

$\displaystyle\frac{\partial
u_{J}}{\partial\tilde{q}_{J}}=\frac{\tilde{q}_{P}}{(\tilde{q}_{P}+\tilde{q}_{J})^{2}}\left(p(1+f)d_{R}-\frac{p(\tilde{q}_{P}+\tilde{q}_{J})d_{R}}{\tilde{q}_{P}+\tilde{q}_{J}+d_{R}}\right)-\frac{\tilde{q}_{J}}{\tilde{q}_{P}+\tilde{q}_{J}}\left(\frac{d_{R}}{\tilde{q}_{P}+\tilde{q}_{J}+d_{R}}\right)^{2}$

Note that the sign of the partial derivative depends on

$\displaystyle
M_{J}(\tilde{q}_{J})\equiv\frac{(1+f)\tilde{q}_{P}}{(\tilde{q}_{P}+\tilde{q}_{J})^{2}}-\frac{\tilde{q}_{P}+d_{R}}{(\tilde{q}_{P}+\tilde{q}_{J}+d_{R})^{2}}$

If $d_{R}\leq f\tilde{q}_{P}$, then $M_{J}(\tilde{q}_{J})>0$ for all
$\tilde{q}_{J}\in\mathbb{R}_{+}$, so $u_{J}$ does not have a maximum for
$\tilde{q}_{J}\in\mathbb{R}_{+}$. If $d_{R}>f\tilde{q}_{P}$, then solving
$M_{J}(\tilde{q}_{J})=0$ yields two solutions:

$\displaystyle\tilde{q}_{J}^{\star}=\frac{f\tilde{q}_{P}(\tilde{q}_{P}+d_{R})\pm
d_{R}\sqrt{(1+f)\tilde{q}_{P}(\tilde{q}_{P}+d_{R})}}{d_{R}-f\tilde{q}_{P}}$

Since $d_{R}>f\tilde{q}_{P}$ implies
$f\tilde{q}_{P}(\tilde{q}_{P}+d_{R})-d_{R}\sqrt{(1+f)\tilde{q}_{P}(\tilde{q}_{P}+d_{R})}<0$,
the negative root solution is extraneous. Since $M_{J}$ is continuous in
$\tilde{q}_{J}$, $M_{J}(0)>0$, and $M_{J}(\tilde{q}_{J})=0$ has one solution
on $\mathbb{R}_{+}$, it follows that $u_{J}$ has a unique maximum for
$\tilde{q}_{J}\in\mathbb{R}_{+}$. ∎

######  Proposition A.8.

Let $\tilde{q}_{P}\in[0,\tilde{e}_{P}]$. Then the unique non-trivial Nash
equilibrium of the trader–JIT LP subgame when $\omega=US$ is given by
(suppressing arguments for the trader’s strategy)

$\displaystyle(d_{R},d_{S})^{\star}(\tilde{q}_{P};US)=\begin{dcases}((1-\pi)\mu_{0}\tilde{q}_{P}+\pi\mu_{1}\tilde{q}_{P},0)&\xi_{U}>2(1+f)^{2}(2+f)^{-1}\\\
(f\tilde{q}_{P},0)&\xi_{U}\leq 2(1+f)^{2}(2+f)^{-1}\end{dcases}$
$\displaystyle\tilde{q}_{J}^{\star}(\tilde{q}_{P},(d_{R},d_{S});US)=\begin{dcases}0&\tilde{q}_{P}=0\\\\[3.0pt]
\frac{f\tilde{q}_{P}(\tilde{q}_{P}+d_{R})+d_{R}\sqrt{(1+f)\tilde{q}_{P}(\tilde{q}_{P}+d_{R})}}{d_{R}-f\tilde{q}_{P}}&\tilde{q}_{P}>0,\,\xi_{U}>2(1+f)^{2}(2+f)^{-1}\\\\[3.0pt]
\infty&\tilde{q}_{P}>0,\,\xi_{U}\leq 2(1+f)^{2}(2+f)^{-1}\end{dcases}$

The equilibrium outcome for the JIT LP is

$\displaystyle\tilde{q}_{J}^{\star}(\tilde{q}_{P},(d_{R},d_{S})^{\star};US)=\begin{dcases}0&\tilde{q}_{P}=0\\\
\nu\tilde{q}_{P}&\tilde{q}_{P}>0,\,\xi_{U}>2(1+f)^{2}(2+f)^{-1}\\\
\infty&\tilde{q}_{P}>0,\,\xi_{U}\leq 2(1+f)^{2}(2+f)^{-1}\end{dcases}$

Here $\mu_{0}$, $\mu_{1}$, and $\nu$ are defined as in the theorem statement.

###### Proof.

When $\tilde{q}_{P}=0$, the result follows from Assumption 2.1. When
$\tilde{q}_{P}>0$ and $\xi_{U}>2(1+f)^{2}(2+f)^{-1}$, the JIT LP’s best-
response follows from Lemma A.7. Since the trader accounts for this best-
response, the trader’s utility function when $\omega=US$ is

$\displaystyle
u_{T}((d_{R},0);\sigma_{-T},US)=(1-\pi)\frac{p\tilde{q}_{P}d_{R}}{\tilde{q}_{P}+d_{R}}+\pi\cdot\frac{p(\tilde{q}_{P}+\tilde{q}_{J}(\tilde{q}_{P},(d_{R},0);US))d_{R}}{\tilde{q}_{P}+\tilde{q}_{J}(\tilde{q}_{P},(d_{R},0);US)+d_{R}}-\xi_{U}^{-1}p(1+f)d_{R}$

This has partial derivative

$\displaystyle\frac{\partial u_{T}}{\partial
d_{R}}=(1-\pi)p\left(\frac{\tilde{q}_{P}}{\tilde{q}_{P}+d_{R}}\right)^{2}+\pi
p\cdot\frac{(2\tilde{q}_{P}+d_{R})\sqrt{(1+f)\tilde{q}_{P}(\tilde{q}_{P}+d_{R})}}{2(\tilde{q}_{P}+d_{R})^{2}}-\frac{p(1+f)}{\xi}$

When $\pi=0$, the result follows from Proposition A.2. By Lemma A.6, we can
normalize $\tilde{q}_{P}$ to 1 to define

$\displaystyle M_{T}(\mu)=\frac{(2+\mu)\sqrt{(1+f)(1+\mu)}}{2(1+\mu)^{2}}$

Since $M_{T}(0)>1$, $\lim_{\mu\to\infty}M_{T}(\mu)=0$, and $M_{T}$ is
decreasing in $\mu$, there is a unique solution to the equation
$M_{T}(\mu)=\xi_{U}^{-1}(1+f)$ that we define as $\mu_{1}$. Note that
$M_{T}(f)\leq\xi_{U}^{-1}(1+f)$ iff $\xi\leq 2(1+f)^{2}(2+f)^{-1}$, so we have
$d_{R}>f\tilde{q}_{P}$ when $\pi=1$.

When $\tilde{q}_{P}>0$ and $d_{R}\leq f\tilde{q}_{P}$, Lemma A.7 implies that
the JIT LP’s best-response is to deposit at an infinite invariant level. When
the liquidity pool is infinitely deep, there is no trading cost, so the trader
swaps as many coins as possible such that the JIT LP’s best-response is to
provide infinite liquidity, i.e. at $f\tilde{q}_{P}$. Since $M_{T}$ is
decreasing in $\mu$, it follows that

$\displaystyle u_{T}((f\tilde{q}_{P},0);\sigma_{-T},US)\geq
u_{T}((\mu_{1}\tilde{q}_{P},0);\sigma_{-T},US)$

iff $\mu_{1}\leq f$, i.e. $\xi_{U}\leq 2(1+f)^{2}(2+f)^{-1}$. ∎

######  Lemma A.9.

If $\tilde{q}_{J}^{\star}$ is a stationary point for the JIT LP’s utility
function given $\tilde{q}_{P}\in\mathbb{R}_{+}$ and
$(d_{R},d_{S})\in[0,\tilde{e}_{P}]$ $\times\
\Omega\to\bar{\mathbb{R}}^{2}_{+}\backslash\bar{\mathbb{R}}^{2}_{++}$ when
$\omega=UB$, then $\tilde{q}_{J}^{\star}/c$ is a stationary point for the JIT
LP’s utility function given $\tilde{q}_{P}/c$ and $(d_{R},d_{S})/c$ when
$\omega=UB$ for any $c>0$.

######  Lemma A.10.

If the JIT LP’s utility function has a unique maximum for
$\tilde{q}_{J}\in\mathbb{R}_{+}$ and $d_{S}^{\star}$ solves the uninformed
trader’s problem given $\tilde{q}_{P}$ when $\pi=1$ and $\omega=UB$, then
$d_{S}^{\star}/c$ solves the trader’s problem given $\tilde{q}_{P}/c$ when
$\pi=1$ and $\omega=UB$ for any $c>0$.

######  Lemma A.11.

Then JIT LP’s utility function given $\tilde{q}_{P}\in[0,\tilde{e}_{P}]$ and
$(d_{R},d_{S})\in[0,\tilde{e}_{P}]\times\Omega\to\bar{\mathbb{R}}^{2}_{+}\backslash\bar{\mathbb{R}}^{2}_{++}$
when $\omega=UB$ has a unique maximum for $\tilde{q}_{J}\in\mathbb{R}_{+}$ if
and only if $d_{S}(\tilde{q}_{P};UB)>fp\tilde{q}_{P}$.

######  Proposition A.12.

Let $\tilde{q}_{P}\in[0,\tilde{e}_{P}]$. Then the unique non-trivial Nash
equilibrium of the trader–JIT LP subgame when $\omega=UB$ is given by
(suppressing arguments for the trader’s strategy)

$\displaystyle(d_{R},d_{S})^{\star}(\tilde{q}_{P};UB)=\begin{dcases}(0,(1-\pi)\mu_{0}p\tilde{q}_{P}+\pi\mu_{1}p\tilde{q}_{P})&\xi_{U}>2(1+f)^{2}(2+f)^{-1}\\\
(0,fp\tilde{q}_{P})&\xi_{U}\leq 2(1+f)^{2}(2+f)^{-1}\end{dcases}$
$\displaystyle\tilde{q}_{J}^{\star}(\tilde{q}_{P},(d_{R},d_{S});UB)=\begin{dcases}0&\tilde{q}_{P}=0\\\\[3.0pt]
\frac{fp\tilde{q}_{P}(p\tilde{q}_{P}+d_{S})+d_{S}\sqrt{(1+f)p\tilde{q}_{P}(p\tilde{q}_{P}+d_{S})}}{p(d_{S}-fp\tilde{q}_{P})}&\tilde{q}_{P}>0,\,\xi_{U}>2(1+f)^{2}(2+f)^{-1}\\\\[3.0pt]
\infty&\tilde{q}_{P}>0,\,\xi_{U}\leq 2(1+f)^{2}(2+f)^{-1}\end{dcases}$

The equilibrium outcome for the JIT LP is

$\displaystyle\tilde{q}_{J}^{\star}(\tilde{q}_{P},(d_{R},d_{S})^{\star};UB)=\begin{dcases}0&\tilde{q}_{P}=0\\\
\nu\tilde{q}_{P}&\tilde{q}_{P}>0,\,\xi_{U}>2(1+f)^{2}(2+f)^{-1}\\\
\infty&\tilde{q}_{P}>0,\,\xi_{U}\leq 2(1+f)^{2}(2+f)^{-1}\end{dcases}$

Here $\mu_{0}$, $\mu_{1}$, and $\nu$ are defined as in the theorem statement.

The proofs of results A.9–A.12 are symmetric to those of results A.5–A.8. For
Lemma A.7, it is helpful to use the parameterizations
$\tilde{v}_{P}=p\tilde{q}_{P}$ and $\tilde{v}_{J}=p\tilde{q}_{J}$.

It remains to find the passive LPs’ best-responses when the remaining agents
play the unique non-trivial Nash equilibrium of the trader–JIT LP subgame
given a invariant level of $\tilde{q}_{P}$ provided by the passive LPs, which
we denote $\sigma_{-P}^{\star}(\tilde{q}_{P})$. Substituting the explicit
forms of $\delta_{S}$, $\delta_{R}$, and $\sigma_{-P}^{\star}(\tilde{q}_{P})$
into the expressions for
$u_{P}(\tilde{q}_{P};\sigma_{-P}^{\star}(\tilde{q}_{P}),\omega)$ in Section
2.3 yields

$\displaystyle u_{P}(\tilde{q}_{P};\sigma_{-P}^{\star})=C(\pi)\cdot
p\tilde{q}_{P}=\left[\alpha C_{I}+(1-\alpha)\left((1-\pi)C_{U}^{(0)}+\pi
C_{U}^{(1)}\right)\right]p\tilde{q}_{P}$

where $C(\pi)$, $C_{I}$, $C_{U}^{(0)}$, and $C_{U}^{(1)}$ are defined as in
the theorem statement, noting that $C_{I}<0$ when $\xi>1+f$.

Suppose that $\xi_{U}>2(1+f)(2+f)^{-1}$ or $\xi_{U}\leq 2(1+f)(2+f)^{-1}$ and
$\pi=0$. Let $\mathbf{\tilde{q}}_{P}\in[0,\tilde{e}_{P}]^{N}$ be a vector of
risky coin deposit amounts for the passive LPs. We have the following ases:

  * •

Suppose that $C(\pi)\geq 0$. If
$\mathbf{\tilde{q}}_{P}\neq\tilde{e}_{P}/N\cdot\mathbf{1}$, then there exists
$j\in[N]$ such that $\mathbf{\tilde{q}}_{P}^{(j)}<\tilde{e}_{P}/N$, so passive
LP $j$ has a profitable deviation to $\tilde{e}_{P}/N$. Thus
$\mathbf{\tilde{q}}_{P}$ cannot be a strategy in the SPNE. Since no passive LP
can profitably deviate under $\tilde{e}_{P}/N\cdot\mathbf{1}$, it follows that
$\tilde{e}_{P}/N\cdot\mathbf{1}$ is the unique SPNE strategy for the passive
LPs in this case.

  * •

Suppose that $C(\pi)<0$. If $\mathbf{\tilde{q}}_{P}\neq\mathbf{0}$, then there
exists $j\in[N]$ such that $\mathbf{\tilde{q}}_{P}^{(j)}>0$, so passive LP $j$
has a profitable deviation to $0$. Thus $\mathbf{\tilde{q}}_{P}$ cannot be a
strategy in the SPNE. Since no passive LP can profitably deviate under
$\mathbf{0}$, it follows that $\mathbf{0}$ is the unique SPNE strategy for the
passive LPs in this case.

Now suppose that $\xi_{U}\leq 2(1+f)(2+f)^{-1}$ and $\pi=1$. If
$\mathbf{\tilde{q}}_{P}\neq\mathbf{0}$, then $\tilde{q}_{P}>0$, so the JIT
LP’s best-response is to deposit at an infinite invariant level which drives
the passive LPs’ share of the pool to zero. Thus $C_{U}^{(1)}=0$, so
$C(1)=\alpha C_{I}<0$. Since there exists $j\in[N]$ such that
$\mathbf{\tilde{q}}_{P}^{(j)}>0$, passive LP $j$ has a profitable deviation to
0. Thus $\mathbf{\tilde{q}}_{P}$ cannot be a strategy in the SPNE. Since no
passive LP can profitably deviate under $\mathbf{0}$, it follows that
$\mathbf{0}$ is the unique SPNE strategy for the passive LPs in this case.

###  A.3 Proof of Theorem 3.3

######  Proposition A.13.

Suppose that the trader and JIT LP’s best-response functions have a unique
maximum on $\mathbb{R}_{+}$. Let $\sigma^{\star}$ be the unique non-trivial
subgame-perfect Nash equilibrium, $d_{R}^{\star}$ be the equilibrium risky
coin swap volume when $\omega=US$ and $\pi=1$, and
$\tilde{q}_{J}^{BR}(\tilde{q}_{P},d_{R};US)$ be the JIT LP’s best-response
function when $\omega=US$. Then $\sigma^{\star}$ is a crowding-out equilibrium
if and only if

$\displaystyle\frac{\partial\tilde{q}_{J}^{BR}}{\partial
d_{R}}(\tilde{q}_{P},d_{R}^{\star};US)<0$

###### Proof.

The trader’s problem given $\tilde{q}_{P}$ when $\omega=US$ is

$\displaystyle\max_{d_{R}\in\mathbb{R}_{+}}\
(1-\pi)(\delta_{S}(d_{R},\tilde{q}_{P})-\xi_{U}^{-1}p(1+f)d_{R})+\pi(\delta_{S}(d_{R},\tilde{q}_{P}+\tilde{q}_{J}^{BR}(\tilde{q}_{P},d_{R};US))-\xi_{U}^{-1}p(1+f)d_{R})$

Let $d_{R}^{\star}(0)$ and $d_{R}^{\star}(1)$ be the optimal solutions for the
trader’s problem when $\pi=0$ and $\pi=1$, respectively, noting that these
exist by assumption and under the class of pricing functions considered. Then
$d_{R}^{\star}(0)$ and $d_{R}^{\star}(1)$ satisfy the first-order conditions
(suppressing the arguments of $\tilde{q}_{J}^{BR}$ for brevity):

$\displaystyle\frac{\partial\delta_{S}}{\partial
r}(d_{R}^{\star}(0),\tilde{q}_{P})=\frac{p(1+f)}{\xi_{U}}$
$\displaystyle\frac{\partial\delta_{S}}{\partial
r}(d_{R}^{\star}(1),\tilde{q}_{P}+\tilde{q}_{J}^{BR})+\frac{\partial\tilde{q}_{J}^{BR}}{\partial
d_{R}}(\tilde{q}_{P},d_{R}^{\star}(1);US)\cdot\frac{\partial\delta_{S}}{\partial
q}(d_{R}^{\star}(1),\tilde{q}_{P}+\tilde{q}_{J}^{BR})=\frac{p(1+f)}{\xi_{U}}$

If $\frac{\partial\tilde{q}_{J}^{BR}}{\partial
d_{R}}(\tilde{q}_{P},d_{R}^{\star}(1);US)<0$, then

$\displaystyle\frac{\partial\delta_{S}}{\partial
r}(d_{R}^{\star}(1),\tilde{q}_{P}+\tilde{q}_{J}^{BR})>\frac{p(1+f)}{\xi_{U}}$

since $\partial\delta_{S}/\partial q>0$. By the 1-homogeneity of $\delta_{S}$,

$\displaystyle\frac{\partial\delta_{S}}{\partial
r}\left(\frac{d_{R}^{\star}(1)}{\tilde{q}_{P}+\tilde{q}_{J}^{BR}},1\right)>\frac{\partial\delta_{S}}{\partial
r}\left(\frac{d_{R}^{\star}(0)}{\tilde{q}_{P}},1\right)$

Since $\delta_{S}$ is concave in $r$,

$\displaystyle\frac{d_{R}^{\star}(1)}{\tilde{q}_{P}+\tilde{q}_{J}^{BR}}<\frac{d_{R}^{\star}(0)}{\tilde{q}_{P}}\implies
d_{R}^{\star}(0)>\frac{\tilde{q}_{P}}{\tilde{q}_{P}+\tilde{q}_{J}^{BR}}d_{R}^{\star}(1)\implies\delta_{S}(d_{R}^{\star}(0),\tilde{q}_{P})>\frac{\tilde{q}_{P}}{\tilde{q}_{P}+\tilde{q}_{J}^{BR}}\cdot\delta_{S}(d_{R}^{\star}(1),\tilde{q}_{P}+\tilde{q}_{J}^{BR})$

Note that

$\displaystyle C_{U}^{(0)}p\tilde{q}_{P}=(p\cdot
d_{R}^{\star}(0)+\delta_{S}(d_{R}^{\star}(0),\tilde{q}_{P}))f$ $\displaystyle
C_{U}^{(1)}p\tilde{q}_{P}=\frac{\tilde{q}_{P}}{\tilde{q}_{P}+\tilde{q}_{J}^{BR}}\left(p\cdot
d_{R}^{\star}(1)+\delta_{S}(d_{R}^{\star}(1),\tilde{q}_{P}+\tilde{q}_{J}^{BR})\right)f$

The result follows. ∎

######  Proposition A.14.

Suppose that the trader and JIT LP’s best-response functions have a unique
maximum on $\mathbb{R}_{+}$. Let $\sigma^{\star}$ be the unique non-trivial
subgame-perfect Nash equilibrium, $d_{S}^{\star}$ be the equilibrium stable
coin swap volume when $\omega=UB$ and $\pi=1$, and
$\tilde{q}_{J}^{BR}(\tilde{q}_{P},d_{R};UB)$ be the JIT LP’s best-response
function when $\omega=US$. Then $\sigma^{\star}$ is a crowding-out equilibrium
if and only if

$\displaystyle\frac{\partial\tilde{q}_{J}^{BR}}{\partial
d_{R}}(\tilde{q}_{P},d_{S}^{\star};UB)<0$

###### Proof.

Symmetric to the proof of Proposition A.13. ∎

We complete the proof for the $\omega=US$ case; the proof for the $\omega=UB$
case is symmetric. By Lemmas A.5 and A.6, it follows that

$\displaystyle\frac{\partial\tilde{q}_{J}^{BR}}{\partial
d_{R}}<0\iff\frac{\partial\nu}{d\mu_{1}}<0$

where $\nu(\mu_{1})$ is given by

$\displaystyle\nu(\mu_{1})=\frac{f(1+\mu_{1})+\mu_{1}\sqrt{(1+f)(1+\mu_{1})}}{\mu_{1}-f}$

and $\mu_{1}$ uniquely satisfies

$\displaystyle\frac{(2+\mu_{1})\sqrt{(1+f)(1+\mu_{1})}}{2(1+\mu)^{2}}=\frac{1+f}{\xi_{U}}$

Note that

$\displaystyle\frac{\partial\nu}{\partial\mu_{1}}=\frac{(1+f)(\mu_{1}^{2}-2\mu_{1}f-2f(1+\sqrt{(1+f)(1+\mu_{1})}))}{2(\mu_{1}-f)^{2}\sqrt{(1+f)(1+\mu_{1})}}$

so the sign of $\partial\nu/\partial\mu_{1}$ depends on
$\mu_{1}^{2}-2\mu_{1}f-2f(1+\sqrt{(1+f)(1+\mu_{1})})$. Solving the inequality
over $\xi_{U}>0$ yields the condition $\sqrt{\xi_{U}}<\sqrt{f}+\sqrt{1+f}$.
The result follows by Proposition A.13.

###  A.4 Proof of Theorem 4.1

Similar to the proofs of Theorem 3.1 and 3.2. The main difference lies in the
uninformed trader’s first-order condition, which is a $\pi$-weighted average
of the first-order conditions with the JIT LP and without the JIT LP. We
substitute $\mu(\pi)=f$ in the first-order condition and find when it is less
than $(1+f)/\xi_{U}$ to derive the lower bound on $\xi_{U}$ for the existence
of a Nash equilibrium in the subgame.

###  A.5 Proof of Theorem 4.2

In equilibrium, we have

$\displaystyle
C_{U}(\pi)=\left[(1-\pi)\left(\mu(\pi)+\frac{\mu(\pi)}{1+\mu(\pi)}\right)+\pi\left(\frac{\sqrt{1+\mu(\pi)}}{\sqrt{1+f}}-\frac{\sqrt{1+f}}{\sqrt{1+\mu(\pi)}}\right)\right]f$
$\displaystyle\mu^{\prime}(\pi)=\frac{2(1+\mu)\sqrt{(1+f)(1+\mu)}[(2+\mu)\sqrt{(1+f)(1+\mu)}-2]}{\pi(1+f)(1+\mu)(4+\mu)+8(1-\pi)\sqrt{(1+f)(1+\mu)}}$

When $\pi=0$, we have

$\displaystyle C_{U}^{\prime}(0)$
$\displaystyle=\left(\frac{\sqrt{1+\mu(0)}}{\sqrt{1+f}}-\frac{\sqrt{1+f}}{\sqrt{1+\mu(0)}}\right)-\left(1+\mu(0)-\frac{1}{1+\mu(0)}\right)$
$\displaystyle\hskip
28.45274pt+\frac{1}{4}\left(1+\mu(0)+\frac{1}{1+\mu(0)}\right)[(2+\mu(0))\sqrt{(1+f)(1+\mu(0))}-2]$

This quantity is increasing in $\mu(0)$ has a negative limit at $\mu\to f^{+}$
if $f<\bar{f}$ where $\bar{f}\approx 0.343$. The result follows by continuity.
When $\pi=1$, we have

$\displaystyle C_{U}^{\prime}(1)$
$\displaystyle=\left(\frac{\sqrt{1+\mu(1)}}{\sqrt{1+f}}-\frac{\sqrt{1+f}}{\sqrt{1+\mu(1)}}\right)-\left(1+\mu(1)-\frac{1}{1+\mu(1)}\right)$
$\displaystyle\hskip
28.45274pt+\left(\frac{1}{1+\mu(1)}+\frac{1}{1+f}\right)\frac{(2+\mu(1))\sqrt{(1+f)(1+\mu(1))}-2}{4+\mu(1)}$

This quantity is decreasing in $\mu(1)$ for all $f\geq 0$ and is nonnegative
at $\mu(1)=0$ for all $f\geq 0$, so the result follows by continuity.

###  A.6 Proof of Theorem 5.1

Similar to the proofs of Theorem 3.1 and 3.2. The main difference lies in the
JIT LP’s first-order condition, which now depends on $\lambda$. The uninformed
trader’s first-order condition also depends on $\lambda$ due to the trader
accounting for the JIT LP’s best response. We substitute $\mu(\pi,\lambda)=f$
in the first-order condition and find when it is less than $(1+f)/\xi_{U}$ to
derive the lower bound on $\xi_{U}$ for the existence of a Nash equilibrium in
the subgame.

###  A.7 Proof of Theorem 5.2

We show the proof for the $\omega=US$ case; the proof for the $\omega=UB$ case
is symmetric. We will first require the following lemma:

######  Lemma A.15.

Let $\mu_{\pi}(\lambda)$ be the uninformed trader’s propensity to swap and
$\nu(\lambda)$ be the JIT LP’s propensity to deposit at $\pi$ and $\lambda$.
If $\partial\mu_{\pi}/\partial\lambda>0$ and

$\displaystyle
p\left(\frac{\mu_{\pi}(\lambda_{0})}{1+\nu(\lambda_{0})}\right)^{2}f>\frac{\partial\mu_{\pi}}{\partial\lambda}(\lambda_{0})\cdot\frac{\partial\delta_{S}}{\partial
q}\left(\frac{\mu_{\pi}(\lambda_{0})}{1+\nu(\lambda_{0})},1\right)$

for all $\lambda_{0}\in[0,1]$, then $\partial\nu/\partial\lambda>0$ for all
$\lambda\in[0,1]$ and $\mu_{\pi}(\lambda)/(1+\nu(\lambda))$ decreases in
$\lambda$.

###### Proof.

By assumption,

$\displaystyle
p\left(\frac{\mu_{\pi}(\lambda_{0})}{1+\nu(\lambda_{0})}\right)^{2}f>\left(\lim_{\lambda_{1}\to\lambda_{0}^{+}}\frac{\mu_{\pi}(\lambda_{1})-\mu_{\pi}(\lambda_{0})}{\lambda_{1}-\lambda_{0}}\right)\cdot\frac{\partial\delta_{S}}{\partial
q}\left(\frac{\mu_{\pi}(\lambda_{0})}{1+\nu(\lambda_{0})},1\right)$

By properties of limits and rearranging,

$\displaystyle\lim_{\lambda_{1}\to\lambda_{0}^{+}}\frac{1}{1+\nu(\lambda_{0})}\cdot
p(\lambda_{1}-\lambda_{0})f\cdot\frac{\mu_{\pi}(\lambda_{0})}{1+\nu(\lambda_{0})}$
$\displaystyle>\lim_{\lambda_{1}\to\lambda_{0}^{+}}\frac{\mu_{\pi}(\lambda_{1})-\mu_{\pi}(\lambda_{0})}{\mu_{\pi}(\lambda_{0})}\cdot\frac{\partial\delta_{S}}{\partial
q}\left(\frac{\mu_{\pi}(\lambda_{0})}{1+\nu(\lambda_{0})},1\right)$
$\displaystyle\lim_{\lambda_{1}\to\lambda_{0}^{+}}\frac{\mu_{\pi}(\lambda_{0})}{\mu_{\pi}(\lambda_{1})}\cdot\frac{1}{1+\nu(\lambda_{0})}\cdot
p(\lambda_{1}-\lambda_{0})f\cdot\frac{\mu_{\pi}(\lambda_{0})}{1+\nu(\lambda_{0})}$
$\displaystyle>\lim_{\lambda_{1}\to\lambda_{0}^{+}}\left(1-\frac{\mu_{\pi}(\lambda_{0})}{\mu_{\pi}(\lambda_{1})}\right)\cdot\frac{\partial\delta_{S}}{\partial
q}\left(\frac{\mu_{\pi}(\lambda_{0})}{1+\nu(\lambda_{0})},1\right)$

This is equivalent to

$\displaystyle\lim_{\lambda_{1}\to\lambda_{0}^{+}}\left(\frac{\mu_{\pi}(\lambda_{0})}{\mu_{\pi}(\lambda_{1})}\cdot\left(1-\frac{1}{1+\nu(\lambda_{0})}\right)\cdot\frac{\partial\delta_{S}}{\partial
q}\left(\frac{\mu_{\pi}(\lambda_{0})}{1+\nu(\lambda_{0})},1\right)+\frac{\mu_{\pi}(\lambda_{0})}{\mu_{\pi}(\lambda_{1})}\cdot\frac{1}{1+\nu(\lambda_{0})}\cdot
p(\lambda_{1}-\lambda_{0})f\cdot\frac{\mu_{\pi}(\lambda_{0})}{1+\nu(\lambda_{0})}\right)$
$\displaystyle\hskip
28.45274pt>\lim_{\lambda_{1}\to\lambda_{0}^{+}}\left(1-\frac{\mu_{\pi}(\lambda_{0})}{\mu_{\pi}(\lambda_{1})}\cdot\frac{1}{1+\nu(\lambda_{0})}\right)\cdot\frac{\partial\delta_{S}}{\partial
q}\left(\frac{\mu_{\pi}(\lambda_{0})}{1+\nu(\lambda_{0})},1\right)$
($\bullet\bullet$)

By the JIT LP’s first-order condition, the LHS of $(\bullet\bullet)$ satisfies

$\displaystyle\lim_{\lambda_{1}\to\lambda_{0}^{+}}\left(\frac{\mu_{\pi}(\lambda_{0})}{\mu_{\pi}(\lambda_{1})}\cdot\left(1-\frac{1}{1+\nu(\lambda_{0})}\right)\cdot\frac{\partial\delta_{S}}{\partial
q}\left(\frac{\mu_{\pi}(\lambda_{0})}{1+\nu(\lambda_{0})},1\right)+\frac{\mu_{\pi}(\lambda_{0})}{\mu_{\pi}(\lambda_{1})}\cdot\frac{1}{1+\nu(\lambda_{0})}\cdot
p(\lambda_{1}-\lambda_{0})f\cdot\frac{\mu_{\pi}(\lambda_{0})}{1+\nu(\lambda_{0})}\right)$
$\displaystyle\hskip
28.45274pt=\lim_{\lambda_{1}\to\lambda_{0}^{+}}\frac{\mu_{\pi}(\lambda_{0})}{\mu_{\pi}(\lambda_{1})}\cdot\frac{1}{1+\nu(\lambda_{0})}\left(p(1+\lambda_{1}f)\cdot\frac{\mu_{\pi}(\lambda_{0})}{1+\nu(\lambda_{0})}-\delta_{S}\left(\frac{\mu_{\pi}(\lambda_{0})}{1+\nu(\lambda_{0})}\right)\right)$

This is the LHS of the JIT LP’s first-order condition if the transfer rate
increased from $\lambda_{0}$ to $\lambda_{1}$ and the trader chooses
$\mu_{\pi}(\lambda_{1})$ while the JIT LP chooses $\bar{\nu}$ to keep the
trade-to-liquidity ratio constant, i.e.

$\displaystyle\bar{\nu}=\frac{\mu_{\pi}(\lambda_{1})}{\mu_{\pi}(\lambda_{0})}\cdot(1+\nu(\lambda_{0}))-1>\nu(\lambda_{0})$

Note that the RHS of $(\bullet\bullet)$ is the RHS of the JIT LP’s first-order
condition if the transfer rate increased from $\lambda_{0}$ to $\lambda_{1}$
and the trader chooses $\mu_{\pi}(\lambda_{1})$ while the JIT LP chooses
$\bar{\nu}$, so the LHS exceeds the RHS in the JIT LP’s first-order condition
at $\bar{\nu}$. Since $u_{J}(\nu;\mu_{\pi}(\lambda_{1}),\lambda_{1})$ is
quasiconave in $\nu$ and is increasing at $\nu=0$, it follows that $u_{J}$
must be increasing at $\nu=\bar{\nu}$. Thus $\nu(\lambda_{1})>\bar{\nu}$, so
the statement follows. ∎

The JIT LP’s best-response function is

$\displaystyle\nu^{BR}(\mu_{\pi};\lambda)=\frac{\lambda
f(1+\mu_{\pi})+\mu_{\pi}\sqrt{(1+\lambda f)(1+\mu_{\pi})}}{\mu_{\pi}-\lambda
f}$

and the uninformed trader’s first-order condition is

$\displaystyle\frac{\pi(2+\mu)\sqrt{(1+\lambda
f)(1+\mu)}}{2(1+\mu)^{2}}+\frac{(1-\pi)}{(1+\mu)^{2}}=\frac{1+f}{\xi}$

Implicitly differentiating $\mu$ w.r.t. $\lambda$ subject to the trader’s
first-order condition yields

$\displaystyle\frac{\partial\mu_{\pi}}{\partial\lambda}=\frac{\pi(1+\mu_{\pi})^{2}(2+\mu_{\pi})}{\pi(1+\lambda
f)(1+\mu_{\pi})(4+\mu_{\pi})+8(1-\pi)\sqrt{(1+\lambda
f)(1+\mu_{\pi})}}<\frac{(1+\mu_{\pi})(2+\mu_{\pi})}{(1+\lambda
f)(4+\mu_{\pi})}f$

Note that

$\displaystyle\left(1+\frac{\mu_{\pi}(\lambda)}{1+\nu(\lambda)}\right)^{2}=\left(1+\frac{\mu_{\pi}(\lambda)}{1+\nu^{BR}(\mu_{\pi}(\lambda),\lambda)}\right)^{2}=\frac{1+\mu_{\pi}(\lambda)}{1+\lambda
f}$ $\displaystyle\frac{\partial\delta_{S}}{\partial
q}\left(\frac{\mu_{\pi}(\lambda)}{1+\nu(\lambda)},1\right)=p\cdot\frac{\mu_{\pi}(\lambda)^{2}}{(1+\mu_{\pi}(\lambda)+\nu(\lambda))^{2}}$

so it follows that

$\displaystyle\left(\frac{\partial\delta_{S}}{\partial
q}\left(\frac{\mu_{\pi}(\lambda_{0})}{1+\nu(\lambda_{0})},1\right)\right)^{-1}\left(p\left(\frac{\mu_{\pi}(\lambda_{0})}{1+\nu(\lambda_{0})}\right)^{2}f\right)=\frac{1+\mu_{\pi}(\lambda)}{1+\lambda
f}\cdot f>\frac{(1+\mu_{\pi}(\lambda))(2+\mu_{\pi}(\lambda))}{(1+\lambda
f)(4+\mu_{\pi}(\lambda))}\cdot f=\frac{\partial\mu_{\pi}}{\partial\lambda}$

Thus the assumptions for Lemma A.15 are satisfied, so $\nu(\lambda)$ is
increasing in $\lambda$ as well. Then

$\displaystyle u_{P}(\tilde{q}_{P};\lambda)$
$\displaystyle=\frac{\tilde{q}_{P}}{\tilde{q}_{P}+\tilde{q}_{J}}\cdot(pd_{R}+\delta_{S}(d_{R},\tilde{q}_{P}+\tilde{q}_{J}))+(1-\lambda)\left(1-\frac{\tilde{q}_{P}}{\tilde{q}_{P}+\tilde{q}_{J}}\right)\cdot
pd_{R}$
$\displaystyle=p\tilde{q}_{P}\cdot\frac{d_{R}}{\tilde{q}_{P}+\tilde{q}_{J}}+\tilde{q}_{P}\cdot\delta_{S}\left(\frac{d_{R}}{\tilde{q}_{P}+\tilde{q}_{J}},1\right)+(1-\lambda)\left(1-\frac{\tilde{q}_{P}}{\tilde{q}_{P}+\tilde{q}_{J}}\right)\cdot
pd_{R}$
$\displaystyle=\left[p\cdot\frac{\mu_{\pi}(\lambda)}{1+\nu(\lambda)}+\delta_{S}\left(\frac{\mu_{\pi}(\lambda)}{1+\nu(\lambda)},1\right)+(1-\lambda)\left(1-\frac{1}{1+\nu(\lambda)}\right)\cdot\mu_{\pi}(\lambda)\right]\tilde{q}_{P}$

so we can express

$\displaystyle
c_{U1}(\lambda)=p\cdot\frac{\mu_{\pi}(\lambda)}{1+\nu(\lambda)}+\delta_{S}\left(\frac{\mu_{\pi}(\lambda)}{1+\nu(\lambda)},1\right)+(1-\lambda)\left(1-\frac{1}{1+\nu(\lambda)}\right)\cdot\mu_{\pi}(\lambda)$

By Lemma A.15, the first two terms of $c_{U1}(\lambda)$ decrease in $\lambda$.
It remains to show that the last term of $c_{U1}(\lambda)$ also decreases in
$\lambda$. In equilibrium, we have

$\displaystyle(1-\lambda)\left(1-\frac{1}{1+\nu(\lambda)}\right)\cdot\mu_{\pi}(\lambda)=(1-\lambda)\left(1+\mu_{\pi}(\lambda)-\frac{\sqrt{1+\mu_{\pi}(\lambda)}}{1+\lambda
f}\right)$

Differentiating this with respect to $\mu$ yields

$\displaystyle\frac{\partial}{\partial\lambda}\left[(1-\lambda)\left(1+\mu_{\pi}(\lambda)-\frac{\sqrt{1+\mu_{\pi}(\lambda)}}{1+\lambda
f}\right)\right]=-\left(1+\mu_{\pi}(\lambda)-\frac{\sqrt{1+\mu_{\pi}(\lambda)}}{1+\lambda
f}\right)$ $\displaystyle\hskip
227.62204pt+\frac{\left(2+\frac{\sqrt{1+\mu_{\pi}(\lambda)}}{1+\lambda
f}+\mu_{\pi}(\lambda)\cdot(3+\mu_{\pi}(\lambda))\right)(1-\lambda)f}{(1+\lambda
f)(4+\mu_{\pi}(\lambda))}$

which is negative when $\mu_{\pi}(\lambda)$ satisfies the first-order
condition, as desired.

###  A.8 Proof of Theorem 5.3

In the case of an uninformed sell, the utilities of each agent are:

$\displaystyle
u_{T}=\pi\cdot\delta_{S}(d_{R},\tilde{q}_{P}+\tilde{q}_{J})+(1-\pi)\cdot\delta_{S}(d_{R},\tilde{q}_{P})-\xi_{U}^{-1}p(1+f)d_{R}$
$\displaystyle
u_{J}=\frac{\pi\tilde{q}_{J}}{\tilde{q}_{P}+\tilde{q}_{J}}(p(1+\lambda
f)d_{R}-\delta_{S}(d_{R},\tilde{q}_{P}+\tilde{q}_{J}))$ $\displaystyle
u_{A}=\frac{\pi\tilde{q}_{P}}{\tilde{q}_{P}+\tilde{q}_{J}}(pd_{R}-(1+f)\cdot\delta_{S}(d_{R},\tilde{q}_{P}+\tilde{q}_{J}))+(1-\pi)(pd_{R}-(1+f)\cdot\delta_{S}(d_{R},\tilde{q}_{P}))$
$\displaystyle
u_{P}=\pi\left(\frac{\tilde{q}_{P}+(1-\lambda)\tilde{q}_{J}}{\tilde{q}_{P}+\tilde{q}_{J}}pd_{R}+\frac{\tilde{q}_{P}}{\tilde{q}_{P}+\tilde{q}_{J}}\cdot\delta_{S}(d_{R},\tilde{q}_{P}+\tilde{q}_{J})\right)f+(1-\pi)(pd_{R}+\delta_{S}(d_{R},\tilde{q}_{P}))f$

where we omit the dependence of $d_{R}$ and $\tilde{q}_{J}$ on $\lambda$ for
brevity, and the subscripts $T$, $H$, $A$, and $L$ represent the (uninformed)
trader, JIT LP, arbitrageur, and passive LPs, respectively. Welfare is then

$\displaystyle W(US)=(1-\xi_{U}^{-1})p(1+f)d_{R}$

In the case of an uninformed buy, the utilities of each agent are (suppressing
arguments):

$\displaystyle
u_{T}=\xi_{U}p\left(\pi\cdot\delta_{R}(d_{S},\tilde{q}_{P}+\tilde{q}_{J})+(1-\pi)\cdot\delta_{R}(d_{S},\tilde{q}_{P})\right)-(1+f)d_{S}$
$\displaystyle
u_{J}=\frac{\pi\tilde{q}_{J}}{\tilde{q}_{P}+\tilde{q}_{J}}((1+\lambda
f)d_{S}-p\cdot\delta_{R}(d_{S},\tilde{q}_{P}+\tilde{q}_{J}))$ $\displaystyle
u_{A}=\frac{\pi\tilde{q}_{P}}{\tilde{q}_{P}+\tilde{q}_{J}}(d_{S}-p(1+f)\cdot\delta_{R}(d_{S},\tilde{q}_{P}+\tilde{q}_{J}))+(1-\pi)(d_{S}-p(1+f)\cdot\delta_{R}(d_{S},\tilde{q}_{P}))$
$\displaystyle
u_{P}=\pi\left(\frac{\tilde{q}_{P}+(1-\lambda)\tilde{q}_{J}}{\tilde{q}_{P}+\tilde{q}_{J}}d_{S}+\frac{\tilde{q}_{P}}{\tilde{q}_{P}+\tilde{q}_{J}}\cdot
p\cdot\delta_{R}(d_{S},\tilde{q}_{P}+\tilde{q}_{J})\right)f+(1-\pi)(d_{S}+p\cdot\delta_{R}(d_{S},\tilde{q}_{P}))f$

omitting the dependence of $d_{S}$ on $\lambda$ for brevity. Welfare is then

$\displaystyle
W(UB)=(\xi_{U}-1)p\cdot\delta_{R}(d_{S},\tilde{q}_{P}+\tilde{q}_{J})$ (4.3.1)

Weighting each case by its probability yields an expected welfare of

$\displaystyle W=p\frac{\xi_{U}-1}{\xi_{U}+1}\left[(1+f)\cdot
d_{R}+\pi\cdot\delta_{R}(d_{S},\tilde{q}_{P}+\tilde{q}_{J})+(1-\pi)\cdot\delta_{R}(d_{S},\tilde{q}_{P})\right]$

Since $d_{R}^{\star}(\lambda$, $d_{S}^{\star}(\lambda)$ and
$\tilde{q}_{J}^{\star}(\lambda)$ are increasing in $\lambda$, and $\delta_{R}$
is 1-homogeneous and increasing in both arguments, it follows that
$\delta_{R}(d_{S}^{\star},\tilde{q}_{P}+\tilde{q}_{J}^{\star})$ is also
increasing in $\lambda$.