SlideShare a Scribd company logo
1 of 6
Download to read offline
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
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
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
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
• 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
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

More Related Content

Similar to Amm.final

OpenZeppelin Audit of Origin Dollar (OUSD)
OpenZeppelin Audit of Origin Dollar (OUSD)OpenZeppelin Audit of Origin Dollar (OUSD)
OpenZeppelin Audit of Origin Dollar (OUSD)Origin Protocol
 
Ripple mms
Ripple mmsRipple mms
Ripple mmsGcc Ny
 
Fm11 ch 09 the cost of capital
Fm11 ch 09 the cost of capitalFm11 ch 09 the cost of capital
Fm11 ch 09 the cost of capitalNhu Tuyet Tran
 
Fm11 ch 09 show
Fm11 ch 09 showFm11 ch 09 show
Fm11 ch 09 showAdi Susilo
 
Interest rate swaps, caps.....
Interest rate swaps, caps.....Interest rate swaps, caps.....
Interest rate swaps, caps.....StudsPlanet.com
 
Interest rate swaps, caps.....
Interest rate swaps, caps.....Interest rate swaps, caps.....
Interest rate swaps, caps.....Nits Kedia
 
#CFA: Revise entire CFA syllabus 6 days-Alt. Inv., Portfolio Mgt., Derivatives
#CFA: Revise entire CFA syllabus 6 days-Alt. Inv., Portfolio Mgt., Derivatives#CFA: Revise entire CFA syllabus 6 days-Alt. Inv., Portfolio Mgt., Derivatives
#CFA: Revise entire CFA syllabus 6 days-Alt. Inv., Portfolio Mgt., Derivatives13 Llama Interactive
 
Cryptochrome - Community Staking and Liquidity Mining Platform
Cryptochrome - Community Staking and Liquidity Mining PlatformCryptochrome - Community Staking and Liquidity Mining Platform
Cryptochrome - Community Staking and Liquidity Mining PlatformCHMOnline
 
07 cf3 sm ch07
07 cf3 sm ch0707 cf3 sm ch07
07 cf3 sm ch07Wahyu7Naga
 
3.Risk & Rates of Return.pdf
3.Risk & Rates of Return.pdf3.Risk & Rates of Return.pdf
3.Risk & Rates of Return.pdfKhlk3
 
IFRS 13 CVA DVA FVA and the Implications for Hedge Accounting - By Quantifi a...
IFRS 13 CVA DVA FVA and the Implications for Hedge Accounting - By Quantifi a...IFRS 13 CVA DVA FVA and the Implications for Hedge Accounting - By Quantifi a...
IFRS 13 CVA DVA FVA and the Implications for Hedge Accounting - By Quantifi a...Quantifi
 
Fm11 ch 25 mergers, lb os, divestitures, and holding companies
Fm11 ch 25 mergers, lb os, divestitures, and holding companiesFm11 ch 25 mergers, lb os, divestitures, and holding companies
Fm11 ch 25 mergers, lb os, divestitures, and holding companiesNhu Tuyet Tran
 
Wacc group presentation
Wacc group presentationWacc group presentation
Wacc group presentationalisher96
 
Learning ObjectivesUpon completion of Chapter 10, you will.docx
Learning ObjectivesUpon completion of Chapter 10, you will.docxLearning ObjectivesUpon completion of Chapter 10, you will.docx
Learning ObjectivesUpon completion of Chapter 10, you will.docxSHIVA101531
 
Uni v2 eth-dai analysis
Uni v2 eth-dai analysisUni v2 eth-dai analysis
Uni v2 eth-dai analysisJonnyHimalaya
 
Financial Management Slides Ch 22
Financial Management Slides Ch 22Financial Management Slides Ch 22
Financial Management Slides Ch 22Sayyed Naveed Ali
 
Portfolio selection final
Portfolio selection finalPortfolio selection final
Portfolio selection finalsumit payal
 

Similar to Amm.final (20)

