SPL Token-swap (AMM) implemented in Anchor

Overview

Anchor Example: Token Swap AMM

SPL Token-swap (AMM) implemented in Anchor.

Build, Deploy and Test

First, install dependencies:

$ npm install

Make sure you have your local solana validator running if you want to deploy the program locally:

$ solana-test-validator

If you are on Apple Sillicon M1 chip, you will have to build Solana from the source. See this document for more details Next, we will build and deploy the program via Anchor.

Build the program:

$ anchor build

Deploy the program:

$ anchor deploy

Finally, run the test:

$ anchor test
You might also like...
The point of this anchor project is to serve as a starter kit or example to compose with mango-v3 using anchor.

The point of this anchor project is to serve as a starter kit or example to compose with mango-v3 using anchor. It currently provides 2 examples and various inline todos on how to extend this.

A Curve-like AMM for Secret Network

A Curve-like AMM for Secret Network. Supports a varibale number of tokens with the same underlying value.

Yi Token by Crate Protocol: the primitive for auto-compounding single token staking pools.
Yi Token by Crate Protocol: the primitive for auto-compounding single token staking pools.

yi Yi Token by Crate Protocol: the primitive for auto-compounding single token staking pools. About Yi is a Solana primitive for building single-sided

Discover GitHub token scope permission and return you an easy interface for checking token permission before querying GitHub.

github-scopes-rs Discover GitHub token scope permission and return you an easy interface for checking token permission before querying GitHub. In many

Escrow program implemented in Anchor
Escrow program implemented in Anchor

Anchor Example: Escrow Program See this doc for more implementation details Overview Since this program is extended from the original Escrow Program,

The Solana Program Library (SPL) is a collection of on-chain programs targeting the Sealevel parallel runtime.

Solana Program Library The Solana Program Library (SPL) is a collection of on-chain programs targeting the Sealevel parallel runtime. These programs a

Little tool so you can swap out user jsons easily

Little tool so you can swap out user jsons easily To run: $ cargo run user-name inside of root directory. Or you can build and use the executable with

a crate to swap values between possibly-overlapping references

omniswap: a crate to swap values between possibly-overlapping references Motivating Example You cannot simply use std::mem::swap to replace values wit

Neovim Configuration Manager (Swap/Backup/Try Configurations Easily)
Neovim Configuration Manager (Swap/Backup/Try Configurations Easily)

ncm-rs Neovim Configuration Manager (Swap/Backup/Try Configurations Easily) I created this package because I wanted to try out Lazyvim (which is why i

The Voting example based on MoonZoon and Solana + Anchor framework.
The Voting example based on MoonZoon and Solana + Anchor framework.

The Voting example based on MoonZoon and Solana + Anchor framework.

Battery-included Solana/Anchor project skeleton.

Anchor Skeleton Battery-included Solana/Anchor project skeleton. Features Rust test only: All tests (integration, unit) are written in Rust, so the co

Ah Fuck Anchor

Ah Fuck Anchor

A color-coded visualization tool for the instructions of an anchor program
A color-coded visualization tool for the instructions of an anchor program

anchor-viz A color-coded visualization tool for the instructions of an anchor program. (This is a schematic of basic-2 from anchor's examples/tutorial

Solana NFT marketplace boilerplate with anchor & react & candy-machine-cli

The Heros NFT Marketplace Boilerplate project is designed to let users fork, customize, and deploy their own nft marketplace app to a custom domain, ultra fast.

Solana NFT marketplace boilerplate with anchor & react & candy-machine-cli

Solana_Marketplace_HerosNFT The Heros NFT Marketplace Boilerplate project is designed to let users fork, customize, and deploy their own nft marketpla

Simple (not simplest) UST vault that integrate with Anchor Protocol

Simple (not simplest) UST Vault Building a simple UST Vault that generate yield from Anchor while also have UST reserved for lending, and etc. This co

Generate Anchor IDL for Native Solana Programs.

Native Solana To Anchor IDL Autogenerate Anchor IDL from programs written in Native Solana. Disclaimer The instructions must follow strict set of rule

Write Anchor-compatible Solana programs in Python

seahorse: Write Solana programs in Python The ease of Python with the safety of Rust. Seahorse lets you write Solana programs in Python. It is a commu

Anchor Design of contract - Accounts, Parameters

MarketplaceDesign Anchor Design of contract - Accounts, Parameters Main Instructions are Initialize ListForSale AcceptOffer CancelList MakeOffer Cance

Owner
iron_addicted_dog
BUIDL on Solana
iron_addicted_dog
A firmware for the Clueboard 66% Low Profile keyboard implemented in Rust.

Rust Firmware for Clueboard 66% Low Profile Keyboard A firmware for the Clueboard 66% Low Profile keyboard (also known as 66% hotswap) implemented in

Wesley Moore 10 Nov 2, 2022
Telegram bot for searching in Arch User Repository ( AUR ); Implemented using rust.

AurSearchBot A Telegram Inline Search Bot Written in Rust Introduction Telegram Bot that can search AUR ( Arch User Repository ) in inline mode. This

AlenPaulVarghese 3 Feb 15, 2022
An anchor CPI client for the SPL token lending program

anchor-lending anchor-lending is an anchor CPI client for any program that implements or extends the instruction interface found in the spl token lend

Rohan Kapur 11 Oct 24, 2022
Marinde Anchor-Based, first on mainnet, liquid-staking-program and mSOL->SOL swap pool

marinade-anchor Marinade-finance liquid staking program for the Solana blockchain Audits & Code Review Kudelski Security: https://marinade.finance/Kud

Marinade.Finance 42 Dec 11, 2022
Token management program (vesting and mining) implemented in Anchor

Deep Dive into Anchor by Implementing Token Management Program Author: @ironaddicteddog, @emersonliuuu [Updated at 2022.5.21] You can find the full co

Jim 31 Jun 13, 2023
Tool for audit and reclaim of delegated SPL Token accounts

Usage Install prerequisites System development libraries sudo apt install libssl-dev libudev-dev pkg-config gcc Rust curl --proto '=https' --tlsv1.2

Solana Foundation 4 Jan 27, 2022
An easily deployable service to monitor mission-critical SPL token accounts

Vault watcher Monitoring critical spl-token accounts in real time Table of contents Introduction Usage Configuration Configuration examples Grafana In

null 21 Nov 29, 2022
An adaptation of the Solana token-swap program implementing Curve's StableSwap invariant.

StableSwap Program An adaptation of the Solana token-swap program implementing Curve's StableSwap invariant. Click here to try it out live on the Sola

smaster0517 3 Mar 30, 2022
Swap token protocol for cryptocurrencies, supported in cosmos network, such as UST, LUNA, LUNI, etc.

Tokenswap This is a Smart Contract built in Rust to run inside Cosmos SDK module on all chains that enable it. To understand the framework better, ple

Smart Geek 6 Dec 12, 2022
A bunch of commented Anchor programs and JavaScript tests, to help me learn Anchor.

learning-anchor A bunch of commented Anchor programs and JavaScript tests, to help me learn Anchor.

Matt Lim 3 Nov 21, 2021