An adaptation of the Solana token-swap program implementing Curve's StableSwap invariant.

Overview

StableSwap Program

An adaptation of the Solana token-swap program implementing Curve's StableSwap invariant.

Click here to try it out live on the Solana testnet!

Development

Download or update the BPF-SDK by running:

$ ./do.sh update

To build the program, run:

$ ./do.sh build

Testing

Unit tests contained within the project can be built via:

$ ./do.sh test

Running end-to-end tests:

$ ./do.sh e2e-test

Clippy

Clippy is also supported via:

$ ./do.sh clippy

Deployment

To deploy the program, run:

$ ./do.sh deploy <network>

Deployments:

# Devnet
Payer KP:  154,183,126,229,182,45,22,195,142,79,21,239,194,167,28,88,235,228,17,128,12,168,140,198,122,136,213,173,177,1,120,143,138,189,56,109,166,185,36,144,182,174,244,154,233,45,48,115,250,56,250,146,141,156,76,184,164,1,90,19,75,151,15,51
Owner KP:  80,48,185,216,162,213,185,194,124,56,127,40,142,152,91,99,20,188,196,219,83,180,82,9,177,106,231,225,7,224,1,16,212,28,58,239,62,198,6,244,132,114,230,21,155,15,169,229,65,220,69,39,240,73,121,142,109,101,1,205,198,40,91,56
MintA:  HqrhXafTxwqk9G1nf47YWDvTpB5jDtmUnWTsU7mse41S
MintB:  4dY4fUtB7vGQXRfQd5m4KR8fcT4U2yWLT3xCQM5qgFhS
Address:  BKFeciwmNpazwRNhkErWEprsAzAVPSnEKeZTom5Z1hZ6
ProgramID:  D1jwGRnE59kcDWuyqVoKmZdBPfc2PfsrTDugB5mio3gr


# Testnet
Payer KP:  46,1,253,168,152,143,118,64,202,81,118,207,125,161,104,245,45,252,241,16,98,177,34,66,251,26,30,189,209,53,179,84,134,204,147,202,147,12,51,80,207,225,160,255,228,9,122,121,171,46,65,234,193,9,166,131,101,139,144,25,32,245,79,148
Owner KP:  124,236,102,153,108,26,69,216,197,69,209,200,188,36,7,43,104,243,96,99,206,64,33,154,197,124,76,233,213,42,147,14,19,21,231,229,169,253,200,173,201,254,15,189,5,202,4,40,45,148,166,119,135,40,115,136,180,110,8,97,50,28,27,196
MintA:  AVmVqtjCxfZcN2kc9vDmaZTYbuZoCoRjMU3mvDEpBmr4
MintB:  A8F2nRNUzX7o3RxSZCm2wig7uEdUy5NnBEKXxGARSvqs
Address:  44WmEqKSkvy7cdXvj1y1v3sNfqcYMQReNutLDjFia1dx
ProgramID:  FdvDz15ZPtnVxj8J3fKSyY9erkFehF6SUPv15yFkdfTii

TODO

Out of scope for v1

