Coder Social home page Coder Social logo

liquidswap's Introduction

Liquidswap

Liquidswap is AMM protocol for Aptos blockchain.

Documentation

Vist our docs portal.

Add as dependency

To integrate Liquidswap into your project vist integration docs.

Build

Important: we recommend Aptos CLI v1.0.3.

Aptos CLI required:

aptos move compile

Test

aptos move test

Security Audits

Look at section in our doc.

Bounty Program

Read details about our bounty program launched on the Immunefi platform.

License

See LICENSE

liquidswap's People

Contributors

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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

liquidswap's Issues

can't fetch resources from 0x05a97986a9d031c4567e15b797be516910cfcb4156312482efc6a19c0a30c948

when fetch resoruces from 0x05a97986a9d031c4567e15b797be516910cfcb4156312482efc6a19c0a30c948
https://fullnode.mainnet.aptoslabs.com/v1/accounts/0x05a97986a9d031c4567e15b797be516910cfcb4156312482efc6a19c0a30c948/resources

i got these error:

Unknown error (Unhandled) fetching an Account with address 0x05a97986a9d031c4567e15b797be516910cfcb4156312482efc6a19c0a30c948:
Error: {"message":"Too many values requested for key_prefix StateKeyPrefix { tag: AccessPath, bytes: [5, 169, 121, 134, 169, 208, 49, 196, 86, 126, 21, 183, 151, 190, 81, 105, 16, 207, 203, 65, 86, 49, 36, 130, 239, 198, 161, 156, 10, 48, 201, 72] } - maximum allowed 10000","error_code":"internal_error","vm_error_code":null}
Try again later

how can i get all resources from 0x05a97986a9d031c4567e15b797be516910cfcb4156312482efc6a19c0a30c948

pay_flashloan lp check bug?

In liquidswap::liquidity_pool::pay_flashloan you check lp change with wrong x_res_new_after_fee and y_res_new_after_fee as far as I understand it. Or am I wrong?

You use liquidswap::liquidity_pool::new_reserves_after_fees_scaled which is designed to calc reserves for swap but not for loan returns.
In that function you substract fee from current reserve but for loan return you should add x_in_val and y_in_val to the current reserve since they allready contain the fee.

Stable type swap error

The swap network fee in stable type is as high as 0.3APT.But he swap network fee in uncorrelated type is only 0.004APT.Fix it please

hi

public fun quote_fee(
ua_address: address,
dst_chain_id: u64,
payload_size: u64,
pay_in_zro: bool,
adapter_params: vector,
msglib_params: vector
): (u64, u64)
How can I get these parameters?

A little thought about flashloan

I think there is a problem with the interface of flashloan, because users can lock a coin pair at any time (this will cause other users to be unable to trade, which is unacceptable), and then wait for the price changes of other platforms to be beneficial to the user before unlocking the coin pair (this is unfair to other users)

Execution failed in 0xa277f7024ded2cd788072f035beaec108a01f7f305b1868c5d34a64da228662d::liquidity_pool::register at code offset 19

Do you guys have any idea how to make the register pool work? I tried blow but it failed with error: "Execution failed in 0xa277f7024ded2cd788072f035beaec108a01f7f305b1868c5d34a64da228662d::liquidity_pool::register at code offset 19"

const rawTxn = await client.generateTransaction(aliceAccount.address(), {
        function: `0xa277f7024ded2cd788072f035beaec108a01f7f305b1868c5d34a64da228662d::scripts_v2::register_pool`,
        type_arguments: [
            "0xa277f7024ded2cd788072f035beaec108a01f7f305b1868c5d34a64da228662d::doge_coin::DogeCoin",
            "0x1::aptos_coin::AptosCoin",
            "0xa277f7024ded2cd788072f035beaec108a01f7f305b1868c5d34a64da228662d::curves::Uncorrelated"
        ],
        arguments: []
    });

    const bcsTxn = await client.signTransaction(aliceAccount, rawTxn);
    const pendingTxn = await client.submitTransaction(bcsTxn);

    console.log(pendingTxn);

Getting {"Error": "Unexpected error: Unable to resolve packages for package 'my_package_name'" } when running aptos move test

Here is my Move.toml file.

[package]
name = 'my_package_name'
version = '1.0.0'

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

[dependencies.LiquidswapRouterV2]
git = 'https://github.com/pontem-network/liquidswap.git'
subdir = 'liquidswap_router_v2/'
rev = 'main'

[dependencies.LiquidswapLP]
git = 'https://github.com/pontem-network/liquidswap.git'
subdir = 'liquidswap_lp/'
rev = 'main'

[addresses]
source_addr = "0xcafe"
#source_addr = "_"

Referencing liquidswap locally doesn't help either.

Liquidswap LayerZero Bridge

Hello,

I'm a developer and would like to know more about how Liquidswap and Layerzero work.

Has the bridge contract already been published?

Many thanks,
Valerio

Faucet error

When Faucet is tapped add a warning "Please wait "X" time before requesting faucet tokens again"

We should add this so people know they can't just keep requesting tokens from faucet

Screen Shot 2022-05-31 at 11 56 40 AM

[Question] convert move struct LiquidityPool to Rust struct

how can i convert the following Pontem liquidity move struct to Rust
any sample for reference?so i can convert this resource to Rust struct.

struct LiquidityPool<phantom X, phantom Y, phantom Curve> has key {
        coin_x_reserve: Coin<X>,
        coin_y_reserve: Coin<Y>,
        last_block_timestamp: u64,
        last_price_x_cumulative: u128,
        last_price_y_cumulative: u128,
        lp_mint_cap: coin::MintCapability<LP<X, Y, Curve>>,
        lp_burn_cap: coin::BurnCapability<LP<X, Y, Curve>>,
        // Scales are pow(10, token_decimals).
        x_scale: u64,
        y_scale: u64,
        locked: bool,
        fee: u64,           // 1 - 100 (0.01% - 1%)
        dao_fee: u64,       // 0 - 100 (0% - 100%)
    }

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.