# Soroswap Finance > Documentation for Soroswap Finance: the DEX, the AMM aggregator and the swap API on Stellar and Soroban. - [Welcome](https://docs.soroswap.finance/index.md): Soroswap Finance is the first DEX and AMM aggregator on Stellar, powered by Soroban smart contracts. - [What is Soroswap Finance?](https://docs.soroswap.finance/what-is-soroswap.md): Soroswap Finance is an open source protocol on Soroban with an AMM, Aggregator, and API. - [Getting Started](https://docs.soroswap.finance/getting-started/index.md): Set up your wallet, connect it to Stellar, add tokens, and manage liquidity on Soroswap to begin using the platform. - [Wallet Setup and Connection](https://docs.soroswap.finance/getting-started/wallet-setup.md): To get started, you need a wallet compatible with the Stellar network and able to interact with Soroban smart contracts. Here's how to choose one and connect it. - [How to Swap](https://docs.soroswap.finance/getting-started/how-to-swap.md): Swapping assets in the Soroswap app: selecting tokens, confirming the trade, and adjusting slippage tolerance. - [Provide Liquidity](https://docs.soroswap.finance/getting-started/provide-liquidity.md): Depositing two assets into a Soroswap pool to earn trading fees, and receiving pool tokens. - [How the Aggregator Works](https://docs.soroswap.finance/getting-started/how-the-aggregator-works.md): The Soroswap Aggregator splits swaps across supported Soroban AMMs on chain to reach the best price. - [Introduction to Soroswap Tokens](https://docs.soroswap.finance/getting-started/soroswap-tokens.md): The Soroswap Token List features verified assets for reliable transactions. - [Adding Tokens to Your Wallet](https://docs.soroswap.finance/getting-started/adding-tokens-to-your-wallet.md): To add a specific token to your Stellar wallet, you need the following asset information. We'll use the example of the USDC token issued by the account mentioned. - [Liquidity Management on Soroswap](https://docs.soroswap.finance/getting-started/liquidity-management.md): Managing Soroswap liquidity: wallet setup, adding liquidity to a pool, and withdrawing your share. - [Bridging Tokens to Stellar Blockchain](https://docs.soroswap.finance/getting-started/bridging-tokens.md): How assets from other chains reach Stellar so you can trade them on Soroswap. - [Concepts](https://docs.soroswap.finance/concepts/index.md): The conceptual toolkit behind Soroswap: AMMs, liquidity pools, swaps, fees, routing and the Stellar primitives they build on. - [AMM](https://docs.soroswap.finance/concepts/amm.md): Soroswap.Finance is an AMM that has its own Liquidity Pools, independent of other AMMs out there like the Stellar Classic DEX or Phoenix - [Liquidity Pools](https://docs.soroswap.finance/concepts/liquidity-pools.md): Liquidity pools as markets for a token pair, covering pool tokens, fees, and why pools replace order books. - [Swap](https://docs.soroswap.finance/concepts/swap.md): Swapping Stellar assets through Soroswap AMMs or the Aggregator, and the constant product formula behind pricing. - [Fees](https://docs.soroswap.finance/concepts/fees.md): The 0.3% swap fee paid to liquidity providers, and the potential future 0.05% protocol fee. - [Slippage](https://docs.soroswap.finance/concepts/slippage.md): Slippage tolerance in Soroswap: what it protects against, and the auto and custom settings. - [Router](https://docs.soroswap.finance/concepts/router.md): The Router finds direct and multi hop swap routes across liquidity pools and validates known tokens. - [SDEX](https://docs.soroswap.finance/concepts/sdex.md): Stellar's native order book exchange, how it differs from Soroswap AMMs, and why the aggregator excludes it. - [Aggregator](https://docs.soroswap.finance/concepts/aggregator.md): An aggregator aggregates several Soroban-based AMM (AMM based on Smart Contracts in the Stellar Blockchain) - [Bridge](https://docs.soroswap.finance/concepts/bridge.md): What a blockchain bridge is, and how assets from other chains reach Stellar so Soroswap can trade them. - [Trustlines](https://docs.soroswap.finance/concepts/trustlines.md): Trustlines authorize an account to hold a Stellar asset, required for pool participation and swaps. - [Oracles](https://docs.soroswap.finance/concepts/oracles.md): The on-chain price oracle problem, cumulative price accumulators, time weighted average prices, and manipulation resistance. - [Flash Swaps](https://docs.soroswap.finance/concepts/flash-swaps.md): Withdrawing pool reserves with no upfront capital, repaying within the same transaction, with arbitrage and leverage examples. - [Advanced Topics](https://docs.soroswap.finance/concepts/advanced/index.md): In-depth material on Soroswap pricing, returns, security and open research questions. - [Pricing](https://docs.soroswap.finance/concepts/advanced/pricing.md): How pool reserves determine swap prices, and how to price exact input and exact output trades safely. - [Understanding Returns](https://docs.soroswap.finance/concepts/advanced/understanding-returns.md): Liquidity provider returns and impermanent loss, explained with a worked example and price ratio figures. - [Security](https://docs.soroswap.finance/concepts/advanced/security.md): Audit and bug bounty details, plus the static and dynamic risks of integrating with pair contracts. - [Research](https://docs.soroswap.finance/concepts/advanced/research.md): A curated selection of academic papers and articles on automated market maker design and returns. - [Tutorials](https://docs.soroswap.finance/tutorials/index.md): Step-by-step walkthroughs of the Soroswap app: wallet setup, swapping, providing liquidity and working with Stellar Classic assets. - [Soroswap Testnet Overview](https://docs.soroswap.finance/tutorials/soroswap-testnet-overview.md): Overview of Soroswap as an AMM on Stellar, its main sections and benefits, and what you can try on testnet. - [Installing Freighter](https://docs.soroswap.finance/tutorials/installing-freighter.md): Installing the Freighter browser wallet, securing the recovery phrase, and choosing which Stellar network to use. - [Soroswap sections](https://docs.soroswap.finance/tutorials/soroswap-sections.md): Tour of the Soroswap interface: the Balance, Swap, and Liquidity sections and what each does. - [Adding Liquidity](https://docs.soroswap.finance/tutorials/adding-liquidity.md): Step by step walkthrough for supplying liquidity to a Soroswap pool, including minting test tokens on testnet. - [Doing Swap](https://docs.soroswap.finance/tutorials/doing-swap.md): Performing a token swap on Soroswap, covering wallet connection, trustlines, confirmation, and best practices. - [Remove Liquidity](https://docs.soroswap.finance/tutorials/remove-liquidity.md): Removing liquidity from a Soroswap pool, from selecting a position to confirming the transaction. - [Using Stellar Classic Assets](https://docs.soroswap.finance/tutorials/stellar-classic-assets/index.md): Index of the guides for wrapping, swapping, and testing Stellar Classic assets on Soroswap. - [Wrapping Stellar Classic Assets](https://docs.soroswap.finance/tutorials/stellar-classic-assets/wrapping.md): Why Stellar Classic assets need a Stellar Asset Contract to work with Soroban, and how to wrap one from Soroswap. - [Swap Stellar Classic Assets](https://docs.soroswap.finance/tutorials/stellar-classic-assets/swapping.md): Swapping Stellar Classic assets on Soroswap by pasting a CODE:ISSUER pair or Soroban address. - [Test Stellar Classic Assets](https://docs.soroswap.finance/tutorials/stellar-classic-assets/testing.md): Getting test tokens from the random_tokens API endpoint and testing asset wrapping on testnet. - [Importing Testnet Tokens](https://docs.soroswap.finance/tutorials/stellar-classic-assets/importing-testnet-tokens.md): Breakdown of the Bash script that imports and wraps Stellar Classic testnet assets for Soroban. - [Conclusions](https://docs.soroswap.finance/tutorials/conclusions.md): Summary of the Soroswap guide: interface, adding liquidity, swapping tokens, removing liquidity, and where to go next. - [Support & Resources](https://docs.soroswap.finance/resources/index.md): Here you will find all the information you need to solve your doubts, get help, and access educational materials to make the most of our platform. - [About Us](https://docs.soroswap.finance/resources/about-us.md): Soroswap's mission, core values, and community channels, built on Stellar by PaltaLabs. - [General FAQ](https://docs.soroswap.finance/resources/general-faq.md): Common questions about Soroswap, including what the protocol is and how to connect a wallet. - [Additional Resources](https://docs.soroswap.finance/resources/additional-resources.md): Official Soroswap links: website, analytics, GitHub, Discord, Twitter, LinkedIn, YouTube, and blogs. - [Partnerships](https://docs.soroswap.finance/resources/partnerships/index.md): Who Soroswap works with, starting with the indexers behind its data. - [Collaboration with Mercury and SubQuery](https://docs.soroswap.finance/resources/partnerships/mercury-subquery.md): Soroswap's work with the Mercury and SubQuery indexers, with setup steps for both. - [Business Partnerships](https://docs.soroswap.finance/resources/partnerships/business-partnerships.md): How to reach the Soroswap team about integrations, listings and commercial work. - [Soroswap API](https://docs.soroswap.finance/api/index.md): Overview of the Soroswap API: quotes, routing, token data, transaction building, and API key access. - [Quick Start Guide - Soroswap API Integration](https://docs.soroswap.finance/api/quickstart.md): Fast Soroswap API integration for experienced developers: API key setup and the quote, build, sign, send flow. - [Soroswap Integration Guide for Beginners](https://docs.soroswap.finance/api/beginner-guide.md): Step by step tutorial building a swap app with Freighter wallet and the Soroswap API. - [Gasless Trustline](https://docs.soroswap.finance/api/gasless-trustline.md): Sponsored trustline creation bundled into a single SDEX swap, so users onboard without holding XLM. - [Optimal Route](https://docs.soroswap.finance/api/optimal-route.md): Soroswap's optimal routing architecture, with background on how Uniswap, PancakeSwap, and 1inch route swaps. - [Soroswap AMM (DEX)](https://docs.soroswap.finance/amm/index.md): The Soroswap AMM: the constant-product liquidity pool protocol that swaps happen on, written in Rust for Soroban. - [How Soroswap AMM works](https://docs.soroswap.finance/amm/how-it-works.md): Soroswap AMM basics: constant product formula, liquidity pools, pool tokens, and the 0.30% fee. - [Ecosystem Participants](https://docs.soroswap.finance/amm/ecosystem-participants.md): Roles in the Soroswap ecosystem: liquidity providers, traders, developers, and the team and community. - [Glossary](https://docs.soroswap.finance/amm/glossary.md): Definitions of key Soroswap and automated market maker terms used across the documentation. - [Audits](https://docs.soroswap.finance/amm/audits.md): Link to the OtterSec security audit report for the Soroswap core protocol. - [Technical Reference](https://docs.soroswap.finance/amm/technical-reference/index.md): Pair and Factory contracts of the Soroswap protocol, a Rust implementation inspired by UniswapV2. - [Smart contracts](https://docs.soroswap.finance/amm/technical-reference/contracts/index.md): Map of Soroswap core and periphery contracts: factory, pairs, library, and router. - [SoroswapPair](https://docs.soroswap.finance/amm/technical-reference/contracts/soroswap-pair.md): SoroswapPair contract interface: deposit, swap, withdraw, reserves, and the standard token functions. - [SoroswapFactory](https://docs.soroswap.finance/amm/technical-reference/contracts/soroswap-factory.md): SoroswapFactory contract overview and interface for creating and indexing one pair per token pair. - [SoroswapRouter](https://docs.soroswap.finance/amm/technical-reference/contracts/soroswap-router.md): SoroswapRouter contract interface and functions for liquidity management, token swapping, and price quoting. - [SoroswapLibrary](https://docs.soroswap.finance/amm/technical-reference/contracts/soroswap-library.md): SoroswapLibrary crate: how to add it, and reference for its pricing and helper functions. - [Deployed Addresses](https://docs.soroswap.finance/amm/technical-reference/deployed-addresses.md): Mainnet contract addresses for SoroswapFactory and SoroswapRouter, plus where to find Testnet addresses. - [Error Codes](https://docs.soroswap.finance/amm/technical-reference/error-codes.md): Error codes returned by the SoroswapPair, SoroswapFactory, and SoroswapRouter contracts. - [Design Decisions](https://docs.soroswap.finance/amm/technical-reference/design-decisions.md): Notable Soroswap protocol design decisions: how pairs receive tokens, and minimum liquidity burning. - [Smart Contract Integration](https://docs.soroswap.finance/amm/technical-reference/smart-contract-integration.md): Calling the SoroswapRouter from your own Soroban contract, with the client import and authorization it needs. - [Using Soroswap with TypeScript](https://docs.soroswap.finance/amm/technical-reference/using-soroswap-with-typescript.md): Swapping and managing liquidity from TypeScript with the official @soroswap/sdk, from quote to signed transaction. - [Soroswap vs UniswapV2](https://docs.soroswap.finance/amm/technical-reference/vs-uniswap-v2/index.md): Feature by feature comparison table between UniswapV2 and Soroswap. - [SoroswapPair Comparison](https://docs.soroswap.finance/amm/technical-reference/vs-uniswap-v2/pair.md): Function by function comparison of SoroswapPair with the UniswapV2Pair contract, and what differs. - [SoroswapRouter Comparison](https://docs.soroswap.finance/amm/technical-reference/vs-uniswap-v2/router.md): Comparison of SoroswapRouter with UniswapV2Router02: native token handling, deadlines, permit, and transfer fees. - [SoroswapLibrary Comparison](https://docs.soroswap.finance/amm/technical-reference/vs-uniswap-v2/library.md): How UniswapV2Library functions are implemented in Rust for the SoroswapLibrary contract. - [Deploy Soroswap Yourself](https://docs.soroswap.finance/amm/technical-reference/deploy-yourself/index.md): Running the Soroswap contracts yourself: the quickstart from soroswap/core, and where the deploy scripts put their output. - [Soroswap Aggregator](https://docs.soroswap.finance/aggregator/index.md): The Soroswap Aggregator splits a single trade across several Soroban AMMs to get the best execution. - [Supported AMMs](https://docs.soroswap.finance/aggregator/supported-amms.md): Stellar AMMs covered by Soroswap: Soroswap AMM, Phoenix AMM, and Aquarius, which is coming soon. - [Audits](https://docs.soroswap.finance/aggregator/audits.md): The Soroswap Aggregator Smart Contracts are being audited by Runtime Verification - [Technical Reference](https://docs.soroswap.finance/aggregator/technical-reference/index.md): How the Soroswap Aggregator is built: its operation, design, adapter model and the protocols it draws on. - [How Soroswap Aggregator works](https://docs.soroswap.finance/aggregator/technical-reference/how-it-works.md): Aggregator architecture, adapters, DexDistribution calculation, and the operational flow of a swap. - [Design](https://docs.soroswap.finance/aggregator/technical-reference/design.md): Design paper for the Soroswap Aggregator: swap function, optimization algorithm, and development considerations. - [Technical Overview](https://docs.soroswap.finance/aggregator/technical-reference/technical-overview.md): Aggregator contract structure, optimization algorithm, DEX management, and the DexDistribution struct explained. - [Aggregator Operation](https://docs.soroswap.finance/aggregator/technical-reference/operation.md): Aggregator initialization, swap functions, distribution math, administrative functions, and the adapter interface. - [Smart Contracts](https://docs.soroswap.finance/aggregator/technical-reference/contracts/index.md): The two contracts behind the aggregator: the aggregator itself and the adapter each supported protocol is reached through. - [SoroswapAggregator](https://docs.soroswap.finance/aggregator/technical-reference/contracts/soroswap-aggregator.md): The aggregator contract: its adapter registry, admin functions and the two swap entry points that split a trade. - [Adapter Trait](https://docs.soroswap.finance/aggregator/technical-reference/contracts/adapter-trait.md): AdapterTrait, the interface every protocol adapter implements so the aggregator can route through it. - [SoroswapAdapter](https://docs.soroswap.finance/aggregator/technical-reference/contracts/soroswap-adapter.md): The adapter that lets the aggregator route a trade through the Soroswap AMM router. - [Cross-Contract Integration](https://docs.soroswap.finance/aggregator/technical-reference/cross-contract-integration.md): Calling the Soroswap Aggregator from another Soroban contract, and what the distribution argument has to contain. - [Inspirations](https://docs.soroswap.finance/aggregator/technical-reference/inspirations/index.md): Prior aggregator designs the Soroswap Aggregator draws on. - [1inch](https://docs.soroswap.finance/aggregator/technical-reference/inspirations/1inch.md): Study of the 1inch OneSplit contract: getExpectedReturn, best distribution search, and swap execution. - [Other AMMs in Soroban](https://docs.soroswap.finance/aggregator/technical-reference/other-amms/index.md): The other Soroban AMMs the Soroswap Aggregator routes into. - [Phoenix Protocol](https://docs.soroswap.finance/aggregator/technical-reference/other-amms/phoenix.md): Phoenix Protocol Multihop swap parameters, the Swap struct, its implementation, and the factory contract. - [Disclaimer](https://docs.soroswap.finance/aggregator/disclaimer.md): Risks of protocol and token upgrades when the Aggregator calls subcontracts, plus user guidance. ## Optional - [API Reference](https://api.soroswap.finance/docs) - [Dune Dashboard](https://dune.com/paltalabs/soroswap) - [GitHub](https://github.com/soroswap) - [Discord](https://discord.gg/A2rQ3cm9XG)