> ## Documentation Index
> Fetch the complete documentation index at: https://docs.multiliquid.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Multiliquid Protocol

> Decentralized infrastructure for atomic swaps between permissioned Real World Assets and stablecoins

## Overview

Multiliquid is a high-performance program that enables institutional-grade atomic swaps between multiple permissioned Real World Asset (RWA) tokens and multiple stablecoins. Built with the Anchor framework, the program provides secure, transparent, and efficient infrastructure for digital asset exchange on the Solana Virtual Machine (SVM).

<CardGroup cols={2}>
  <Card title="Architecture" icon="building" href="/svm/overview/architecture">
    Explore the program's modular design and account structure
  </Card>

  <Card title="Security" icon="shield" href="/svm/overview/security">
    Review security measures and access control mechanisms
  </Card>

  <Card title="Swap Instructions" icon="code" href="/svm/instructions/swap">
    Learn how to execute swaps on the Multiliquid Program
  </Card>
</CardGroup>

## Key Features

### Atomic Swap Execution

The program ensures complete transaction atomicity—either all conditions are fulfilled or none are. This eliminates partial executions and guarantees consistent state across all operations within a single Solana transaction.

### Multi-Asset Support

* **Any RWA Token**: Support for multiple permissioned Real World Asset tokens
* **Any Stablecoin**: Integration with multiple Liquidity Providers
* **Token Standards**: Native support for both SPL Token and Token-2022 programs
* **Extensible Design**: Modular architecture enables seamless onboarding of new assets

### Institutional-Grade Security

* **Program-Derived Addresses (PDAs)**: All accounts derived deterministically for security
* **Role-Based Access Control**: Granular permissions for admin and liquidity provider operations
* **Multi-Level Pause Controls**: Emergency pause capabilities at program, asset, pair, and LP levels
* **Two-Step Admin Transfer**: Secure admin handover requiring confirmation from new admin

### Transparent Fee Structure

* **Protocol Fees**: Configurable protocol-level fees in basis points
* **LP Fees**: Liquidity providers set their own discount rates and redemption fees
* **On-Chain Fee Collection**: All fees accumulated transparently in dedicated fee vault accounts
* **Per-Stablecoin Fee Vaults**: Separate fee collection per stablecoin for clear accounting

## How It Works

The program operates through a coordinated system of Solana accounts and instructions:

1. **Global Configuration**: Central program settings managing admin, fee wallet, protocol fees, and global pause state
2. **Asset Configurations**: Per-token accounts storing NAV (Net Asset Value) pricing sources and asset-level controls
3. **Pairs**: Trading pair accounts linking RWAs to stablecoins with LP-specific fee configuration
4. **LP Vaults**: Token custody ATAs owned by each LP's `vault_authority` PDA for each LP/token combination
5. **Fee Vaults**: Protocol fee collection ATAs owned by the global `program_authority` PDA per stablecoin

### Swap Process

```mermaid theme={null}
sequenceDiagram
    participant User
    participant Program as Multiliquid Program
    participant AssetConfig as Asset Configs
    participant Pair
    participant Vault as LP Vaults
    participant FeeVault as Fee Vault

    User->>Program: Swap Instruction
    Program->>Pair: Validate pair state & fees
    Program->>AssetConfig: Get RWA NAV Price
    Program->>AssetConfig: Get Stablecoin NAV Price
    Program->>Program: Calculate swap amounts & fees
    User->>Vault: Transfer tokens in
    Vault->>User: Transfer tokens out
    Program->>FeeVault: Collect protocol fees
    Program->>Program: Emit SwapExecuted event
```

## Supported Assets

The program supports a growing ecosystem of institutional-grade digital assets on Solana.

### Real World Assets (RWAs)

| Asset | Description                                 | NAV Oracle       |
| :---- | :------------------------------------------ | :--------------- |
| ACRED | Securitize Credit Fund                      | Pyth Oracle      |
| BENJI | Franklin OnChain US Gov Money Fund          | Hardcoded \$1.00 |
| USCC  | Superstate Crypto Carry Fund                | Pyth Oracle      |
| USTB  | Superstate Short Duration US Gov Securities | Pyth Oracle      |
| VBILL | VanEck Treasury Fund                        | Hardcoded \$1.00 |
| WTGXX | WisdomTree US Dollar Digital Fund           | Hardcoded \$1.00 |

### Stablecoins

| Asset | Description                 |
| :---- | :-------------------------- |
| USDC  | Circle USD Coin (SPL Token) |

The program supports both SPL Token and Token-2022 standards, enabling seamless onboarding of new assets as they launch on Solana.

<Card title="View Deployment Addresses" icon="server" href="/svm/deployments">
  See all deployed program and token addresses on Solana Mainnet
</Card>

## Program Governance

The program employs a multi-tiered permission model:

* **Program Admin**: Manages global configuration, asset acceptance, and pair creation
* **Liquidity Providers**: Control their pair configurations, fees, and liquidity
* **Permissionless Swaps**: Any user can execute swaps on active, unpaused pairs

## Technology Stack

Built on industry-standard frameworks:

* **Anchor 0.32.1**: Modern Solana program framework with safety features
* **Rust**: Memory-safe systems programming language
* **SPL Token**: Standard Solana token program support
* **Token-2022**: Extended token program with additional features
* **PDAs**: Program-Derived Addresses for deterministic account derivation

## Integration Options

### Current:

**Multiliquid UI**:
The Multiliquid web interface (coming soon) provides institutional users with a secure, intuitive environment for executing swaps. The UI handles wallet integration, transaction signing, and real-time status updates.

**Direct Program Integration**:
Multiliquid allows for direct swap integration on Solana using the Anchor client or @solana/web3.js.

### Future: REST API

A comprehensive REST API is under development to enable programmatic access for institutional trading systems, portfolio management platforms, and automated treasury operations.

<Info>
  For developer integration details and technical specifications, contact the Multiliquid team directly.
</Info>

## Next Steps

<CardGroup cols={2}>
  <Card title="Understand the Architecture" icon="diagram-project" href="/svm/overview/architecture">
    Deep dive into the program's account structure, instruction flow, and swap mechanics
  </Card>

  <Card title="Review Security Model" icon="lock" href="/svm/overview/security">
    Examine security measures, access controls, and pause mechanisms
  </Card>

  <Card title="Explore Instruction Reference" icon="file-code" href="/svm/instructions/swap">
    Browse detailed instruction documentation and parameter specifications
  </Card>
</CardGroup>

***

<Warning>
  The Multiliquid Program handles significant value and operates in regulated markets. All integrations should undergo thorough testing and security review. Contact the Multiliquid team before production deployment.
</Warning>
