A decentralized application that enables users to stake ERC20 tokens and earn rewards in return.
- Stake Token : GOLD, ERC20 token used for staking within the DApp.
- Reward Token : FIAT, Another ERC20 token generated as reward for staking.
- Stake Tokens:
- Users approve a certain amount of stake tokens to be staked within the DApp by interacting with the staking smart contract.
- Generate Reward:
- Once the stake tokens are staked, the smart contract generates reward tokens per second based on the staked amount.
- Accumulate Rewards:
- Users accumulate reward tokens over time as they keep their stake tokens staked within the DApp.
- Claim Rewards:
- Users can claim their accumulated rewards by interacting with the smart contract using the getReward() function.
- Unstake Tokens:
- After a staking period or at any point, users can unstake their tokens using the appropriate function in the DApp to retrieve their staked tokens along with the accumulated rewards.
- ๐จ Any improvements to the design and UI are welcome.
- ๐จ try to break the website by testing it to find any bugs. If you find any, check if there is an issue already open for it, if there is none, then report it.
- React JS
- Ether JS
- Solidity
- Hardhat
1. Fork the StakeHub repo by clicking on the fork button on the top of the page. This will create a copy of this repository in your account.
2. Clone the forked repository
git clone "https://github.com/<your-github-username>/stakehub"
- Download and install Node JS v16.16.0
- Download and install Git.
- Go to the terminal of your code editor and run "npm install" to download packages.
- Run "npm run dev" to start a local server.
3. Make necessary changes and commit those changes.
Remember never push anything to the Main branch.
Always change your branch to "develop" using:
git checkout develop
Again check your current branch using:
git branch
It should point *develop
Now add your changes using:
git add files-you-edited
If there are multiple files you can use:
git add .
Now create a commit message using:
git commit -m "<commit-message-goes-here>"
4. Push changes to GitHub
git push origin develop
5. Create a Pull Request ๐
Now you go to your repository on GitHub, youโll see a Compare & pull request
button. Click on that button and now write a summary of what changes you have done.( Attach images if required). I will review your code and merge it if it passes all the tests.โค๏ธ