CIP No. | Title | Author | Status | Type | Created |
---|---|---|---|---|---|
97 |
Clear Staking Lists |
Chenxing Li(@ChenxingLi) |
Final |
Spec Breaking |
2022-06-13 |
Remove account's staking lists.
The staking lists of all accounts are removed in a lazy mode. After activating this CIP, when an account calls the withdraw
interface of the staking internal contract with a non-zero amount
for the first time, its staking list will be removed, and all the unsettled interest will be distributed to this account.
Some PoS mining pools allow users to delegate tokens to their contracts and distribute rewards from participating PoS. However, the staking lists of PoS mining pool contracts keep growing. This makes the gas consumption of a single "deposit" or "withdraw" operation grow linearly and will exceed the maximum gas limit for a transaction. After Hydra hardfork, CIP-43 is activated, and no more interest will be generated from staking. It is meaningless to maintain such a staking list. So we should remove the staking list to resolve the gas consumption issue.
- After this CIP is activated, for the first time an account calling the
withdraw
interface of the staking internal contract with non-zeroamount
, Conflux will distribute all the unsettled interest. - After the clearance of the staking list, the subsequent "deposit" and "withdraw" operations will not access the staking list.
- If an account makes a "deposit" operation before the clearance of its staking list, Conflux operations it as usual.
- The gas cost for
withdraw
interface of staking internal contract changes to 400 (SLOAD_GAS * 2
). - After the clearance of staking list, the gas cost for
deposit
interface of staking internal contract changes to 10000 (SSTORE_GAS * 2
).
TBA.
This change is spec breaking.
TBA.
TBA.
TBA.
Copyright and related rights waived via CC0.