In the whole liquid staking system, the LiquidStaking.cdc contract serves as the Portal for Staking and Unstaking, and the DelegatorManager.cdc contract stores and manages all the underlying Delegators (shown in the figure below). In addition, there are some Delegation Strategy Bots and the responsibility of these bots is to choose which node to stake or unstake.
Liquid Staking System Structure
Flow blockchain currently has a total of 400-450 nodes, and there are about 300-350 nodes that can be staked and delegated (excluding access nodes).
How to choose a node is a very complex problem. The following will list some current judgment features, and we will continue to optimize and update in the future.
- Lifetime: The length of time the node provides services is a very important feature. A node that has been successfully running for a long time is considered reliable, while a newly added node needs more time to be considered.
- Historical slash records: A node that has been penalized multiple times in history will be considered unstable, which will greatly affect its final score.
- APY: This is an indicator that determines user's reward. However, since all nodes on the Flow blockchain currently share the same apr, we will continue to pay attention to it and achieve higher profit potential for users by reaching user reward cut reductions with trusted node operators.
- Node staking amount: Although Flow has a limit on the minimum staking amount of each node, the risk can also be reduced by biasing high-share staking nodes (the amount staked by the delegators is not included here).
- Delegator's staking amount: We found that some nodes are too concentrated to stake a lot of user assets, which is very dangerous (eggs cannot be put in one basket). At the same time, in order to take into some decentralizations, we will try to disperse the user's delegations as much as possible.
User Counter on Node
- Trusted node list: In addition to official nodes, we will cooperate with high-quality node operators to provide safer staking services and higher APY returns.
The bot takes care of multiple operations, mainly collection & updating $stFlow price, nodes selection, staking selection and unstaking selection.
- The collection bot will start working immediately at the beginning of each new Flow Epoch. After successfully collecting all the delegate infos, the bot will push the protocol to start the next new Protocol Epoch. Anyone can run this bot.
- The selection bot will also evaluate all nodes at the beginning of a new Epoch. When staking occurs, it will give priority to the average staking under the high-quality nodes; and will give priority to unstake from the low-scoring nodes.