Coder Social home page Coder Social logo

wasmswap-contracts's Introduction

WasmSwap

This contract is an automatic market maker (AMM) heavily inspired by Uniswap v1 for the cosmwasm smart contract engine.

This project is currently in beta and is unaudited so please use at your own risk.

This contract allows you to swap tokens. Liquidity providers can add liquidity to the market and receive a 0.03% fee on every transaction.

Instantiation

The contract can be instantiated with the following messages

{
    "token1_denom": {"native": "<DENOM>"},
    "token2_denom": {"cw20": "<CONTRACT_ADDRESS>"},
    "lp_token_code_id": '<CW20_CODE_ID>'
}

Token denom can be either native for tokens tracked by the bank module (including IBC assets) or cw20 for cw20 tokens. native tokens have a denom string and cw20 tokens have a contract address. CW20_CODE_ID is the code id for a basic cw20 binary.

Messages

Add Liquidity

Allows a user to add liquidity to the pool.

Remove Liquidity

Allows a user to remove liquidity from the pool.

Swap

Swap one asset for the other

Pass Through Swap

Execute a multi contract swap where A is swapped for B and then B is sent to another contract where it is swapped for C.

Swap And Send To

Execute a swap and send the new asset to the given recipient. This is mostly used for PassThroughSwaps.

wasmswap-contracts's People

Contributors

ben2x4 avatar 0xekez 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.