PHPCoin Docs > Staking > How to Stake
Staking is the process of holding PHPCoin in your wallet to support the blockchain network. In return for holding coins, you receive rewards in the form of new PHPCoin.
PHPcoin uses a Proof-of-Stake (PoS) system to reward coin holders. Unlike miners or block generators, stakers do not create or validate blocks. Instead, for each block created, the network automatically chooses a "stake winner" from all eligible participants to receive a reward.
To be eligible for staking rewards, you must meet the network's minimum balance and coin maturity requirements.
To become eligible for staking rewards, you must first send a special "stake" transaction. This is a one-time action that flags your address as a staking participant.
-
Open a terminal or command prompt.
-
Navigate to the directory where your PHPcoin wallet is located.
-
Run the following command:
php cli/wallet.php send <your-address> 0 "stake"
Replace
<your-address>with your own wallet address. The0is the amount to send (this special transaction is free), and"stake"is the message that activates your address for staking.
For the current mainnet (at over 1,250,000 blocks), the requirements are simple and fixed:
- Coin Maturity: 60 blocks. Your coins must be held for at least 60 blocks before they are eligible.
- Minimum Balance: 160,000 PHPCoin. You must hold at least this amount to be eligible.
The staking requirements have changed during the blockchain's history.
- Before block 290,000:
- Coin Maturity: 600 blocks
- Minimum Balance: 100 PHPCoin
- Block 290,001 - 1,000,000:
- Coin Maturity: 60 blocks
- Minimum Balance: Increased in stages, from 30,000 to 140,000 PHPCoin.
An address is recognized as a staking address after it has been the destination of a transaction with the message "stake".
- Code Reference: The
getAddressTypesfunction ininclude/class/Block.php.
- Maturity: The
getStakingMaturity()function ininclude/class/Blockchain.phpcontrols this value. The change from 600 to 60 blocks is triggered by theUPDATE_11_STAKING_MATURITY_REDUCEconstant (value:290000) ininclude/coinspec.inc.php. - Minimum Balance: The
getStakingMinBalance()function ininclude/class/Blockchain.phpcontrols this value. The change from a fixed 100 PHPCoin to a dynamic value is triggered by theUPDATE_12_STAKING_DYNAMIC_THRESHOLDconstant (value:290000) ininclude/coinspec.inc.php. The specific amounts are derived from theREWARD_SCHEMEconstant ininclude/rewards.inc.php.
For each block, a single stake winner is selected from all eligible accounts based on a weight.
- Code Reference: The
getStakeWinnerfunction ininclude/class/Account.phpcalculates thisweightusing the formula:(current_block_height - last_transaction_height) * account_balance. The account with the highest weight wins.
The reward amount is determined by the block height.
- Code Reference: The
rewardfunction ininclude/class/Block.phpreads the reward structure from theREWARD_SCHEMEconstant ininclude/rewards.inc.php.