Git Product home page Git Product logo

stakingwithchainlink's Introduction

Staking With Chainlink

This project is a DeFi application that enables users to stake their tokens and earn rewards using Chainlink oracles. Users can stake any token listed on a decentralized exchange and verified by the Chainlink oracle network.

The Chainlink oracle network provides real-time price feeds, ensuring accurate reflection of the staked tokens' value in the system. This is crucial for maintaining the integrity of the staking process and ensuring fair distribution of rewards.

Features

  • ERC20 Token Staking: Stake any ERC20 token listed on a decentralized exchange and verified by the Chainlink oracle network.
  • Real-Time Price Feeds: Receive real-time price feeds from the Chainlink oracle network, ensuring accurate valuation of staked tokens.
  • Reward Distribution: Earn rewards based on the value of the staked tokens.

Technologies Used

  • Chainlink - Provides real-time price feeds to smart contracts, enabling accurate valuation of staked tokens.
  • Solidity - The programming language used to write smart contracts for the Ethereum blockchain.
  • Hardhat - A development environment for Ethereum that allows for compiling, testing, and deploying smart contracts. It includes advanced features like mainnet forking and account impersonation for comprehensive testing.
  • OpenZeppelin - Library for secure smart contract development
  • JavaScript - Used for scripting and deployment tasks.

Project Structure

  • contracts: Contains the smart contracts (StakingWithChainlink.sol, RewardToken.sol), library contracts (ChainlinkManager.sol, Utilis.sol), and test files for the smart contracts including TestChainlink.sol.
  • deploy: Contains deployment scripts for the smart contracts. Includes files such as 01-TestChainlink-deploy.js, 02-RewardToken-deploy-.js, and 03-StakingWithChainlink-deploy.js.
  • scripts: Contains additional scripts for the project.
  • utils: Contains utility scripts for the project. Includes scripts such as approveTokens.js, fundAllAccounts.js, and getTotalStakedAmount.js.
  • test: Contains unit tests for the project. Includes files such as 01-StakingWithChainlink-unit-test.js and import-All.js.

Getting Started

To get started with this project, clone the repository and install the dependencies:

Prerequisites

  • Node.js and npm or yarn
  • Hardhat
  • Ethereum wallet

Installation

  1. Clone the repository and navigate to the newly created folder:

    git clone https://github.com/Ehsan-The-Coder/StakingWithChainlink.git
    cd StakingWithChainlink
  2. Install the dependencies:

     yarn
  3. Compile the smart contracts:

     yarn hardhat compile
  4. Deploy the contracts:

    yarn hardhat deploy

Running the tests

To run the tests, use the following command:

yarn hardhat test

License

This project is licensed under the MIT License.

Acknowledgments

stakingwithchainlink's People

Contributors

ehsan-the-coder avatar

Stargazers

 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.