Soroswap.Finance Docs
  • Welcome 👋🏼
    • What is Soroswap Finance?
    • Getting Started
      • Wallet Setup and Connection
      • How to Swap
      • Provide Liquidity
      • How the Aggregator Works
  • Concepts
    • AMM
    • Liquidity Pools
    • Swap
    • Fees
    • Slippage
    • Router
    • SDEX
    • Aggregator
    • Trustlines
    • Advanced Topics
      • Pricing
      • Understanding Returns
      • Security
      • Research
  • Soroswap AMM (DEX)
    • How Soroswap AMM works
    • Ecosystem Participants
    • Audits
    • Technical Reference
      • Smart contracts
        • SoroswapPair
        • SoroswapFactory
        • SoroswapRouter
        • SoroswapLibrary
      • Deployed Addresses
      • Error Codes
      • Using Soroswap with TypeScript
      • Smart Contract Integration
      • Deploy Soroswap Yourself
        • Setup your environment.
        • Experiment the Pair contract
        • Experiment the Factory Contract.
        • Deployments.
        • Using the Soroswap Testnet
    • Glossary
  • Soroswap Aggregator
    • Supported AMMs
    • Audits
    • Technical Reference
      • How Soroswap Aggregator works
      • Design
      • Technical Overview
      • Aggregator Operation
      • Smart Contracts
        • SoroswapAggregator
        • Adapter Trait
        • SoroswapAdapter
      • Inspirations
        • 1inch
      • Other AMMs in Soroban
        • Phoenix
    • Disclaimer
  • Swap Route API
  • Soroswap Info
  • Tutorials
    • Installing Freighter
    • Soroswap sections
    • Adding Liquidity
    • Doing Swap
    • Remove Liquidity
    • Using Stellar Classic Assets
      • Wrapping Stellar Classic Assets
      • Swap Stellar Classic Assets
      • Test Stellar Classic Assets
    • Bridge using Pendulum
    • Conclusions
  • Partnerships
    • Collaboration with Mercury and SubQuery
    • Business Partnerships
  • Support & Resources
    • About Us
    • General FAQ
    • Additional Resources
Powered by GitBook
On this page
  • What is a Trustline?
  • How Trustlines Function
  • Trustlines for Liquidity Pools
  • Trustlines for Performing Swaps
Edit on GitHub
  1. Concepts

Trustlines

PreviousAggregatorNextAdvanced Topics

Last updated 9 days ago

In Soroswap Finance, a trustline is an essential mechanism that allows your account on the Stellar network to hold and exchange a specific asset. This process is crucial for interacting with the assets you wish to trade on the platform.

What is a Trustline?

A is an explicit authorization that you establish between your account and an issuing account of an asset on the Stellar network. Essentially, it tells Stellar that you trust a specific issuer to allow your account to receive and handle that asset. Without an appropriate trustline, you cannot hold or trade that asset within your account.

How Trustlines Function

  • Holding Assets: To hold a specific asset, an account needs to have a with the issuing account of that asset. This setup allows the account to keep track of the asset's balance and also imposes a limit on the amount of that asset the account can hold.

  • Receiving Assets: A trustline must be established for an account to receive any asset, except for Lumens (XLM). While it’s possible to create a claimable balance to send assets to an account without an existing trustline, the recipient must still create a trustline to claim the balance. Learn more about

  • liabilities for asset trades in two ways: Buying Liabilities, which are the total amount of an asset an account offers to buy across all its offers, and Selling Liabilities, which are the total amount of an asset an account offers to sell across all its offers.

An account must maintain a balance that is large enough to cover its selling liabilities and sufficiently below its limit to handle its buying liabilities.

  • Reserve Assets: These are the assets held within the liquidity pool. To participate in a pool, you must establish a trustline with each of the reserve assets that make up the pool. For example, if the liquidity pool contains assets A and B, you will need trustlines for both asset A and asset B.

  • Pool Share Assets: This asset represents your share of the liquidity pool. You need a trustline for each pool share associated with the pool you want to participate in. The trustline for the pool share allows you to receive and manage your proportional part of the pool.

  • Lumens (XLM): In some cases, especially if one of the reserve assets is XLM, you do not need to establish a specific trustline for XLM, as trustlines for XLM are not required. However, if the liquidity pool does not include XLM as one of the reserve assets, you will need to establish trustlines for all the assets involved in the pool.

Trustlines for Performing Swaps

To exchange assets on Soroswap Finance using the path payments system, you also need to establish trustlines:

  • Assets to be Exchanged: You must establish trustlines for each asset you wish to exchange. For example, if you want to swap Asset X for Asset Y, you need to have a trustline for both Asset X and Asset Y.

  • Asset Management: Once you have established the trustlines, your account can receive and manage these assets, allowing you to perform swaps safely and effectively.

for Liquidity Pools

To participate in al and perform on Soroswap Finance, you need to establish trustlines for the following three types of assets:

Trustlines
liquidity poo
swaps
trustline
trustline
Claimable Balances here.
Trustlines track
Page cover image