This article was first published on OntologyNetwork - Medium
On February 5th, 2019,the Ontology team informed all nodes to start an urgent upgrade of the stake authorisation on the MainNet.You can read the announcement here.
There are two ways for a node to increase its stake value:
1. By increasing the initial stake of the node, which is InitPos;
2. By accepting authorized stakes from individuals, which is TotalPos.
The funds information authorized by each user to the node is stored in the user node table:
Fields starting with Withdraw are the refund lock process. After each round, the locked funds will move down one layer, and only the funds in WithdrawUnfreezePos can be withdrawn from the contract.
The logic code for stake authorizer’s fee sharing is:
validatePos is the user’s valid staking to the node, including the funds that are cancelled but still in the lockout period. totalPos is the total authorized stake of the node. totalAmount is the total compensation assigned to all authorizations to the node.
While increasing the node stake authorization function, we allow nodes to increase and decrease their InitPos, and the reduced InitPos cannot be less than the PromisePos (promised stake) of the node. PromisePos is currently the initial staking value when the node first passed the application process. Reducing InitPos involves the withdrawal of funds, which will go through the unlocking process. The reduced InitPos will be treated as the node’s own authorized staking, which will increase its unlocking funds.
As a result, the locked funds of the node generated by its reduced InitPos behavior will be added in the node owner’s validatePos, thus the node will receive compensation that should not be assigned, which causes a funds error and system exception.
Before the full function was released on the Ontology MainNet, a node added its InitPos, and then reduced its InitPos by not ...
To keep reading, please go to the original article at:
OntologyNetwork - Medium