You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement a Concentrated Liquidity Automated Market Maker for the XRP
Ledger, enabling LPs to concentrate capital within specific price ranges
for up to 4000x capital efficiency improvement over XLS-30.
Ledger entries:
- CLAMM (0x008A): pool state with current tick, sqrt price, liquidity
- CLAMMTick (0x008B): per-tick liquidity and fee growth data
- CLAMMPosition (0x008C): LP position linked to NFToken (XLS-20)
- CLAMMTickBitmap (0x008D): compressed bitmap for tick lookup
Transactions:
- CLAMMCreate (85): create pool with asset pair, fee tier, initial price
- CLAMMDeposit (86): add liquidity within a price range, mint NFToken
- CLAMMWithdraw (87): remove liquidity, burn NFToken on full withdrawal
- CLAMMSwap (88): direct swap through a pool
- CLAMMCollectFees (89): collect accumulated fees without removing liquidity
- CLAMMVote (90): vote on trading fee parameters
- CLAMMBid (91): bid for auction slot (discounted fees, MEV protection)
- CLAMMDelete (92): remove empty pools from ledger
- CLAMMClawback (93): issuer clawback of tokens from CLAMM positions
RPCs: clamm_info, clamm_positions, clamm_ticks, clamm_quote
Integration:
- Payment engine routing through CLAMM pools (CLAMMLiquidity/CLAMMOffer)
- NFToken position transfer with fee settlement
- NFTokenBurn blocked for CLAMM positions
- ValidCLAMM invariant checker
Tests: unit tests, payment routing, tick bitmap, fuzz testing
Spec: XRPLF/XRPL-Standards#498
0 commit comments