OpenZeppelin Audit of Origin Dollar (OUSD)
OpenZeppelin Audit of Origin Dollar (OUSD)OpenZeppelin Audit of Origin Dollar (OUSD)
OpenZeppelin Audit of Origin Dollar (OUSD)
 
Ripple mms
Ripple mmsRipple mms
Ripple mms
 
Fm11 ch 09 the cost of capital
Fm11 ch 09 the cost of capitalFm11 ch 09 the cost of capital
Fm11 ch 09 the cost of capital
 
Fm11 ch 09 show
Fm11 ch 09 showFm11 ch 09 show
Fm11 ch 09 show
 
Light paper
Light paper Light paper
Light paper
 
Interest rate swaps, caps.....
Interest rate swaps, caps.....Interest rate swaps, caps.....
Interest rate swaps, caps.....
 
Interest rate swaps, caps.....
Interest rate swaps, caps.....Interest rate swaps, caps.....
Interest rate swaps, caps.....
 
#CFA: Revise entire CFA syllabus 6 days-Alt. Inv., Portfolio Mgt., Derivatives
#CFA: Revise entire CFA syllabus 6 days-Alt. Inv., Portfolio Mgt., Derivatives#CFA: Revise entire CFA syllabus 6 days-Alt. Inv., Portfolio Mgt., Derivatives
#CFA: Revise entire CFA syllabus 6 days-Alt. Inv., Portfolio Mgt., Derivatives
 
Cryptochrome - Community Staking and Liquidity Mining Platform
Cryptochrome - Community Staking and Liquidity Mining PlatformCryptochrome - Community Staking and Liquidity Mining Platform
Cryptochrome - Community Staking and Liquidity Mining Platform
 
07 cf3 sm ch07
07 cf3 sm ch0707 cf3 sm ch07
07 cf3 sm ch07
 
3.Risk & Rates of Return.pdf
3.Risk & Rates of Return.pdf3.Risk & Rates of Return.pdf
3.Risk & Rates of Return.pdf
 
IFRS 13 CVA DVA FVA and the Implications for Hedge Accounting - By Quantifi a...
IFRS 13 CVA DVA FVA and the Implications for Hedge Accounting - By Quantifi a...IFRS 13 CVA DVA FVA and the Implications for Hedge Accounting - By Quantifi a...
IFRS 13 CVA DVA FVA and the Implications for Hedge Accounting - By Quantifi a...
 
Fm11 ch 25 mergers, lb os, divestitures, and holding companies
Fm11 ch 25 mergers, lb os, divestitures, and holding companiesFm11 ch 25 mergers, lb os, divestitures, and holding companies
Fm11 ch 25 mergers, lb os, divestitures, and holding companies
 
Wacc group presentation
Wacc group presentationWacc group presentation
Wacc group presentation
 
Cost of capital
Cost of capital Cost of capital
Cost of capital
 
Learning ObjectivesUpon completion of Chapter 10, you will.docx
Learning ObjectivesUpon completion of Chapter 10, you will.docxLearning ObjectivesUpon completion of Chapter 10, you will.docx
Learning ObjectivesUpon completion of Chapter 10, you will.docx
 
Uni v2 eth-dai analysis
Uni v2 eth-dai analysisUni v2 eth-dai analysis
Uni v2 eth-dai analysis
 
Financial Management Slides Ch 22
Financial Management Slides Ch 22Financial Management Slides Ch 22
Financial Management Slides Ch 22
 
Roberts montes khandate
Roberts montes khandateRoberts montes khandate
Roberts montes khandate
 
Portfolio selection final
Portfolio selection finalPortfolio selection final
Portfolio selection final
 

Recently uploaded

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data SciencePaolo Missier
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxFIDO Alliance
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewDianaGray10
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxFIDO Alliance
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهMohamed Sweelam
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptxFIDO Alliance
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfdanishmna97
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseWSO2
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTopCSSGallery
 

Recently uploaded (20)

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهله
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern Enterprise
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 

Amm.final

  • 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