In Unity PoS networks, any coin holder of a system can run a full node in the OAN network to produce PoS blocks, and we refer to these coinholders as stakers.
One of the components of the core staking mechanism, which is implemented as a privileged smart contract called Staker Registry. It manages the state of all coins that have been stated in the system to secure the PoS subsystem. We refer to the act of staking directly through the Staker Registy as private staking, and the coin holder does this is referred as solo staker.
This document aims to specify all requirements and information for becoming a solo staker on the OAN with Unity consensus.
Note: This guide is based on Engineering Design and Incentive Specification for Aion Unity and Aion Unity Smart Contracts.
The solo staker's primary obligation for being a block producer is to run an OAN-Unity full node that is well connected to the blockchain network. To meet this requirement, the staker should run computer hardware with comparable or better specifications than the following:
- Intel i7 (Skylake, 6th generation) processor with 2 cores, 8 threads.
- 8 GB of DDR4 RAM.
- 100GB SATA SSD.
- 50Mbps dedicated internet connection.
The solo staker is required to manage the following four keys, which correspond to a distinct function in the operation of the staker:
- The address corresponding to this key is the identity of the staker and it is recorded in the Staker Registry.
- Each identity key can only be used once to register a staker and there is no mechanism to replace this key with another one.
- The solo staker uses this key to register as a staker in the Staker Registry.
- This key should be kept in cold storage (HSM) at all times, and only be retrieved when the management tasks need to be performed. This key is irreplaceable.
- The solo staker uses this key to perform all management tasks, including:
- Register as a solo staker.
- Update a state of a staker.
- Update the registered coinbase address.
- Update the registered block-signing address.
- Bond, unbond and transfer stake.
- This key entitles the rights to produce PoS blocks on behalf of the stake owned by the staker.
- This key is required to be kept online and connected to the OAN-Unity Network so that the staker signs the block if it won the PoS lottery.
- This private key is suggested to be loaded in the memory of an appropriately permissioned process, or in a commercial HSM that supports ED25519 signatures.
- The staker is responsible for providing this key upon staker registration in Staker Registry_. While submitseed(the RPC call), the staker is responsible to input the same block signing address as the one they have set in the Staker Registry. Otherwise, the block will be considered as invalid.
- A solo staker should revoke this key and replace it with a new one in the Staker Registry using the management key if the key is compromised (the attacker can censor transactions within the blocks supported by the delegated stake).
- PoS block rewards get paid out to the address corresponding to this key.
- This address can be a contract. If so, it mush be secured from known attacks on contract balances. If this address is a user account, the owner of the account is responsible for securing it appropriately.
Note: Do not use an exchange address for management key and block-signing key while registering for a staker since the staker needs to control the private keys for these accounts to perform staker actions.
Solo staker can perform the following actions during the life-cycle of the private staking using management key.
Solo staker is responsible for registering with the Staker Registry as a staker.
The staker must sign up to the Staker Registry with the following information:
identity address: The identity address of the staker.
signing address: The address corresponding to the secret key that the solo staker will use to sign the blocks produced.
coinbase address: The address used for collecting block rewards.
Solo staker has to register with a amount(sending the AION along with the registration call) that is equal or more than the required minimum self-bonded stake (1000 AION), otherwise, the registration will be rejected.
Staker Registry smart contract method:
/** * Registers a staker. The caller address will be the management address of the new staker. * Note that the minimum self bond value should be passed along the call. * * @param identityAddress the identity of the staker; can't be changed * @param signingAddress the address of the key used for signing PoS blocks * @param coinbaseAddress the address of the key used for collecting block rewards * */ void registerStaker(Address identityAddress, Address signingAddress, Address coinbaseAddress)
After a successful registration, the staker is automatically in an active state and can produce PoS blocks.
Sole staker can manage the stake by bonding and unbonding towards to the staker, or
transfering the bonded stake to another staker.
The solo staker can use any key to bond to oneself to increase the stake:
/** * Bonds the stake to the staker. Any liquid coins, passed along the call become locked stake. * * @param staker the address of the staker */ void bond(Address staker)
Due to security constraints of the AVM computation metering system, two disparate transactions: an initiating transaction(unbond) and a finalizing transaction(finalise unbond) have to be implemented.
The solo staker can use management key to unbond and withdraw the stake from a staker to reduce the stake:
/** * Unbonds for a staker, After a successful unbond, the locked coins will be released to the original bonder (management address). * @param staker the address of the staker * @param amount the amount of stake * @param fee the amount of stake that will be transferred to the account that invokes finalizeUnbond * @return a pending unbond identifier */ long unbond(Address staker, BigInteger amount, BigInteger fee)
For a period, measured in the number of blocks since the un-bond action, the coin will be in the thawing lockout state, where it will be held in the staking contract and will neither contribute to stake securing the system nor will it be liquid until the unbonding period has elapsed. The lockout time is set to be 8640 blocks, which is approximately 1 day under normal network conditions.
The finalization action has to be taken for un-bond and it has to be performed after un-bonding thawing lockout period(8640 blocks):
/** * Finalizes an unbond operation, specified by id. * * @param id the pending unbond identifier */ void finalizeUnbond(long id)
Any user in the network can finalize a request and get the fee as requester set.
The solo staker must update the block-signing address using management key in the Staker Registry if they suspect their hot-key has been compromised.
/** * Updates the signing address of a staker. * Can only be invoked by the management address. * * @param newSigningAddress the new signing address */ void setSigningAddress(Address staker, Address newSigningAddress)
There is a block-signing address cooling period for the solo staker to update the signing address. The solo staker is allowed to update the signing address every 60480 blocks, which is approximately 7 days under normal network conditions.
Updated almost 4 years ago