Reference implementation of a decentralized exchange for custom instruments, risk, and fees

Overview

Dexterity

What is Dexterity

At a high level, Dexterity is a smart contract (or collection of smart contracts) that allow for the creation of a decentralized exchange on the Solana blockchain. The modular design of these contracts allows operators to create generic instruments with customizable risk and fee models.

To Deploy

In order to deploy Dexterity, you will need to modify the mock keys in master_program_config.json to match the target program IDs. The build script will automatically fill in the keys into the program files.

If you would like to use the deploy_all.sh script. Paste the upgrade authority keypair for each of these contracts into the file ~/.config/solana/dexterity_shared.json. Be sure to not commit this file.

Build and Run Tests

Requirements:

  • rust nightly
  • solana clis
  • [Optional] solana-test-validator

First, install poetry for the python client (only needed the first time around):

cd client
poetry install

Then build and test the protocol

git submodule init
git submodule update
./build.sh
./test.sh

Note that if you use the --replace option in the build.sh script, you will need to explicitly call cargo build-bpf in the root directory to seed the target folder with program keypair files.

You might also like...
A very simple third-party cargo subcommand to execute a custom command

cargo-x A very simple third-party cargo subcommand to execute a custom command Usage install cargo-x cargo install cargo-x or upgrade cargo install -

git-cliff can generate changelog files from the Git history by utilizing conventional commits as well as regex-powered custom parsers.⛰️
git-cliff can generate changelog files from the Git history by utilizing conventional commits as well as regex-powered custom parsers.⛰️

git-cliff can generate changelog files from the Git history by utilizing conventional commits as well as regex-powered custom parsers. The changelog template can be customized with a configuration file to match the desired format.

Gives custom drugs to your terminal 💊
Gives custom drugs to your terminal 💊

Linux on drugs 🧪 Gives custom drugs to your terminal 💊 Output random colors really fast Installation 📦 Arch Linux Linux on drugs is in the AUR yay

Coppers is a custom test harnass for Rust that measures the energy usage of your test suite.
Coppers is a custom test harnass for Rust that measures the energy usage of your test suite.

Coppers Coppers is a test harness for Rust that can measure the evolution of power consumptions of a Rust program between different versions with the

Easy access of struct fields in strings using different/custom pre/postfix:
Easy access of struct fields in strings using different/custom pre/postfix: "Hello, {field}" in rust

Easy access to struct fields in strings 🐠 add strung to the dependencies in the Cargo.toml: [dependencies] strung = "0.1.3" 🦀 use/import everything

Custom module for showing the weather in Waybar, using the great wttr.io
Custom module for showing the weather in Waybar, using the great wttr.io

wttrbar a simple but detailed weather indicator for Waybar using wttr.in. Installation Compile yourself using cargo build --release, or download the p

temp - building custom deb

PL/Rust: A Trusted Procedural Language Handler for Rust PL/Rust is a loadable procedural language that enables writing PostgreSQL functions in the Rus

Expose standard or fully custom USB peripherals (gadgets) through a USB device controller (UDC) on Linux using Rust.

usb-gadget This library allows implementation of USB peripherals, so called USB gadgets, on Linux devices that have a USB device controller (UDC). Bot

A SIMD implementation of Keccak256 for aarch64, forked from Remco Bloeman's Goldilocks K12 implementation.

keccak256-aarch64 Warning This crate was forked from real cryptographers (Goldilocks by Remco Bloeman), by not a real cryptographer. Do not use this k

Owner
Solana Foundation
Solana Foundation
A mansplainer for man commands, cheeky and rude, use at your own risk

mansplain mansplain is a Command-Line Interface (CLI) tool built in Rust that mansplains a command to you Prerequisites Rust and Cargo installed An Op

Pratik Kanthi 3 Oct 24, 2023
Catch Tailwindcss Errors at Compile-Time Before They Catch You, without making any change to your code! Supports overriding, extending, custom classes, custom modifiers, Plugins and many more 🚀🔥🦀

twust Twust is a powerful static checker in rust for TailwindCSS class names at compile-time. Table of Contents Overview Installation Usage Statement

null 15 Nov 8, 2023
Neptune-core is the reference implementation for the Neptune protocol

Neptune Core Neptune-core is the reference implementation for the Neptune protocol. The implementation is not complete yet, but already supports many

Neptune 6 Jul 10, 2023
Currency exchange rates in your terminal

Usage example Rates is a scriptable CLI tool that brings currency exchange rates right into your terminal and supports 30+ fiat and 10K+ crypto currencies.

Lunush 89 Nov 9, 2022
A minimal file exchange server designed for clients with browsers only.

XIAO-Files Xiao-Files is a minimal file exchange server designed for clients with browsers only. Example Let's say we have a host with IP 10.8.20.1, a

EvianZhang 3 Apr 2, 2024
Rust implementation of custom numeric base conversion.

base_custom Use any characters as your own numeric base and convert to and from decimal. This can be taken advantage of in various ways: Mathematics:

Daniel P. Clark 5 Dec 28, 2021
Custom implementation of Curl - Build Your Own curl

Build Your Own curl We are going to build curl from scratch by accepting the coding challenge posted on Coding Challenges FYI. Before moving ahead, yo

Praveen Chaudhary 15 Jun 7, 2024
niwl - a prototype system for open, decentralized, metadata resistant communication

niwl - a prototype system for open, decentralized, metadata resistant communication niwl (/nɪu̯l/) - fog, mist or haze (Welsh). niwl is an experimenta

George Tankersley 5 Feb 4, 2022
An efficient pictures manager based on custom tags and file system organization.

PicturesManager An efficient pictures manager based on custom tags and file system organization. Developed with Tauri (web app) with a Rust backend an

Clément Grennerat 2 Dec 21, 2022