GithubHelp home page GithubHelp logo

blockchainmasters21 / dex2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from clavance/dex

0.0 0.0 0.0 29.02 MB

A decentralised ERC20 token exchange integrated with MetaMask. Web app with a React front end, Solidity for smart contracts with Truffle (Mocha/Chai) test suite, and a peer-to-peer OrbitDB database.

JavaScript 97.94% CSS 1.32% HTML 0.74%

dex2's Introduction

Decentralised ERC-20 Exchange on OrbitDB

This is an ERC20 token exchange. It is comprised of 3 modules: a React front-end, a database using OrbitDB, Solidity smart contracts. The modules were written separately with a pair programming approach. The exchange is integrated with the Chrome extension MetaMask.

ERC20 is a standard to which most tokens traded on the Ethereum blockchain comply. It requires that the smart contracts creating the tokens must have several standard functions, including functions to check the total supply of the token as well as to transfer funds between accounts.

A key weakness of centralised cryptocurrency exchanges is that they have a centralised point of failure, and often store users' private keys on their servers. Thus when that single point of failure of such an exchange is exploited, all users of the exchange may lose their tokens. Decentralised exchanges aim to solve this problem by removing the central storage of tokens, thus malicious actors may only hack individual users.

Further, the terms and conditions under which transactions take place in a decentralised exchange can be programmed into the logic of the exchange's smart contract, allowing tokens to be moved directly from one user's wallet to another, without the need for the exchange to act as a trusted third party.

Application Architecture

Smart contract functions

Token transfer logic

Usage

Exchange runs with the Google Chrome extension MetaMask.

Run a local blockchain with Ganache on port 7545.

From the dex-front directory run npm start to launch the app in dev mode.

dex2's People

Contributors

tomwalton78 avatar clavance avatar kinghchan 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.