Closed
Milestone
Apr 3, 2023–Jun 13, 2023
Adaptive Inflation - Co-staking
Following Adaptive Inflation design phase
People: @mbouaziz (70%), @klakplok Reviewers: @lrand, @raphael-proust, @klakplok
-
split stake in distribution !8051 (merged) -
add stake operation for bakers !8120 (merged) -
do not freeze deposits automatically !8087 (merged) -
add parameter baking_edgestaking_over_baking_limit
!8744 (merged) -
change denunciation rewards: roll/(baking_edge+1) !8939 (merged) -
turn slashing into percentages !8753 (merged) -
store slashed percentage per baker (associative list: cycle -> percentage) !8828 (merged) -
add parameter max_costaking_baker_count = 5 !8766 (merged) -
remove Set_deposits_limit
!8831 (merged) -
add storage: costaking_balance: implicit -> pseudotokens -
add storage: uncostaking_requests: implicit -> (costaking bakers * (tez * cycle) list) list - on unstake
- merge head if same cycle
- auto-withdraw
- on withdraw:
- if element is older than preserved_cycle + slashing_period
- compute real tez value using aforementioned slashed percentages
- if element is older than preserved_cycle + slashing_period
- on unstake
-
update RPC balance -
change storage: staking_balance: tez (deposits), pseudotokens -
add baker pseudo-operation update_delegate_parameters: #5746 (closed) -
use costaking_limit when computing distribution -
rewards: #5790 (closed)
Behind feature flag:
-
freeze rewards !8091 (merged) -
apply staking_over_delegation_edge: #5791 (closed) -
stake for non-bakers - check costaking_limit (cap to max)
- reduce spendable balance
- increase baker staking_balance
- allocate pseudotokens
- update costaking_balance (as specified above)
-
unstake - decrease baker staking_balance
- compute pseudotokens
- decrease costaking_balance
- add a unstaking request
-
withdraw
Bonus:
-
remove Drain_delegate, or update it