Comments
  • Bump hosted-git-info from 2.8.8 to 2.8.9 in /lib/client

    Bump hosted-git-info from 2.8.8 to 2.8.9 in /lib/client

    Bumps hosted-git-info from 2.8.8 to 2.8.9.

    Changelog

    Sourced from hosted-git-info's changelog.

    2.8.9 (2021-04-07)

    Bug Fixes

    Commits
    Maintainer changes

    This version was pushed to npm by nlf, a new releaser for hosted-git-info since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump lodash from 4.17.20 to 4.17.21 in /lib/client

    Bump lodash from 4.17.20 to 4.17.21 in /lib/client

    Bumps lodash from 4.17.20 to 4.17.21.

    Commits
    • f299b52 Bump to v4.17.21
    • c4847eb Improve performance of toNumber, trim and trimEnd on large input strings
    • 3469357 Prevent command injection through _.template's variable option
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump browserslist from 4.14.5 to 4.19.1 in /lib/client

    Bump browserslist from 4.14.5 to 4.19.1 in /lib/client

    Bumps browserslist from 4.14.5 to 4.19.1.

    Changelog

    Sourced from browserslist's changelog.

    4.19.1

    • Fixed throwOnMissing types (by Øyvind Saltvik).

    4.19

    • Added queries grammar definition (by Pig Fang).
    • Added throwOnMissing option (by Øyvind Saltvik).
    • Fixed null data ignoring in < 50% in CN (byPig Fang).
    • Fixed data parsing in in my stats (by Sun Xiaoran).
    • Fixed yarn.lock support with integrity (by Alexey Berezin).
    • Fixed Yarn Berry error message in --update-db.

    4.18.1

    • Fixed case inventiveness for cover queries (by Pig Fang).
    • Fixed since 1970 query for null in release date (by Pig Fang).

    4.18

    • Added --ignore-unknown-versions CLI option (by Pig Fang).

    4.17.6

    • Fixed sharable config resolution (by Adaline Valentina Simonian).

    4.17.5

    • Fixed --update-db for some pnpm cases.

    4.17.4

    • Reduced package size.

    4.17.3

    • Use picocolors for color output in --update-db.

    4.17.2

    • Reduced package size.

    4.17.1

    • Use Nano Colors for color output in --update-db.

    4.17

    • Added yarn 3 support to --update-db (by Himank Pathak).

    4.16.8

    • Updated Firefox ESR.

    4.16.7

    • Fixed oudated caniuse-lite warning text (by Paul Verest).
    • Fixed docs (by Alexander Belov).

    4.16.6

    • Fixed npm-shrinkwrap.json support in --update-db (by Geoff Newman).

    4.16.5

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump ws from 7.3.1 to 7.5.6 in /lib/client

    Bump ws from 7.3.1 to 7.5.6 in /lib/client

    Bumps ws from 7.3.1 to 7.5.6.

    Release notes

    Sourced from ws's releases.

    7.5.6

    Bug fixes

    • Backported b8186dd1 to the 7.x release line (73dec34b).
    • Backported ed2b8039 to the 7.x release line (22a26afb).

    7.5.5

    Bug fixes

    • Backported ec9377ca to the 7.x release line (0e274acd).

    7.5.4

    Bug fixes

    • Backported 6a72da3e to the 7.x release line (76087fbf).
    • Backported 869c9892 to the 7.x release line (27997933).

    7.5.3

    Bug fixes

    • The WebSocketServer constructor now throws an error if more than one of the noServer, server, and port options are specefied (66e58d27).
    • Fixed a bug where a 'close' event was emitted by a WebSocketServer before the internal HTTP/S server was actually closed (5a587304).
    • Fixed a bug that allowed WebSocket connections to be established after WebSocketServer.prototype.close() was called (772236a1).

    7.5.2

    Bug fixes

    • The opening handshake is now aborted if the client receives a Sec-WebSocket-Extensions header but no extension was requested or if the server indicates an extension not requested by the client (aca94c86).

    7.5.1

    Bug fixes

    • Fixed an issue that prevented the connection from being closed properly if an error occurred simultaneously on both peers (b434b9f1).

    7.5.0

    Features

    • Some errors now have a code property describing the specific type of error that has occurred (#1901).

    Bug fixes

    • A close frame is now sent to the remote peer if an error (such as a data framing error) occurs (8806aa9a).

    ... (truncated)

    Commits
    • 8ecd890 [dist] 7.5.6
    • 22a26af [fix] Resume the socket in the CLOSING state
    • 73dec34 [fix] Do not throw if the redirect URL is invalid
    • 2d968a6 [dist] 7.5.5
    • ab5fcd6 [doc] Change label text to CI
    • aa21e70 [ci] Use Github Actions for Windows x86 testing
    • e519810 [pkg] Update eslint-plugin-prettier to version 4.0.0
    • 0e274ac [minor] Skip unnecessary operations if the socket is already closed
    • 075752d [dist] 7.5.4
    • 2799793 [fix] Resume the socket in the next tick
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump ansi-regex from 5.0.0 to 5.0.1 in /lib/client

    Bump ansi-regex from 5.0.0 to 5.0.1 in /lib/client

    Bumps ansi-regex from 5.0.0 to 5.0.1.

    Release notes

    Sourced from ansi-regex's releases.

    v5.0.1

    Fixes (backport of 6.0.1 to v5)

    This is a backport of the minor ReDos vulnerability in ansi-regex@<6.0.1, as requested in #38.

    • Fix ReDoS in certain cases (#37) You are only really affected if you run the regex on untrusted user input in a server context, which it's very unlikely anyone is doing, since this regex is mainly used in command-line tools.

    CVE-2021-3807

    https://github.com/chalk/ansi-regex/compare/v5.0.0..v5.0.1

    Thank you @​yetingli for the patch and reproduction case!

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump tmpl from 1.0.4 to 1.0.5 in /lib/client

    Bump tmpl from 1.0.4 to 1.0.5 in /lib/client

    Bumps tmpl from 1.0.4 to 1.0.5.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Owner
smaster0517
Reliable and Passionate Full Stack Blockchain// Web Developer. Highly motivated self-driven developer, who holds a strong passion for exploring emerging tech.
smaster0517
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

Masaki Hara 21 Nov 30, 2022
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

instance.id 4 Mar 5, 2023
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
A template with cookie cutter CLI, Program and Integration tests for Solana blockchain

About solana-cli-program template is a sample app demonstrating the creation of a minimal CLI application written in Rust to interact with Solana and

null 46 Nov 3, 2022
A simple program for C program IO testing. Written in Rust

A simple program for C program IO testing. Written in Rust, using concurrency to speed up valgrind testing. Make sure to update settings at your first run of the program!

null 1 Feb 22, 2022
That program use on platform windows. And if you write any text on uncorrect keyboard layout, that program for that.

?? This program is designed to translate text into the correct layout when typing is incorrect. ?? Example ghbdtn -> привет Just (by default) pressing

Gest Se 5 Jan 26, 2023
Low-level Rust library for implementing terminal command line interface, like in embedded systems.

Terminal CLI Need to build an interactive command prompt, with commands, properties and with full autocomplete? This is for you. Example, output only

HashMismatch 47 Nov 25, 2022
a Rust library implementing safe, lightweight context switches, without relying on kernel services

libfringe libfringe is a library implementing safe, lightweight context switches, without relying on kernel services. It can be used in hosted environ

edef 473 Dec 28, 2022
A library for python version numbers and specifiers, implementing PEP 440

PEP440 in rust A library for python version numbers and specifiers, implementing PEP 440 Not yet on crates.io due to PyO3/pyo3#2786. use std::str::Fro

konstin 9 Dec 22, 2022
Solving context limits when working with AI LLM models by implementing a "chunkable" attribute on your prompt structs.

Promptize Promptize attempts to solve the issues with context limits when working with AI systems. It allows a user to add an attribute to their struc

Dan Nelson 5 Jul 18, 2023
A library implementing GPU-accelerated zkSync prover.

zkSync Era: A ZK Rollup For Scaling Ethereum zkSync Era is a layer 2 rollup that uses zero-knowledge proofs to scale Ethereum without compromising on

Matter Labs 4 Oct 5, 2023
SquidVM is a VM made in Rust implementing a Stack-based machine.

What is SquidVM? _____ _ ___ ____ __ / ____| (_) | \ \ / / \/ | | (___ __ _ _ _ _ __| |\ \ / /| \ /

Fragmenta 4 Dec 17, 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
A Twitch OAuth token revoker written in Rust.

Revoker - A Twitch OAuth Token Revoker Details Revoker is a small CLI tool written in Rust, made so you can easily and urgently remove a Twitch OAuth

Mykola 4 May 20, 2022
Design token framework — adopt a unified design language across platforms, codebases, and teams

Palette Design tokens framework with atomic classes for React and Master CSS. Deliver a consistent visual identity across your apps with design tokens

Foretag 4 Aug 23, 2022
🚀 Blazing fast and Powerful Discord Token Grabber, no popo made with python

Rusty-Grabber ?? a blazing fast Discord Token Grabber, no popo made with python Fastest Token Grabber ever : Rusty-Grabber> time ./target/release/grab

bishop 5 Sep 1, 2023
Command line interface for Solana Metaplex programs.

Metaplex Command Line Interface This is a command line interface for creating and managing non-fungible tokens on the Solana blockchain through the Me

Caleb Everett 26 Jul 12, 2022
Solstice Flare - CLI Tool for interacting with Solana

?? WIP: This tool is in active development, and can experience breaking changes. For safety, it currently operates on Devnet by default Flare Flare is

Anthias Labs 4 Feb 26, 2024
Command-Line program that takes images and produces the copy of the image with a thin frame and palette made of the 10 most frequent colors.

paleatra v.0.0.1 Command-Line program that takes an image and produces the copy of the image with a thin frame and palette made of the 10 most frequen

Beka Modebadze 24 Dec 29, 2022