Staking guide

abeychain adopts hybrid consensus, fPow + DPoS. The DPoS committee members use pbft protocol to produce fast blocks which include transactions and to confirm the previous snail blocks. The fPoW miners mine fruits (point to fast blocks) and snail blocks (include fruits) to resit the long range attack and to prevent tampering.

Reward

The business module of abeychain is deflation. The staking reward wil deflate 20% every year. From March 30th 2020, the annumal reward will be 3,000,000, 2,400,000, 1,920,000, ...

Validator

Validators are the DPoS committee members to process transactions. The minimum amount to be validator is 20,000 abey.

The recommended specifications for running a validator node is:

  • 4 cores CPU

  • 16G RAM

  • 200G disk space

  • 4Mpbs bandwidth

  • public ip address to participate the committee

Locked Time

Assets will freeze after staking. And 25,000 fast blocks(about 15 days) need to unfreeze.

Stake Guide

Stake/withdraw option is based a system contract, everyone can call the contract functions to do these actions. And the node provide some RPC APIs to request the stake and reward information. We also provide a staking CLI to stake easily.

Staking Contract

abeychain staking contract is deployed at address:

Definitions of all contract functions here

RPC and SDK

The RPC APIs definitions are here

Building CLI

abeychain Staking CLI is a tool, which can call deposit contract participate in POS. See this page for more information.

Building-abeychain

Follow the appropriate link below to find installation instructions for your platform.

PrePare

gabey support rpc

gabey will listen all ip address when giving --rpcaddr 0.0.0.0, you can give the exact ip address that want to connect, or --rpcaddr 127.0.0.1 only allow running on the host to connect gabey.

gabey support BFT

bftip must be public ip, open firewall port 8545(rpc),30310(bftport),30311(bftport2)

start normal params

Building the source

Building impawn requires both a Go and a C compiler. Once the dependencies are installed, run

Staking-CLI

The process of abeychain Staking-ClI is divided into three parts. First, on the premise of ensuring the balance of the account, Launch a Impawn transaction, only if the amount of deposit(value) is greater than 2W abey can participate in the election of the committee. If you ready to withdraw from the committee's POS consensus next epoch, Launch a Cancel transaction in the current epoch. After waiting for 15 days, we need to actively launch Withdraw transaction. The extracted abey will be immediately transferred to the specified account.

  • Since Impawn needs to be greater than 2W which can invoked successfully, Append can be used if the impawn amount is less than 2W.

  • Update fee can invoke UpdateFee

  • Update pk can invoke UpdatePK

  • Query balance or reward info use QueryReward

Impawn

This command explain:

  • --keystore flag show load private key in UTC--2018-09-07T07-45-16.954721700Z--xxxxxxxxxx file.

  • --rpcaddr --rpcport flag show connect node ip + port,this node should you run validator node, because of it will use your local bft pk to election.

  • --value deposit >=20000 abey to staking address, the validator can be selected as a candidate.

  • --fee fee(0-10000) set to 5000, smaller the value, lower benefit to the delegate, higher the value, higher benefit, the rate = fee / 10000.

Output Log

Cancel

This command explain:

  • --keystore flag show load private key in UTC--2018-09-07T07-45-16.954721700Z--xxxxxxxxxx file.

  • --rpcaddr --rpcport flag show connect node ip + port,this node should you run validator node, because of it will use your local bft pk to election.

  • --value want cancel count abey.

  • cancel withdraw must call cancel first, sub command cancel represent you want cancel 10 abey to locked state, next epoch can withdraw. .

Output Log

QueryStaking

This command explain:

  • --keystore flag show load private key in UTC--2018-09-07T07-45-16.954721700Z--xxxxxxxxxx file.

  • --rpcaddr --rpcport flag show connect node ip + port,this node should you run validator node, because of it will use your local bft pk to election.

  • querystaking print in staking count(Staked), already cancel count(Locked), can withdraw count(Unlocked)..

  • Print withdraw height, after this, you can call withdraw, if lock equal false, can instant withdraw .

  • If Unlocked not equal zero, can instant withdraw print amount.

Output Log

Withdraw

if you use query staking find Unlocked not equal zero.

use this command

This command explain:

  • --keystore flag show load private key in UTC--2018-09-07T07-45-16.954721700Z--xxxxxxxxxx file.

  • --rpcaddr --rpcport flag show connect node ip + port,this node should you run validator node, because of it will use your local bft pk to election.

  • --value want withdraw count abey.

  • withdraw Sub command append represent you want withdraw 10 abey to your address .

Output Log

Append

This command explain:

  • --keystore flag show load private key in UTC--2018-09-07T07-45-16.954721700Z--xxxxxxxxxx file.

  • --rpcaddr --rpcport flag show connect node ip + port,this node should you run validator node, because of it will use your local bft pk to election.

  • --value want append count abey.

  • append Sub command append represent you want c6uontinue staking after already having deposit.

Output Log

UpdateFee

This command explain:

  • --keystore flag show load private key in UTC--2018-09-07T07-45-16.954721700Z--xxxxxxxxxx file.

  • --rpcaddr --rpcport flag show connect node ip + port,this node should you run validator node, because of it will use your local bft pk to election.

  • --fee fee(0-10000) set to 5000, smaller the value, lower benefit to the delegate, higher the value, higher benefit, the rate = fee / 10000.

  • updatefee Sub command append represent only update validator fee(0-10000), which will influence delegator benefit.

Output Log

UpdatePK

This command explain:

  • --keystore flag show load private key in UTC--2018-09-07T07-45-16.954721700Z--xxxxxxxxxx file.

  • --rpcaddr --rpcport flag show connect node ip + port,this node should you run validator node, because of it will use your local bft pk to election.

  • --bftkey 647eeeb80193a47a02d31939af29efa006dbe6db45c8806af764c18b262bb90b private key or use --pubkey + public key.

  • updatepk Sub command updatepk represent only update validator pk, committee communication identify.

Output Log

QueryReward

This command explain:

  • --keystore flag show load private key in UTC--2018-09-07T07-45-16.954721700Z--xxxxxxxxxx file.

  • --rpcaddr --rpcport flag show connect node ip + port,this node should you run validator node, because of it will use your local bft pk to election.

  • queryreward print valid balance and lock balance, and every snail block your reward.

Output Log

Send

This command explain:

  • --keystore flag show load private key in UTC--2018-09-07T07-45-16.954721700Z--xxxxxxxxxx file.

  • --rpcaddr --rpcport flag show connect node ip + port,this node should you run validator node, because of it will use your local bft pk to election.

    • --address to address that you want send.

  • --value want transfer count abey.

  • send Sub command append represent send normal transaction not contract,value is transfer value.

Output Log

QueryTx

This command explain:

  • --rpcaddr --rpcport flag show connect node ip + port,this node should you run validator node, because of it will use your local bft pk to election.

  • --txhash send transaction hash.

  • querytx Sub command append represent specify txhash to query.

Output Log

Last updated

Was this helpful?