Chapter 32: Further Reading — Building a Platform from Scratch

An annotated bibliography of resources for deepening your understanding of prediction market platform engineering, AMM design, and web application architecture.


Market Mechanism Design

1. Hanson, R. (2003). "Combinatorial Information Market Design." Information Systems Frontiers, 5(1), 107-119.

The foundational paper introducing the Logarithmic Market Scoring Rule (LMSR). Hanson derives the cost function, proves the bounded loss property, and shows how scoring rules can be converted into market makers. Essential reading for anyone implementing an LMSR. The mathematical treatment is accessible with undergraduate-level calculus. Pay particular attention to Section 3, which derives the price function as a partial derivative of the cost function.

2. Othman, A., Sandholm, T., Pennock, D., & Reeves, D. (2013). "A Practical Liquidity-Sensitive Automated Market Maker." ACM Transactions on Economics and Computation, 1(3), Article 14.

Introduces the Liquidity-Sensitive LMSR (LS-LMSR), which dynamically adjusts the liquidity parameter $b$ based on trading volume. This addresses one of the LMSR's key limitations: that $b$ must be set in advance. The LS-LMSR increases $b$ as more money flows into the market, automatically providing more liquidity when demand is high. Directly relevant to platform builders who want adaptive market mechanisms.

3. Chen, Y. & Pennock, D. (2007). "A Utility Framework for Bounded-Loss Market Makers." Proceedings of the 23rd Conference on Uncertainty in Artificial Intelligence (UAI).

Provides a unified theoretical framework connecting cost-function-based market makers (like LMSR) to utility theory. This paper helps explain why the LMSR works well: it corresponds to a risk-neutral market maker with a specific utility function. Useful for understanding the theoretical foundations before extending or modifying the LMSR.

4. Abernethy, J., Chen, Y., & Vaughan, J.W. (2013). "Efficient Market Making via Convex Optimization, and a Connection to Online Learning." ACM Transactions on Economics and Computation, 1(2), Article 12.

Establishes a deep connection between automated market making and online convex optimization. Shows that the LMSR is equivalent to performing online gradient descent with an entropic regularizer. This perspective is valuable for platform builders who want to understand the computational properties of their AMM and potentially design custom market makers with specific learning-theoretic guarantees.


Web Application Architecture

5. Ramirez, S. (2024). FastAPI Documentation and Tutorial. https://fastapi.tiangolo.com/

The official FastAPI documentation remains the best resource for learning the framework. The tutorial walks through dependency injection, Pydantic models, authentication, and database integration. The "Advanced User Guide" covers WebSocket support, background tasks, and middleware—all directly applicable to prediction market platforms. Bookmark the sections on OAuth2 with JWT and SQL databases.

6. Percival, H. & Gregory, B. (2020). Architecture Patterns with Python. O'Reilly Media.

Covers the service layer pattern, repository pattern, and unit of work pattern that we use in our platform architecture. The book uses Python examples throughout and discusses how to keep business logic independent of web frameworks and databases. Chapter 6 on the service layer and Chapter 7 on the unit of work are particularly relevant to structuring a prediction market backend.

7. Richardson, C. (2018). Microservices Patterns. Manning Publications.

While our platform is a monolith (appropriate for its scale), this book describes patterns for decomposing it into microservices as it grows. Relevant patterns include the API Gateway, Saga pattern for distributed transactions (important when order matching and balance updates must be atomic), and Event Sourcing (useful for reconstructing order book state). Read selectively based on your scaling needs.


Order Book Implementation

8. Johnson, B. (2010). Algorithmic Trading and DMA: An Introduction to Direct Access Trading Strategies. 4Myeloma Press.

The most practical guide to order book mechanics and matching engine design. Covers price-time priority, pro-rata matching, and various order types (stop orders, iceberg orders, fill-or-kill). Chapters 4-6 provide the theory behind our order book implementation. While focused on equity markets, the matching logic applies directly to prediction markets.

9. Cartea, A., Jaimungal, S., & Penalva, J. (2015). Algorithmic and High-Frequency Trading. Cambridge University Press.

A rigorous treatment of order book dynamics, market microstructure, and optimal execution. Chapter 2 provides the mathematical framework for modeling order books, including the concept of order flow toxicity that is relevant to detecting manipulation in prediction markets. More mathematical than Johnson but provides deeper insights for advanced readers.


Prediction Markets: Practice and Policy

10. Arrow, K., Forsythe, R., Gorham, M., et al. (2008). "The Promise of Prediction Markets." Science, 320(5878), 877-878.

A concise manifesto by leading economists arguing for the legalization and broader use of prediction markets. Provides context for why building these platforms matters—they aggregate information more effectively than polls, expert panels, or management estimates. Essential background for anyone building a platform and needing to justify its existence.

11. Wolfers, J. & Zitzewitz, E. (2004). "Prediction Markets." Journal of Economic Perspectives, 18(2), 107-126.

A comprehensive survey of prediction market theory and empirical evidence. Covers calibration, manipulation resistance, and comparison with other forecasting methods. Particularly useful for understanding the accuracy claims you can make about your platform and how to measure them. The discussion of manipulation (Section V) informs platform security design.

12. Snowberg, E., Wolfers, J., & Zitzewitz, E. (2013). "Prediction Markets for Economic Forecasting." Handbook of Economic Forecasting, Vol. 2, 657-687.

A thorough review of prediction markets as economic forecasting tools, covering both successes and failures. Discusses the "favorite-longshot bias" (a systematic miscalibration where unlikely outcomes are overpriced) that platform operators should be aware of. The bias has implications for LMSR parameter selection and market design.


Security and Authentication

13. Jones, M., Bradley, J., & Sakimura, N. (2015). "JSON Web Token (JWT)." RFC 7519, Internet Engineering Task Force.

The official specification for JWT. While the libraries handle most implementation details, reading the RFC helps you understand the security model: what the signature guarantees, what it does not guarantee (encryption of the payload), and the importance of proper algorithm selection (always use asymmetric keys in production). Short enough to read in an afternoon.

14. OWASP Foundation. (2024). OWASP API Security Top 10. https://owasp.org/www-project-api-security/

The definitive guide to API security vulnerabilities. Covers broken authentication, excessive data exposure, lack of rate limiting, and injection attacks—all directly relevant to prediction market platforms that handle user funds. Use this as a checklist before deploying your platform. Pay special attention to API1 (Broken Object Level Authorization) and API2 (Broken Authentication).


Platform Operations

15. Kleppmann, M. (2017). Designing Data-Intensive Applications. O'Reilly Media.

The best single book on building reliable, scalable data systems. Chapters 7 (Transactions) and 11 (Stream Processing) are directly relevant to prediction market platforms: transactions ensure that balance updates and trade executions are atomic, while stream processing enables real-time price feeds. Chapter 5 on replication is essential reading before scaling beyond a single database server. This book bridges the gap between our Chapter 32 prototype and the production concerns covered in Chapter 33.