These notebooks demonstrate some basic implementations of market mechanisms using a convex optimization framework. The implementations are formulated as Disciplined Convex Programming problems, and solved with the splitting conic solver.
The cpcam.ipynb notebook implements a Convex Parimutuel Call Auction Mechanism (CPCAM). The lmsr-convex-max-entropy.ipynb notebook implements the Logarithmic Market Scoring Rule (LMSR) as a convex optimization problem. The LCMM-olympic-medals-example.ipynb notebook implements a Linearly-Constrained Market Maker (LCMM).
These notebooks are a follow-up to my paper Smart Markets for Stablecoins.