Giter VIP home page Giter VIP logo

bifi-staking-protocol's Introduction

BiFi-staking-protocol

Introduction

This smart contract implements a token staking service. Two types of tokens are involved in the staking service: (1) Contribution Token and (2) Reward Token. When a user deposits his or her Contribution Tokens to our smart contract, the user can earn Reward Tokens relative to the deposited amount and the length of deposit. Both the Contribution Tokens and Reward Tokens are ERC-20 tokens.

Architecture

architecture

Installation

npm install truffle -g

Usage

truffle compile

Structure of Project

contracts
├── DistributionModelV3.sol
├── ERC20.sol
└── module
    ├── eventModule.sol
    ├── externalModule.sol
    ├── internalModule.sol
    ├── safeMath.sol
    ├── storageModule.sol
    └── viewModule.sol
docs
├── distribution-model-contract.pdf
├── reward-distribution-model-ver-1.0.pdf
├── theori-audit-rev-1.0.pdf
└── theori-audit-rev-2.0.pdf
  1. contracts: solidity contracts
  2. contracts/DistributionModelV3: Model wrapper contract
  3. contracts/ERC20.sol: ERC20 mockup
  4. contracts/module/eventModule.sol: Define events
  5. contracts/module/externalModule.sol: Implements external function for users action and admin
  6. contracts/module/internalModule.sol: Implements interanl function for model logics
  7. contracts/module/safeMath.sol: Implements safe-math for uint256 and fixed point calculation
  8. contracts/module/storageModule.sol: Define contract storage
  9. contracts/module/viewModule.sol: Implements view function for support front-end
  10. docs: Document
  11. docs/distribution-model-contract.pdf: Documents for contract implementations
  12. docs/reward-distribution-model-ver-1.0.pdf: Document for rewarding algorithms
  13. docs/theori-audit-rev-1.0.pdf: Audit review of Theori
  14. docs/theori-audit-rev-2.0.pdf: Audit revision of Theori

bifi-staking-protocol's People

Contributors

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