Fees & rewards
Fees on the ClearPortX DLMM exchange consist of a base fee plus a dynamic fee that adjusts in real-time based on realized volatility. This page documents the exact computation, the distribution flow, and the claim mechanism.
Fee composition
Section titled “Fee composition”The total fee rate on any swap is:
The hard cap at 10% prevents runaway fees during extreme volatility events.
Base fee
Section titled “Base fee”The base fee is a constant set at pool creation. It does not change between swaps.
Typical values:
| Pool | Base fee | Purpose |
|---|---|---|
| CC/cBTC | 0.30% | Standard volatile pair |
| CC/USDC | 0.25% | Lower friction for CC pricing |
| Stablecoin pairs | 0.05% | Tight spreads for pegged assets |
Variable fee (volatility-adjusted)
Section titled “Variable fee (volatility-adjusted)”The variable fee grows with the square of the volatility accumulator — a value that stacks during rapid successive swaps and decays over time:
where is the volatility accumulator and is the bin step (e.g., 0.01 for a 1% bin width).
The quadratic relationship means that a swap crossing one bin adds a negligible variable fee, while a trade that pushes through many bins or arrives during a burst of rapid trading pays a meaningful premium:
| Bins crossed | Variable fee | Total (0.30% base) | |
|---|---|---|---|
| 1 (calm) | 1.0 | 0.01% | 0.31% |
| 3 (moderate) | 3.0 | 0.09% | 0.39% |
| 5 (volatile) | 5.0 | 0.25% | 0.55% |
| 10 (turbulent) | 10.0 | 1.00% | 1.30% |
Why dynamic fees on a MEV-free chain
Section titled “Why dynamic fees on a MEV-free chain”Canton Network structurally prevents MEV — there is no public mempool, and the sequencer cannot see transaction content. So the usual motivation for dynamic fees (penalizing sandwich attacks) does not apply.
ClearPortX uses dynamic fees for a different reason: LP income optimization. During volatile periods, liquidity providers absorb more impermanent loss. A higher fee during those periods compensates them proportionally, which keeps liquidity present when the market needs it most.
See Dynamic fees for the full volatility accumulator decay model.
Fee distribution
Section titled “Fee distribution”Every fee collected splits between liquidity providers and the protocol:
| Destination | Share | Purpose |
|---|---|---|
| LPs in the crossed bins | 90–95% | Pro-rata by bin shares, claimable anytime |
| Protocol treasury | 5–10% | Funds CPX staker revenue, development, security audits |
The protocolFee parameter is set per pool and is visible in the pool detail view.
How fees accrue per bin
Section titled “How fees accrue per bin”When a swap traverses a bin, the fee for that bin is computed and added to the bin’s feeEarnedBase or feeEarnedQuote accumulator. Each LP in that bin is entitled to a share proportional to their liquidity:
This means:
- Fees accrue per bin, not per pool — LPs who placed liquidity in the active bin earn more than those in distant bins.
- The Curve strategy earns more fees per dollar of TVL than Spot (because Curve concentrates capital where swaps happen).
- Fees accumulate continuously and do not expire.
Claiming fees
Section titled “Claiming fees”Via the API
Section titled “Via the API”# View claimable feesGET /api/pools/:poolId/fees/:partyId
# Claim all earned feesPOST /api/pools/:poolId/fees/claimContent-Type: application/json
{ "party": "your-party::namespace" }The claim endpoint:
- Reads your LP shares in each bin of the pool.
- Computes your pro-rata share of accumulated fees per bin.
- Deducts those fees from the bin accumulators.
- Credits the claimed amounts to your internal balance (if registered) or returns them for manual collection.
Via the dApp
Section titled “Via the dApp”Navigate to the Positions tab, select a pool, and click Claim fees. The dApp calls the same endpoints and shows the fee breakdown per bin before you confirm.
Fee breakdown in swap responses
Section titled “Fee breakdown in swap responses”Every swap response from /api/swap includes a feeBreakdown object:
{ "feeBreakdown": { "baseFee": 0.003, "variableFee": 0.0001, "totalFeeRate": 0.0031, "volatilityAccumulator": 1.5 }}This allows frontends and integrators to display the fee composition transparently — showing users exactly how much they pay in base fee versus volatility premium.
CPX staker revenue
Section titled “CPX staker revenue”The protocol share of all fees flows to the CPX staking module, where it is distributed pro-rata to sCPX holders. See CPX Staking · Overview for the revenue share mechanics.