AMM
The BSM protocol includes a built-in automated market maker (AMM) that allows users to freely swap between the PGUSD and USDC. Rather than relying on an external exchange, PGUSD holders can convert their holdings to USDC — and USDC holders can acquire PGUSD — directly within the protocol at any time.

The exchange rate is not fixed. Instead it is determined by a StableSwap algorithm, the same family of mathematics used by Curve Finance. Because both S and USDC are designed to be stable-value assets, the algorithm keeps the price tightly anchored near 1:1 while still adjusting naturally when one side of the pool becomes relatively scarce. This means large trades will see very little slippage compared to a standard constant-product AMM.

Every swap incurs a small trading fee (currently 0.04%). This fee is split between the liquidity providers who supply the pool's reserves (earning yield on their idle stable assets) and the protocol admin. The fee is deducted automatically from the output amount — users simply receive slightly less than the gross calculated amount, with no separate fee payment required.
Liquidity providers deposit both PGUSD and USDC into the pool in proportion to the current reserves, and receive LP tokens in return representing their share. When they wish to exit, they burn their LP tokens and receive back their proportional share of the pool — original deposit plus any trading fees that have accumulated. Providing liquidity is therefore a way to earn a passive yield on stable assets.
The AMM is intentionally split into two contracts: AMMSwap handles all the pricing logic, slippage checks, fee calculations, and user-facing functions, while AMMLiquidity is a simpler custody contract that holds the actual token reserves and LP token accounting. Users always interact with AMMSwap; AMMLiquidity only accepts calls from AMMSwap, keeping the asset custody layer as simple and secure as possible.
Note: The current version of the AMM supports PGUSD ↔ USDC trading only. Direct purchase or sale of LPGOLD through the AMM is not available in this release.
Last updated