Giter Club home page Giter Club logo

20tokenexchange's Introduction

Decentralized Exchange

This is a decentralized exchange where funds are locked in a smart contract in pools provided by liquidity providers and trades are carried out against the pools for a 0.3% fee.

Table of contents

General Info

This is a basic DEX - liquidity providers (LP) can provide liquidity to the exchange smart contract and trades can be done against the funds in the pool for a fee that is disbursed to the LP based on their ownership in the pool. The LP can also make part or full withdrawals of funds from the pool plus the fee earned from trading.

Contracts

You can view the deployed DEX and token contracts at the Kovan etherscan addresses below:

Technologies

Installation

To setup this project (on a Windows machine):

  1. Install the above technologies (Truffle, Ganache, Metamask)
  2. Make Sure Ganache is running (Ganache is the local blockchain)
  3. Connect your MetaMask wallet to Ganache:
    a. Click the MetaMask browser extension
    b. Click the Networks tab and select Custom RPC
    c. Enter settings:
          i. Network Name => Ganache
          ii. New RPC URL (the RPC server on your running Ganache) => http://localhost:7545
          iii. Chain ID => 1337 Explanation
    d. Click Save
  4. Select the newly added Ganache network and click the profile picture to reveal more settings
  5. Select "Import Account"
  6. Go to Ganache:
          i. Click the key icon on the first address(Important!) (Ganache provides you with 10 accounts each prefunded with test Ether)
          ii. Copy the private key
  7. Go back to MetaMask, make sure the "Private Key" option is selected, paste the private key you copied and click import.

Setup

To run this project, install it locally using npm:
git clone https://github.com/icepaigez/Decentralized-ERC-20-Token-Exchange.git project-name
cd project-name
npm install
truffle migrate
npm start

Features

List of features ready and TODOs for future development

  • Provide Liquidity to a pool
  • Make trades against available pools
  • Withdraw from a pool

To-do list:

  • Add functionality to create new liquidity pools
  • Create a way for people to buy the native tokens that can be staked on the DEX i.e swapped with Ether

Status

Project is: in progress, more features being developed.

Inspiration

Project inspired by Medium

Contact

Created by @shocotee - feel free to contact me!

20tokenexchange's People

Contributors

icepaigez 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.