Quantum Coin logo
  • Home
  • DogeProtocol.org
  • DpScan
  • Downloads
Quantum Coin logo
Quantum Coin logo
  • Home
  • DogeProtocol.org
  • DPscan
  • Community
    • Telegram
      Telegram

      @DogeProtocolCommunity

    • Discord
      Discord

      discord.gg/bbbMPyzJTM

    • Twitter
      Twitter

      @DogeProtocol1

    • Reddit
      Reddit

      /r/DogeProtocol1

Quantum Coin Docs

  • DPdocs homeHome
  • Quantum Coin Vision PaperVision
  • Quantum Coin WhitepapersWhitepapers
    • Quantum Resistance
    • Consensus (PoS)
    • Data Availability
    • Allocation
  • Quantum Coin FeaturesFeatures
    • Smart Contracts
    • Dynamic TPS
    • Block Explorer
  • Quantum Coin TestnetTestnet
    • About
    • Requirements
    • Setup
    • Connecting
    • Interacting
    • Staking
  • Quantum Coin TokensDogeP Tokens
  • Quantum Coin DownloadsDownloads
  • Quantum Coin Github source code, documentationGithub
  • DPdocs homeHome
  • Quantum Coin Vision PaperVision
  • Quantum Coin WhitepapersWhitepapers
    • Quantum Resistance
    • Consensus (PoS)
    • Data Availability
    • Allocation
  • Quantum Coin FeaturesFeatures
    • Smart Contracts
    • Dynamic TPS
    • Block Explorer
  • Quantum Coin TestnetTestnet
    • About
    • Major Changes
    • Requirements
    • Setup
    • Connecting
    • Interacting
    • Staking
  • DogeP TokensDogeP Tokens
  • Quantum Coin DownloadsDownloads
  • Quantum Coin Github source code, documentationGithub

Staking in proof-of-stake blockchain - Quantum Coin

Warning

You may notice that a lot of the commands are related to eth. This is because Quantum Coin blockchain uses the Ethereum code-base with quantum resistance and new features added to it.

Quantum Coin testnet is based on Ethereum code base with Quantum Resistance and other updates added on top of it. The node client software GETH of Ethereum was modified to achieve this functionality. The steps to interact with the blockchain including checking account balance, sending and receiving coins etc. remain the same. For more information, see Geth Console.

  1. Ensure that your account is connected to the blockchain.
    If you open a new command prompt or terminal, you will need to run the set (Windows) or export (Linux) commands again as described in the above link.
  2. Ensure that there are coins in your wallet for staking. If not, you can reach out in the Quantum Coin community support channel for testnet (Link to Discord in menu), to get some coins for testing.
  3. For Windows: Connect to the geth console; this is a pre-requisite for all further commands. Open a command prompt and change to the folder where geth is located. Then run the following command:
    geth attach \\.\pipe\geth.ipc
    If the command is successful, you should see a prompt show up, waiting for keyboard input. You will also see your account-address printed on screen, with the label "coinbase".
  4. Create validator account; For better security, the wallet (account) used for running validator nodes is different from your original wallet. Doing this allows you to keep your account wallet safe offline, such as in an air-gapped media. To create a validator account, open a command prompt and change to the folder where geth is located. Then run the following command:
    geth --datadir data account new
    You need to prefix the above command with .\ if you are using PowerShell in admin mode. Running the above command will also show your validator account address.
  5. Securely backup the content of the folder named data. This folder contains your validator account's quantum-resistant key.
  6. Run the following two commands: this will set the staking contract to be used in a subsequent step.
    set GETH_RAW_URL=\\.\pipe\geth.ipc
    set GETH_STAKING_CONTRACT_ADDRESS=0x248c9eeefcc6a45ff8556cbc046287220d4361d7
  7. Next, run the following two commands. Replace the address and password with the ones for your actual account that was created as described in Setting up blockchain node client:
    set GETH_STAKING_DEPOSITER=YourWalletAddressGoesHere
    set GETH_STAKING_DEPOSITER_PASS=YourWalletPasswordGoesHere
    While it is unsafe to set a password in an environment variable, it should be ok for the purpose of testing.
  8. Next, run the following two commands. Replace the address and password with the ones for your validator account as described in Step 4) in this document:
    set GETH_STAKING_VALIDATOR=YourValidatorAddressGoesHere
    set GETH_STAKING_VALIDATOR_PASS=YourValidatorPasswordGoesHere
    While it is unsafe to set a password in an environment variable, it should be ok for the purpose of testing.
  9. Stake some coins; Run the following two commands, replacing 11 with the number of coins you would like to stake. Your account should have so many coins in it, in order to stake.
    set GETH_STAKING_DEPOSIT_AMOUNT=11
    deposit.exe
    If the deposit is successful, you will get a transaction hash as a confirmation. In Testnet T3, you can stake only once from a given wallet. This limitation will be removed in subsequent testnets. From here on, your account will be eligible to get block rewards. These rewards will get deposited to your main wallet account. In Testnet T3, slashing has not been implemented yet, hence you will be able to get block rewards, even if you do not run the blockchain node. Once slashing is implemented (in a subsequent testnet), this classical proof-of-stake problem called as nothing-at-stake will be fixed.
  10. Withdraw coins; To withdraw staked coins, run the following two commands, replacing 10 with the number of coins you would like to withdraw.
    set GETH_STAKING_DEPOSIT_AMOUNT=10
    withdraw.exe
    If the deposit is successful, you will get a transaction hash as a confirmation. The amount will be withdrawn from the staking contract to your main wallet address. You may withdraw multiple times as long as you have enough balance in the staking contract.
  • About Testnet T3
  • Requirements
  • Setting up blockchain node client
  • Connecting to the blockchain
  • Connecting to the blockchain
  • Staking in the proof-of-stake blockchain
Quantum Coin Vision
Vision

The Vision of Quantum Coin.

Quantum Coin Quantum Resistance
Quantum Resistance

Quantum Resistance in the Quantum Coin blockchain.

Quantum Coin Blockchain Smart Contracts
Smart Contracts

Smart Contract support in the Quantum Coin blockchain.

Quantum Coin Proof-of-Stake consensus
Consensus

Proof of Stake consensus.

Data Availability in Quantum Coin Blockchain
Data Availability

Data Availability, long term and short term.

Quantum Coin Blockchain Allocation
Blockchain Allocation

Bitcoin + Ethereum + Dogecoin + DogeP multi-fork.

Dynamic Transactions Per Second model, Quantum Coin Blockchain
Dynamic TPS

Dynamic Transactions Per Second model.

DPscan Quantum Coin Block Explorer
Block Explorer

DPscan Blockchain Explorer.

About Testnet
Testnet

Testnet details, setup and usage.

Quantum Coin Downloads
Downloads

Download blockchain node client software.

Quantum Coin Github source code, documentation
Github

Source code, documentation are maintained in Github.

DogeP ERC20 Token
DogeP Tokens

About the DogeP ERC20 Token.

Help

Quantum Coin is developed and maintained by an open community. Hop on to the community discord server for help with development.

  • DogeProtocol.org - Website
  • DPscan - Block Explorer
  • Github - source code and documentation
  • Whitepapers - technology
Still stuck? Ask the dev community
On this page:
Documentation Introduction Help!

DogeProtocol.org