Concentrated Liquidity AMM
examples/concentrated_amm demonstrates tick-ranged liquidity, swap execution
across active tick bands, fee compounding and testkit budget/storage checks.
Run the example suite:
cargo test -p soroban-testkit-example-concentrated-amm
The contract is #![no_std] and exposes mint_position, burn_position, and
swap entry points. Positions carry owner, tick bounds and liquidity. Minting
requires aligned tick spacing; swapping moves the active tick and updates virtual
reserves while fee-bearing output is deducted.
Test layout
fixtures.rscovers setup, initialization and position lifecycle.assert.rscovers swaps, tick crossings and authorization failures.budget_storage.rscaptures metering and persistent position behavior.proptest.rsproves swap reserve invariants and bounded tick math.
The suite uses every workspace testkit crate:
soroban-testkit-fixturesbuilds isolated environments.soroban-testkit-generatorssupplies property-test strategy patterns.soroban-testkit-corerecords budget baselines.soroban-testkit-assertvalidates wallet and contract behavior.