Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Adjust circulating supply after slashing #24

Open
aakoshh opened this issue Jan 4, 2023 · 1 comment
Open

Adjust circulating supply after slashing #24

aakoshh opened this issue Jan 4, 2023 · 1 comment
Labels

Comments

@aakoshh
Copy link
Contributor

aakoshh commented Jan 4, 2023

Slashing can be achieved with at least two mechanisms: burning the stake of offending validators, or redistributing them to the others. This issue is about the former, which affects the number of tokens in existence, which can have an effect on the book keeping of circulating supply.

The current model of staking and circulating supply as far as I understand have the following characteristics:

  • Users can use the fund operation to move tokens from the parent subnet to the child subnet; this increases the circulating supply of the child subnet, which is maintained in the parent subnet.
  • Users can use the join and add collateral operations in the parent subnet to stake; this does not affect the circulating supply of the child subnet they are staking in.

Now let's consider a deeper hierarchy of subnets: the rootnet R, its subnet S, and a subnet of that, SS: R > S > SS.

Say validator V wants to stake in SS but they only have funds in R.

  1. First, they fund some tokens from R to S, locking them in R, increasing the CircSupply of S, and get their tokens credited to themselves in S.
  2. Then, they join SS in S, locking their stake in S, and getting their voting power in SS.
  3. Now, V does something untoward in SS, which is punishable by slashing in S.
  4. The committee validating SS produces a checkpoint which has the slashing message, the checkpoint is sent to S.
  5. V gets their stake burned in S. The total amount of tokens in the world has decreased, but R doesn't know.
  6. TODO: The CircSupply of S in R should be reduced and any locked tokens in R burned as well.

I haven't seen any operation in the spec that would allow burning tokens in R without releasing them to some address. This could be the turn address, but I think the current release operation (the opposite of fund) credits the tokens to the sender.

@guy-goren
Copy link

Like you suggested, it might be easier to just redistribute the "burned" amount in S. The redistribution should be done equally based on current accounts balances (linearly). This way, from a macro economic perspective, the effect is "equal" to burning. However, a classic burn operation is also possible to implement similarly to withdrawing.

@adlrocha adlrocha added the next label Jan 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants