-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial draft of staking, rewards & penalties. #36
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks promising, but it needs to align with the existing description of Hyperchains...
Co-authored-by: Hans Svensson <[email protected]>
Co-authored-by: Hans Svensson <[email protected]>
Co-authored-by: Hans Svensson <[email protected]>
Co-authored-by: Hans Svensson <[email protected]>
Co-authored-by: Hans Svensson <[email protected]>
#### **API Functions** | ||
|
||
1. **`deposit(producer:pubkey)`** (Payable Endpoint) | ||
- **Description**: Allows a participant to deposit tokens into the staking contract, increasing their Total Balance (TB) and Available Balance (AB). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
increasing their Total Balance (TB)
is above defined as "deposited in the staking contract via the stake()
function", but should probably be explained either there or here that this also includes the automatic restaking balance for which the stake()
function hasn't been called explicitly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as we discussed it would probably be needed to have the beneficiary be a contract that receives the epoch/cycle those rewards were for if payed out with a delay, or something in state that allows this information to be fetched
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks fine to me
- **Automatic Re-Staking:** | ||
- Tokens do not automatically unlock, instead if no change in staking is registerd they remain at stake. | ||
- Participants must call `adjustStake()` during the next Staking Epoch to free tokens during the next staking cycle. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might not make it into the first version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, probably lots of things not making it into the first version.
Co-authored-by: Hans Svensson <[email protected]>
Ill merge now. |
There are some details to be worked out.
Should rewards go through the staking contract or not?
We need to figure out exact details on how to spot and create evidence of misconduct.
Details about the size of the penalties.
When exactly does the tokens become locked. My current description is from the beginning of epoch N+1. That is, during the staking epoch you can increase and decrease your stake as you want it is only at the end of the epoch that amount is locked in. Of course if you have a stake from a previous cycle that stake is also locked in.
The details and the implementation of the chain economy will be done in the next iteration of Hyperchains after input from domain experts.