OpenViSTAI · Agents · Blockchain · Crypto
Menu
Smart Contracts

Anchor Liquidity Pool

Anchor Liquidity Pool is a Rust Anchor example implementing a Solana token-swap liquidity-pool program. Its documented operations include pool creation, deposits, withdrawals and swaps; the curve is fixed to constant product and fees go to the admin.

Independent OpenViST project profile, based on linked sources.

Anchor Liquidity Pool — OpenViST project profile in Smart Contracts.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it as a code example when exploring a constant-product Solana token-swap pool and its localnet test workflow.

Who it is for

  • Solana developers studying or adapting an Anchor liquidity-pool program.
  • Developers seeking a localnet example for testing pool creation, deposits, withdrawals and swaps.

Documented uses

  • Build the example Solana program.
  • Deploy it to localnet using the documented workflow.
  • Run tests covering pool creation, token deposits and withdrawals, and swaps.
  • Inspect how the example handles LP-token minting and burning around deposits and withdrawals.
Before you choose

Requirements & limits

The repository is public on GitHub. No license information is provided in the repository evidence.

  • The curve is always constant product in this implementation.
  • The fee receiver is always the admin.
  • The documented deployment target is localnet and the README calls for 10 SOL by airdrop.
  • The README identifies the repository as an example implementation for solana-swap.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Build and test the program on localnet

Follow the repository’s documented build, local deployment and test sequence for its pool operations.

Before you start

  • The repository’s npm scripts and Solana command-line tools.
  • An admin public key obtained with solana address.
  • 10 SOL obtained by airdrop for the documented localnet deployment.

Steps

  1. Set ADMIN_PUBKEY to the result of solana address.

  2. Run the command below.

    Documented command
    npm run build
  3. Start the local validator with the command below.

    Documented command
    npm run validator
  4. Obtain 10 SOL by airdrop, then deploy with the command below.

    Documented command
    npm run deploy
  5. Run the command below for the documented pool creation, deposit, withdrawal and swap tests.

    Documented command
    npm run test

Expected outcome

The repository’s test workflow covers pool creation, deposits, withdrawals and swaps against the localnet program.

Guide limitations

  • This workflow is for localnet; the README does not describe a production deployment process.
  • The implementation always uses a constant-product curve and sends fees to the admin.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
18 October 2026
Original website title
yoshidan/anchor-liquidity-pool · Official homepage title · retained in its source language