RaumFi v2 Overview
Technical overview for RaumFi v2, a Stellar Soroban constant-product AMM with factory, pair, router, LP token, and multi-hop swap components.
RaumFi v2 follows the same swap model as Uniswap V2: liquidity providers deposit two tokens into a pair, traders swap against that pool, and price moves along a constant-product curve (x * y = k). Every swap carries a 0.3% fee, taken from the input amount and left in the pool's reserves for liquidity providers.
The contracts live under corecontracts/ as four independent Soroban crates - there is no separate math/library crate; pricing math is duplicated locally inside the pair and router crates instead:
raumfi-factory- deploys new pair contracts at a deterministic address and keeps a registry of every pair created.raumfi-pair- the AMM for one token pair. Holds reserves, executesdeposit/swap/withdraw, and embeds its own SEP-41 LP token implementation directly in the contract (pair_tokenmodule) rather than deploying a separate token contract per pair.raumfi-router- the entry point integrators call:add_liquidity,remove_liquidity, and multi-hop swaps. Computes deterministic pair addresses locally viarouter_pair_forinstead of calling back into the factory on every read.rntoken- a standalone SEP-41 token contract, imported by the pair crate's test suite to act as the underlying assets in a pool (not deployed as part of the protocol itself).
The workspace was audited by QuillAudits; the audit report ships in the repository under audit/. The branch documented here, Audit_Inital_A2_Fix, contains the fixes applied after that review.
Audit_Inital_A2_Fix) - Live app: v1.dex.raum.networkTechnical FAQ
What is RaumFi v2?
RaumFi v2 is a Stellar Soroban constant-product automated market maker that follows the same pricing model as Uniswap v2.
What contracts make up RaumFi v2?
The docs describe factory, pair, router, and token crates under the contract workspace.
What swap fee is documented?
The current docs state that every swap carries a 0.3% fee taken from the input amount and retained in reserves for liquidity providers.
Does RaumFi v2 use concentrated liquidity?
No. RaumFi v2 is documented as a constant-product AMM. Concentrated liquidity is documented under RaumFi v3.
Who should use these docs?
Soroban integrators, protocol engineers, auditors, and developers evaluating RaumFi v2 contract behavior should use these docs.