Giter Club home page Giter Club logo

stakenet's Introduction

Stakenet

Overview

The Stakenet Smart Contract is an Ethereum-based contract that allows users to stake a certain ERC20 token and earn rewards based on a predefined yield percentage. This contract is implemented using Solidity and utilizes OpenZeppelin libraries for ERC20 functionality.

Features

  • Stake ERC20 tokens to earn rewards.
  • Transfer staking position to another address.
  • Withdraw staked tokens along with accumulated yield after a lock duration.
  • Dynamic yield calculation based on the total rewards and stake limits.
  • User-specific stake limits and minimum staking amount.

Prerequisites

Getting Started

  1. Clone the repository:

    git clone https://github.com/Svetoslavb04/Stakenet.git
  2. Navigate to the project directory:

    cd Stakenet
  3. Setup environment variables

    Create .env file or fulfill .env.example.
    The following environment variables are required:
    SEPOLIA_URL, SEPOLIA_PRIVATE_KEY, ETHERSCAN_API_KEY

  4. Compile the smart contracts:

    npx hardhat compile
  5. Deploy the LimeSpark smart contract to Sepolia testnet:

    npx hardhat deploy-lime-spark --network sepolia --starter-tokens <STARTER_TOKENS>
  6. Deploy the Stakenet smart contract to Sepolia testnet:

    npx hardhat deploy-stakenet --network sepolia --erc20-token-address <ADDRESS_OF_ERC20> --lock-duration-in-seconds <LOCK_DURATION> --rewards <REWARDS> --contract-stake-limit <CONTRACT_STAKE_LIMIT> --user-stake-limit <USER_STAKE_LIMIT>

    Run npx hardhat help to see all available commands

License

This project is licensed under the MIT License.

Disclaimer

This smart contract is provided as-is and has not been audited for security. Use it at your own risk.

LimeSpark Contract address: 0x2BdFb6a7B89e933B0A8c34E3dcc32E8C684c7738
LimeSpark Contract link: https://sepolia.etherscan.io/address/0x2BdFb6a7B89e933B0A8c34E3dcc32E8C684c7738#code

Stakenet Contract address: 0x25eF4D21979a2dB912183c133A3e576cf710d1A7
Stakenet Contract link: https://sepolia.etherscan.io/address/0x25eF4D21979a2dB912183c133A3e576cf710d1A7#code

Example Stakenet deploy command:
npx hardhat deploy-stakenet --erc20-token-address 0x2BdFb6a7B89e933B0A8c34E3dcc32E8C684c7738 --lock-duration-in-seconds 86400 --rewards 100000000000000000000 --contract-stake-limit 300000000000000000000 --user-stake-limit 100000000000000000000

stakenet's People

Contributors

svetoslavb04 avatar

Stargazers

Petya Marinova 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.