This article discusses the design and concepts behind the stablecoin crvUSD, including the lending-liquidating amm algorithm (LLAMMA), PegKeeper, and Monetary Policy. The main idea behind LLAMMA is to use a special-purpose AMM to replace liquidations. The article explains how LLAMMA works, including the role of arbitrageurs in buying low and selling high. The article also discusses the Controller and Monetary Policy, including how the debt fraction and PegKeeper work. Risks associated with liquidation are covered, including the unrecoverable loss experienced during soft-liquidation. Strategies for minimizing risk and maximizing borrowing are also discussed.
The most difficult part of Curve stable coin is LLAMMA (AMM for continuous liquidation/deliquidation). LLAMMA refers to some of the principles in Uniswap v3. However, the price in the white paper is different from the mathematics in the Uniswap v3 white paper. We will unify these two projects and try to figure out how Curve CEO designed the algorithm.