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.
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.
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
Set
ADMIN_PUBKEYto the result ofsolana address.Run the command below.
npm run buildStart the local validator with the command below.
npm run validatorObtain 10 SOL by airdrop, then deploy with the command below.
npm run deployRun the command below for the documented pool creation, deposit, withdrawal and swap tests.
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.
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

