1. Expressing the Uniswap LP with conventional
two-asset portfolio modeling Pt. 1
Garette David
January 2021
The Automated Market Maker (AMM) is an advancement in P2P trad-
ing that should be considered a leap forward in the decentralized finance
space. The AMM model has obvious benefits such as simplifying decentral-
ized trading, removing barriers to access for token issuers and engendering
self-custody. The AMM model also has obvious detriments such as high
fees via numerous contract interactions on the Ethereum network, standard-
ized liquidity pool reward distributions, a dearth of dynamic properties, and
limited availability of conditional order types leading to high slippage and
additional fees.
By creating LPs on Uniswap, Uniswap users are in effect creating a two asset
portfolio plus a derivative product that is intended to generate a flow of value
over time in an attempt to compensate the user for providing liquidity. This
process is completed by LPs taking a share of fees of the volume traded
within one specific pool itself according to their weight in the pool in which
they have committed capital.
There is a 0.3% fee for swapping tokens. This fee is split by liquidity providers
proportional to their contribution to liquidity reserves
LPs themselves are an asset and have unique risks and properties whose
effectiveness we have only begun to realize. Similarly, the means of LP
composition, fee distribution, and fee calculation, have not been optimized for
1
2. the risk that market participants take when creating, redeeming, or remaining
in a position.
We can begin to summarize the composition of a Uniswap LP as follows, by
borrowing from a simple two asset portfolio composed of assets 1 and 2:
Rp = wA1 RA1 + wA2 RA2 (1)
where;
Rp = Expected return for the portfolio.
wAn = Weighting of the portfolio invested in an asset.
RAn = Expected return of an asset.
A Uniswap LP (LPUNI) follows a very similar format. There are two differ-
ences:
1. The asset weightings in the portfolio are non-stationary, reacting to
the price action in a pool, rather than being changed by a manager or
trader.
2. The Uniswap LP introduces a third variable that ends up resembling
an interest rate or lending fee.
RLPUNI
= wA1 RA1 + wA2 RA2 + Feepool (2)
where;
RLPUNI
= the overall the return of the LP (measured in USD)
Feepool = 0.003 × (volume of pool) × (pool share).
wAn = the weighting of an asset in the LP (initial value 0.5)
Creating a Uniswap LP requires equal weights of assets 1 and 2 as denomi-
nated in the USD values at the time of creation, t0. We must also consider
2
3. the reality of gas prices for the creation and redemption of LPs and we will
assume that asset 1 is Ethereum and that fees to create and redeem the con-
tract are paid in ETH as well. The fees for creating and redeeming LPs are
variable as the market price for gas fluctuates and inconveniently, gas prices,
high network activity, and volatility in token prices are positively correlated.
This is especially problematic for smaller LPs whose contract interaction
costs are not adjusted for their position sizing or volume. Already we can see
that LP creators are bearing a higher risk to A2 from the Ethereum expenses.
The following represents a Uniswap LP at the time of creation and the return
on a forward-looking basis while ignoring idiosyncratic risks.
RLPUNI
= 0.5RETH + 0.5RA2 + Feepool − Feecreation − FeeA2 acquisition (3)
As time goes on, volatility in underlying assets becomes realized and the
distribution of pooled assets will change. The additional parameter of Feepool
as a function of volume, liquidity, and volatility, modifies the simple two asset
model and implies an additional third asset which is equal to the claim of
liquidity pool rewards over the duration of the LP’s commitment.
The failure of this variable to reliably produce income that is greater than or
equal to the value lost between the shifting weightings and price movements
of the LP constituents is referred to as impermanent loss. This term is a
misnomer. There is no guarantee the loss will be recovered and the risk-free
rate is very high - equal to slippage and multiple contract interactions.
In the event that A2 experiences immense selling into ETH from t0 to t7,
the LP experiences some degree of carnage as pooled A2 has been sold for
ETH, and in turn the LP is compensated in A2 and the fee distribution is
proportionate to the fluctuating contribution of liquidity reserves. In this
instance, we assume the ETH part of the user LP has reduced from 0.5 to
0.35, a 30% decrease.
The LP decides to pull their LP to cut their losses and one hypothetical state
of LPUNI at t7 is represented below:
RLPUNI
= 0.35RETH + (1 − 0.35)RA2 + Feepool(0-7) − (Feecreation + Feeredemption)
(4)
3
4. The LP is underwater on A2 and decides to market sell.
RLPUNI
= 0.35RETH + (1 − 0.35)RA2 + Feepool(0-7) − (Feecreation + Feeredemption)
− (FeeA2sale + FeeA2acquisition) − slippage
(5)
This makes the risk free rate on Uniswap LP’s very unattractive for par-
ticipants considering their risk free rate requires a positive return on their
underlying after multiple layers of fees and slippage.
Impermanent loss is a known problem within the dex trading community and
intelligent traders are too gunshy to commit to a pool knowing that volatil-
ity and low trading volume can quickly cannibalize their LP. A commonly
proposed solution is to offer incentives for users to stake their LP tokens,
lock in their liquidity, in return for other prizes. One iteration of this stak-
ing incentive mechanism is referred to as a geyser, liquidity reward program
(Kira), or liquidity mining (Pickle). The following is a complete “trade” of
creating an LP, earning fees +, unstaking, and selling some of, if not all of,
the second asset,A2.
IncentiveA2 = rewards for liquidity staking
Giving us
RLPUNI
= wRETH + (1 − w)RA2 + Feepool − (Feecreation + Feeredemption)
+ IncentiveA2 − (FeeA2sale + FeeA2acquisition) − slippage
(6)
This method and similar methods of LP compensation are unsustainable
and highlight the losing value proposition of being an LP. We would not
need them if being an LP was profitable and sustainable. Radically, this
mechanism perpetuates the demise of A2. As the price of A2 fluctuates and
users lose ETH, they are aggressively compensated in the A2 itself. In order
for a user to emerge from this situation whole, they must sell their rewards
which modifies the pool in the following ways:
4
5. • Increasing the fractional share of other users in the pool thus increasing
the A2 rewards for the incentive participants
• Lowering liquidity and therefore increasing slippage/volatility
• Lowering the price of A2 and reducing rewards in USD denomination
• Diluting token holders who do not choose to take the risk of the incentive
program
This process encourages short-termism with LPs who themselves react to
their IL and underlying volatility regardless of incentive mechanisms on the
secondary market. The existing Uniswap mechanisms of a flat fee makes
small users dramatically overpay for their transactions and incur excessive
fees after compiling gas and slippage.
We know well that the assets in a two-model portfolio are nonstationary and
that the variance of returns is a function of the covariance asset returns and
the correlations of the assets related to their respective weightings within the
portfolio.
σ2
p = w2
1σ2
1 + w2
2σ2
2 + 2w1w2Cov1,2 (7)
where
Cov1,2 = covariance between assets 1 and 2
Cov1,2 = ρ1,2 ∗ σ1 ∗ σ2
and ρ is the correlation between assets 1 and 2.
Just like before, we will substitute Asset 1 with ETH.
σ2
LPUNI
= w2
ETHσ2
ETH + w2
A2
σ2
A2
+ 2wETHwA2 CovETH,A2 (8)
This expression now describes the expected variance of LPUNI and provides
an elementary framework to analyze the positive or negative coefficients of
5
6. the Feepool metric with regards to covariance and correlation of the assets in
the pool. These relationships provide market participants with insight into
yield optimization and bets on pool sizing, how long they want to remain in
a pool, and provide insight into the overall health of token economies and
markets.
Coming next; exploring the following relationships:
• Covariance, correlation, and LP returns
• Volatility and LP commitments
• Optimal scenarios for LP pooling
• Solving IL problems with reward swaps and dynamic properties to the
results of the above testing.
6