Skip to content

Liquidity Service

The Liquidity Service enables decentralized token swapping through Automated Market Maker (AMM) liquidity pools. Users can create liquidity pools, provide liquidity by depositing token pairs, and execute token swaps with predictable pricing.

Overview

The Liquidity Service is a critical component of FSCO’s decentralized finance ecosystem, providing the infrastructure for efficient token swapping and liquidity provision. The service follows AMM principles, where token prices are determined by mathematical formulas based on the ratio of tokens in each pool.

Key Features

Liquidity Pool Management

Create and manage liquidity pools with customizable fees and parameters.

Providing Liquidity

Deposit token pairs to enable trading and earn LP tokens representing your pool share.

Token Swapping

Swap tokens directly through pools with predictable pricing and minimal slippage.

Fee Management

Earn trading fees as a liquidity provider and configure fee structures as a pool admin.

Pool Positions

Track your liquidity positions and calculate potential returns.

Transaction History

View comprehensive history of all liquidity and swap operations.

Advantages

  • Capital Efficiency - Liquidity providers can earn passive income from trading fees.
  • Price Discovery - AMM model enables automatic price discovery based on market activity.
  • Slippage Control - Built-in mechanisms to protect users from excessive price changes.
  • Customizable Parameters - Configurable fee structures and exchange rates for different use cases.
  • Seamless Integration - Works with FSCO’s token and wallet services for a complete DeFi solution.

Common Use Cases

Institutional Liquidity Provision

For Banks & Financial Institutions

Deploy treasury assets to generate yield through regulated digital asset markets. Leverage existing compliance frameworks while accessing new revenue streams through controlled liquidity provision.

Integration Points

  • POST /liquidity/pool - Create institutional-grade liquidity pools with customized parameters
  • POST /liquidity/add - Allocate treasury assets to designated pools
  • GET /liquidity/pools/{poolId}/position/{walletId} - Monitor institutional positions

Asset Exchange Infrastructure

For Payment Processors & Exchanges

Build compliant asset exchange capabilities into existing payment infrastructure. Enable customers to convert between digital assets with predictable pricing and full audit trails.

Integration Points

  • GET /liquidity/pools - Access available regulated conversion pairs
  • GET /liquidity/quote/swap - Obtain transparent market rates
  • POST /liquidity/swap - Execute compliant asset conversions

Treasury Optimization

For Corporate Finance Departments

Optimize treasury operations by deploying underutilized assets to earn passive income while maintaining liquidity for operations. Implement sophisticated treasury management strategies with full reporting capabilities.

Integration Points

  • GET /liquidity/transactions - Monitor performance metrics for treasury reporting
  • GET /liquidity/pools/{poolId}/fees - Track fee revenue for financial reporting
  • POST /liquidity/add and POST /liquidity/remove - Manage treasury allocations

Getting Started

To start using the Liquidity Service:

  1. Review the API Reference to understand available endpoints
  2. Follow the Liquidity Pool Management guide
  3. Set up your integration with appropriate authentication

API Specifications

For detailed API specifications, see the OpenAPI schema.

Service Architecture

The Liquidity Service follows a modular architecture with the following components:

  • Pool Registry - Manages the creation and discovery of liquidity pools
  • Liquidity Engine - Calculates quotes and handles liquidity provision/removal
  • Swap Engine - Executes token swaps with slippage protection
  • Fee Calculator - Manages fee collection and distribution
  • Transaction Processor - Records all liquidity operations to the blockchain

Best Practices

  • Always get quotes before executing liquidity operations to estimate outcomes
  • Use slippage protection when swapping tokens to protect against price movements
  • Start with smaller amounts when first testing a new pool
  • Regularly check your pool positions to understand your share and potential returns
  • Monitor pool status (active/paused) before attempting operations

Security Considerations

  • All endpoints require proper authentication
  • Pool administrators should be carefully selected with proper key management
  • Critical operations (fee structure changes, pool pausing) are restricted to pool admins
  • Transactions are signed and verified before execution
  • Detailed audit logs are maintained for all operations