Review Summary: An analysis of Uniswap markets
An analysis of Uniswap markets. [PDF]
Guillermo Angeris (Stanford University), Hsien-Tang Kao (Gauntlet), Rei Chiang (Gauntlet), Charlie Noyes (Paradigm), Tarun Chitra (Gauntlet)
(‡ accepted for both conference and journal)
Paper summaries from the reviewers:
“This paper gives an formal analysis of the Uniswap constant product market. A constant product market is a market for trading coins of type a for coins of type b, with the constraints (R_a - \Delta_a)(R_b - c \Delta_b), where R_a and R_b are the market’s reserves in a and b respectively and 1 - c is the percentage fee. The definition can also be generalized to a market trading multiple types of coins. The authors derive formulas that predict the stability of such markets under different conditions, in particular showing that the markets must closely track the reference market price. The authors validate their work with mathematical proofs followed by simulations that mimic the conditions found in Uniswap. This last provides evidence that the assumptions behind the mathematical models are realistic.”
“This paper provides a formal model constant product markets, compares them constant mean markets and then make some observations regarding the economic properties of such systems.”
Comments on the strength of the paper:
“Appropriate use of agent based modeling for verification, this is a very good paper in that regard.”
“The paper is well-written, and makes a good case for the validity of its results. The results are not only of theoretical interest but have practical implications for those who need to make decisions about how to implement a constant product market.”
Critiques & author responses:
Thank you to both reviewers for the comments! We attempted to address many of them, and we think the resulting manuscript is certainly better.
Comment 1: The paper is well-written, and makes a good case for the validity of its results. The results are not only of theoretical interest but have practical implications for those who need to make decisions about how to implement a constant product market.
Response: Thank you so much for this comment!
Comment 2: Not clear to me to what extent this applies only to Uniswap and to what extent this applies to any constant product market.
Response: Apologies for the confusion. In this case Uniswap is a specific instance of a constant product market with γ = 0.997. The simulations apply only to Uniswap, while the remainder of the analysis applies to any constant product market.
Comment 3: Could have used more comparison with related work on other types of decentralized exchanges, e.g. [WB17] and [HBB17]
Response: Thanks for this comment! We have expanded the introduction to account for this. We have also added a specific paragraph directly comparing other available DEXs (Comparison with other DEXs in the introduction).
Comment 4: I think the model would be improved if you included the cost of borrowing coins of type b. Our could this be included in the percentage fee? Perhaps not because the cost of borrowing might vary.
Response: We did not include this explicitly, but it is a direct application of the extensions in section 2.2, i.e., such a cost can be factored into the function f defined in this section.
Comment 5: Very clear and well structured. It's good to see agent based modeling applied in the blockchain context. It wasn't immediately clear to me if the agents were adaptive or not.
Response: Thank you so much! We hope agent based modeling becomes more prevalent in the blockchain community. Not all agents are adaptive, but the rational liquidity providers are adaptive in the sense that the agents optimize a specific value function based on historical observations of market data. Arbitrageurs need not be adaptive, since they simply solve the arbitrage problem at every time step (and this is optimal for an arbitrageur, as is shown). Similarly, traders also need not be adaptive, since they represent exogenous demand for liquidity.
Comment 6: There appears to be a clear bias in the construction of agents; in particular griefing attacks, which are the ones we should be most worried about, were not analyzed.
Response: This is a very good point! We have added a new paragraph giving lower bounds for the cost of griefing attacks (Cost of manipulation in section 2.3). Appendix E gives a complete derivation.
Comment 7: Similarly, it's unclear that profitable attacks of longer routes were considered at all.
Response: We did not touch upon this point in the original iteration, but have added a paragraph explaining this (Splitting trades is more expensive in section 2.3). Appendix D gives a derivation. Since splitting trades in any way is at least as expensive as performing a complete trade, an arbitrageur's optimal strategy in the current scenario is to directly execute the trade given by a solution to the no-arbitrage problem.
Comment 8: The citations seem fine. I would like to see more auction theory supporting their argument, and deeper agent based modeling citations.
Response: Thank you for this comment! We have added a few citations in the context of Ethereum primitives and downsides of centralized exchanges along with some references to traditional order-book type methods in the introduction.
Comment 9: The analysis of Initial liquidity provider returns seems to be far more negative than the paper implies.
Response: This is a fair point and we touch upon it in the last paragraph. We note that rational agents would only be initial liquidity providers if there is an expectation that the relative price of the coins has zero drift.