kingahmedino / block-stake

A staking contract following MasterChef algorithm that takes in an upgradeable token as stake asset and issues rewards in a different token.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Block Stake

Block Stake are a set of contracts that facilitate staking following the MasterChef staking algorithm.

Try dApp | View Demo

Table of Contents
  1. About The Project
  2. Installation
  3. Usage
  4. Contributing

About The Project

Block Stake is a staking contract following a modified version of Sushiswap's MasterChef algorithm that takes in an upgradeable token as stake asset and issues rewards in a different token.

The users who hold the BlockStake (BST) token can earn rewards for their investments by sharing part of the rewards that are distributed per block based on their invested BST.

(back to top)

Built With

Back

  • Solidity
  • Ethereum
  • Hardhat
  • Openzeppelin Contracts
  • Ethers.js

Front

  • NextJS
  • ReactJS

Testing

  • Chai
  • Mocha

(back to top)

Installation

  1. Clone the repo
    git clone https://github.com/kingahmedino/block-stake.git && cd block-stake
  2. Install dependencies
    yarn install

(back to top)

Usage

Try running some hardhat tests:

npx hardhat test

Try to deploy contract to testnet, Gõerli is the default:

npx hardhat run scripts/deploy.js

or

Edit hardhat.config.js to add more networks to deploy to:

networks: {
    goerli: {
      url: process.env.NETWORK,
      accounts: [process.env.PRIVATE_KEY],
    },
  }

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

About

A staking contract following MasterChef algorithm that takes in an upgradeable token as stake asset and issues rewards in a different token.


Languages

Language:Solidity 63.7%Language:JavaScript 36.3%