Note: This section is archived as Kovan, Rinkeby and Ropsten test networks are now deprecated. You can try this with other test networks like Goerli and Sepolia.
Staking offers crypto holders a way of putting their digital assets to work and earning passive income without needing to sell them.
You can think of staking as the crypto equivalent of putting money in a high-yield savings account. When you deposit funds in a savings account, the bank takes that money and typically lends it out to others. In return for locking up that money with the bank, you receive a portion of the interest earned from lending – albeit a very low portion. Similarly, when you stake your digital assets, you lock up the coins in order to participate in running the blockchain and maintaining its security. In exchange for that, you earn rewards calculated in percentage yields. These returns are typically much higher than any interest rate offered by banks. Staking has become a popular way to make a profit in crypto without trading coins. As of April 2022, the total value of cryptocurrencies staked exceeded the $280 billion threshold, according to Staking Rewards.
Staking is only possible via the proof-of-stake consensus mechanism, which is a specific method used by certain blockchains to select honest participants and verify new blocks of data being added to the network.
Our decentralised application allows users to stake their token for rewards by connecting their meta mask account. The portal would allow the user to stake 3 tokens - WETH , FAU and DAPP. The DAPP token would be a reward token given to the users as an incentive for staking on our platform. Our portal also allows the users to unstake their tokens. Staking is useful because it is the simplest way to deploy your idle crypto holdings and establish a passive income. Most importantly – staking is much more eco-friendly than mining.
Install the below programs in your machine before running the commands given in Steps
.
brownie
truffle
- use the test accounts given here to log in to meta mask account or you can use your own if you have balance.node
ganache-cli
yarn
python
- Clone the repo.
git clone https://github.com/itsnotsagar/staking_reward.git
- Open the repo in
VS-Code
. - Edit the
.env
and.env.example
file by pasting in your own APIs and private keys. - Install the required dependencies and modules.
yarn install
- Deploy the smart contracts on the kovan test network.
brownie run scripts/deploy.py --network kovan
- Change directory to
front_end
folder and run the following to start the website in localhost.
cd front_end
yarn
yarn start
- To issue staking reward run the
issue_token.py
script in the/scripts
directory.