Git Product home page Git Product logo

uviswap's Introduction

Uviswap: Decentralized Automated Market Maker (AMM)

Uviswap is a decentralized automated market maker (AMM) that allows users to swap tokens and provide liquidity to earn fees. This repository contains the smart contracts for the Uviswap Pair and Factory, along with testing scripts and deployment instructions.

Table of Contents

Overview

Uviswap is built on the principles of automated market makers, providing a decentralized solution for token swaps and liquidity provision. It utilizes a pair-based model where users can add liquidity to pairs of tokens, and swaps are executed based on the liquidity available in the pairs.

Smart Contracts

UviswapPair

The UviswapPair smart contract represents an individual token pair. It includes functions for adding liquidity, removing liquidity, swapping tokens, and collecting fees.

UviswapFactory

The UviswapFactory smart contract is responsible for creating and managing pairs of tokens. It includes a method for creating new pairs and deploying instances of the UviswapPair contract.

Testing

The testing scripts are provided in the tests folder, specifically in the test_uviswap.py file. These tests cover various functionalities, including adding and removing liquidity, swapping tokens, and collecting fees.

To run the tests locally, use the following command:

$ ape test

Make sure to configure the testing fixtures and accounts in conftest.py based on your requirements.

Deployment

To deploy the Uviswap application, follow these steps:

  1. Install the Avalanche plugin:

    $ ape plugins install avalanche
  2. Configure the RPC URL endpoints in ape-config.yaml for the desired network (mainnet or testnet).

  3. Create accounts for deployment:

    $ ape accounts generate <name_of_your_account>

Make sure to replace <name_of_your_account> in the instructions with the actual name you used for the deployment account. Additionally, customize the content based on any specific details or features of your Uviswap application.

  1. Customize the deployment script in deploy.py if needed.

  2. Run the deployment script:

    $ ape run deploy --network avalanche:fuji  # For Avalanche Testnet
    $ ape run deploy --network avalanche:mainnet  # For Avalanche Mainnet

Contributing

Contributions are welcome! If you have any improvements, bug fixes, or additional features to add, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

uviswap's People

Contributors

rafael-abuawad avatar

Stargazers

 avatar chubbykat avatar Aleksandar avatar El De-dog-lo avatar

Watchers

 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.