Fees
Exact CPMM fee tiers, integer allocation, Shield fee, and where each fee is settled.
Core accepts three CPMM fee tiers: 100, 200 or 300 bps (1%, 2% or 3%). The denominator is 10,000. A pool stores one immutable tier at initialization.
CPMM fee allocation
For input amount A and tier f:
The total fee F is allocated as follows:
| Share | Integer calculation | Destination |
|---|---|---|
| Protocol | floor(F × 5,000 / 10,000), or 50% | Pool's protocol fee vault |
| Creator | floor(F × 2,000 / 10,000), or 20% | Pool's creator fee vault |
| LP | F − protocol − creator, the remaining 30% nominally | Retained in the input-side LP vault |
The LP portion is the remainder after the separately floored protocol and creator values, so it receives integer dust. For a 10,000-unit input at 100 bps, F = 100: 50 protocol, 20 creator and 30 LP units.
The quote uses A − F as pricing input. Actual settlement transfers A − protocolFee − creatorFee into the LP vault; protocol and creator portions go to their respective fee vaults. This is why a fee-adjusted price formula and the post-settlement LP balance are related but not the same expression.
Shield fee
Shield adds a separate 5 bps (0.05%) fee. Core floors amount × 5 / 10,000, transfers the note's exact amount to shielded custody, and transfers the additional fee to the pool's protocol fee vault. A very small Shield can therefore round to a zero fee.
The CPMM trade fee and Shield fee are different charges. Unshield has no separate protocol fee in the frozen Core instruction.
See the implementation-derived CPMM formula and public swap flow.