  We develop a new type of automated market maker (AMM) that helps to maintain
stability and long-term viability in a stablecoin. This primary market AMM
(P-AMM) is an autonomous mechanism for pricing minting and redemption of
stablecoins in all possible states and is designed to achieve several desirable
properties. We first cover several case studies of current ad hoc stablecoin
issuance and redemption mechanisms, several of which have contributed to recent
stablecoin de-peggings, and formulate desirable properties of a P-AMM that
support stability and usability. We then design a P-AMM redemption curve and
show that it satisfies these properties, including bounded loss for both the
protocol and stablecoin holders. We further show that this redemption curve is
path independent and has properties of path deficiency in extended settings
involving trading fees and a separate minting curve. This means that system
health weakly improves relative to the path independent setting along any
trading curve and that there is no incentive to strategically subdivide
redemptions. Finally, we show how to implement the P-AMM efficiently on-chain.
