Code Monkey home page Code Monkey logo

ethereum-kryptonite-asset-tokenization's Introduction

Asset tokenization on Ethereum (ICO)

ERC-20 Kryptonite token

This repository contains an ERC-20 Kryptonite token and crowdsale Dapp (ICO) for investing in tokens.

ERC-20 Kryptonite token is obviously a fake stablecoin backed by Kryptonite mineral โœณ๏ธ๐Ÿ’Ž. Each Kryptonite ERC-20 token is 1-to-1 pegged to the 1g of Kryptonite mineral. For all Superman fans, the closest thing that we have in real life compared to Kryptonite is Jadarite mineral discovered in Serbia.

Introduction

In order to invest in ICO, investor must first register on the landing page, after which they will have to go through the KYC and AML process. Once KYC is completed and their address has been whitelisted, they can invest in the ICO by purchasing the tokens, either on the web app of by dirrecly sending the funds to the crowdsale smart contract address. In the meantime, they may check the KYC process on the status page, until admins whitelist them from the admin page.

Described Dapp is implemented with ReactJS, with Material-UI on top. For working with ethereum blockchain, Truffle was used with React Truffle Box boilerplate and MetaMask for interacting with Dapp. OppenZeppelin was used as a reference for smart conract implementation and Firebase for hosting the database.

Dapp demo

  1. Investor registers for the ICO on the Landing Page by specifying necessary details, including his/her address which will be used to transfer the funds to invest in the tokens.

    He/she is redirected on the Status page, where they can check the KYC process. Once the process is completed, they would be able to purchase the tokens.

    Landing Page - Signup

  2. After that the token issuance team will go through KYC/AML process for each investor request and and approve/disapprove investors to participate in crowdsale.

    From Admin Dashboard they will whitelist/revoke investor addresses on the KYC contract. Crowdsale contract communicates with KYC contract to know which addresses are approved to purchase the tokens.

    Admin Dashboard - KYC Approvac

  3. One the KYC process is completed, and investor's address has been whitelisted, ivestor will able to purchase the Kryptonite tokens either by directly sendign funds to the crowdsale cotract or from the web app.

    Status Page - Buy Tokens

Project structure

In this repository you may find:

  • truffle-config.js file - contains solidity compiler version and different networks to migrate the contracts to.
  • contracts directory - contains smart contracts for Dapp:
    1. Crowdsale.sol - Crowdsale contract from the OpenZeppelin.
    2. KryptoniteToken - Contract extending ERC20 contract from the OpenZeppelin.
    3. KryptoniteTokenSale.sol - Contract extending the Crowdsale contract.
    4. KYCContract.sol - KCY contract to store approved addresses.
    5. Migrations.sol - Migrations contract.
  • test directory - contains unit tests for the smart contracts.
  • migrations directory - contains migration files for smart contracts.
  • client directory - contains ReactJS app.

How to run code?

NodeJS version: v10.15.0.
Solidity compiler version: v0.6.6.
Truffle: v5.1.40.

Setting up and running the application :

  • Install truffle: npm install truffle -g
  • Install npm moduls:
    1. npm install in the root directory (for truffle and unit tests)
    2. cd client & npm install (for ReactJS app)
  • Start Ganache and update truffle-config file if necessary with the network parameters.
  • Compile and migrate smart contracts to the local blockchain (from truffle console): truffle migrate --network "development/ganache-local" --reset.
  • Start react app: cd client & npm start.

To test the smart contracts:

  • In the root directory: truffle test.

ethereum-kryptonite-asset-tokenization's People

Contributors

krivi95 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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