GithubHelp home page GithubHelp logo

liquidswap's Introduction

Liquidswap

Liquidswap is AMM protocol for Aptos blockchain.

We support two curves:

  • For uncorrelated swaps.
  • For stable swaps.

The current repository contains:

  • Low level core.
  • Base router.
  • Scripts.
  • Tests.

Add as dependency

Update your Move.toml with

[dependencies.Liquidswap]
git = 'https://github.com/pontem-network/liquidswap.git'
rev = 'v0.4.0'

[dependencies.TestCoins]
git = 'https://github.com/pontem-network/test-coins.git'
rev = 'v0.1.0'

And use in code:

use liquidswap::router;
use liquidswap::curves::Uncorrelated;

use test_coins::coins::{USDT, BTC};

...
let usdt_coins_to_get = 5292719411;
let btc_coins_to_swap_val = router::get_amount_in<BTC, USDT, Uncorrelated>(usdt_coins_to_get);
let btc_coins_to_swap = coin::withdraw<BTC>(account, btc_coins_to_swap_val);

let (coin_x, coin_y) = router::swap_coin_for_exact_coin<BTC, USDT, Uncorrelated>(
    btc_coins_to_swap,
    usdt_coins_to_get
);

Build

Aptos CLI required:

aptos move compile

Test

aptos move test

Security Audits

Look at section in our doc.

License

See LICENSE

liquidswap's People

Contributors

0xbe1 avatar alejopinto77 avatar borispovod avatar gaquarius avatar mkurnikov avatar mrz1703 avatar ranger8888 avatar sunmoon11100 avatar vladimirovmm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.