Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Algorithms for when users withdraw their pledged coins #9

@mindcarver

Description

@mindcarver

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions