Skip to content
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

Algorithms for when users withdraw their pledged coins #9

Open
mindcarver opened this issue Aug 3, 2022 · 0 comments
Open

Algorithms for when users withdraw their pledged coins #9

mindcarver opened this issue Aug 3, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@mindcarver
Copy link
Contributor

mindcarver commented Aug 3, 2022

background

For those who pledge to mine, the pledge deposit can not be withdrawn at any time, but there is a lock-up period. The specific algorithm is as follows

ib:initial pledge deposit
ab:additional pledge deposit
sno:starting block (this height is constantly changing with additional pledges)
cn:current block
lockt:number of locked blocks (fixed lock duration)

Delay δh blocks, users can withdraw

$$ \delta h = \frac{ib}{ib+ab} *max((sno + lockt - cno),0) + \frac{ab}{ib+ab} * lockt $$

If δh is less than half of lockt, δh = 1/2 lockt, otherwise δh

@mindcarver mindcarver self-assigned this Aug 3, 2022
@mindcarver mindcarver added the enhancement New feature or request label Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant