Browse Source

docs: add flow details

feat/mainnet-updates
Alexander Graebe 4 years ago
committed by Alexander Graebe
parent
commit
32e1547d04
  1. BIN
      public/images/stacking-delegation-illustration.png
  2. 14
      src/pages/understand-stacks/integrate-stacking.md
  3. 14
      src/pages/understand-stacks/stacking.md

BIN
public/images/stacking-delegation-illustration.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 KiB

14
src/pages/understand-stacks/integrate-stacking.md

@ -323,12 +323,14 @@ To display the unlocking time, you need to use the `firstRewardCycle` and the `l
## Implementing delegation
Flow:
~> Right now, the tooling does not support the delegation flow. However, the delegation flow can be implemented with contract calls to the Stacking contract
1. `delegate-stx`
2. `delegator-stack-stx`
3. `stack-aggregation-commit`
Stacking delegation requires you to implement a different flow. Until the provided tooling supportS this flow, it is best to implement the required contract calls directly.
Enable users to revoke delegation:
Below is a description of contract calls required to integrate delegation:
- `revoke-delegate-stx`
1. Account holder call the [`delegate-stx`](/references/stacking-contract#delegate-stx) method and provide the delegator address, the amount accessible to the delegator, the address rewards should be send to, and the burn height at which the delegation relationship should be terminated
2. For each delegation relationship that was created, the delegator calls the [`delegator-stack-stx`](/references/stacking-contract#delegate-stack-stx) method to lock up the STX token from the account holder. This method would need to be called until the delegator locked up enough STX tokens required to participate in Stacking
3. With pooling being completed and the minimum STX token threshold reached, the delegator calls the [`stack-aggregation-commit`](/references/stacking-contract#stack-aggregation-commit) to confirm participation in the next cycle(s)
In case STX token holders want to terminate the delegation relationship before it terminates as planned, they can call the [`revoke-delegate-stx`](http://localhost:3000/references/stacking-contract#revoke-delegate-stx) method

14
src/pages/understand-stacks/stacking.md

@ -39,14 +39,16 @@ If you would like to implement this flow in your own wallet, exchange, or any ot
The Stacking flow is different for delegation use cases:
- Before Stacking can be initiated for an account, the delegator needs to be granted permission to Stack on behalf of the account owner. The permission is restricted to the maximum amount the delegator is allowed to Stack. An account can only be associated with one single delegator
- The account holder can optionally restrict the reward address that must be used and the expiration burn block height for the permission, thus limiting the time a delegator has permission to Stack
- Delegators can lock Stacks from different accounts until they reach the minimum amount of Stacks required to participate in Stacking
- Once a delegator locks enough Stacks, they can finalize and commit their participation in the next reward cycle(s). The delegator must send a commitment for each account they want to include
![stacking flow](/images/stacking-delegation-illustration.png)
The separation of locks and commits allows delegators to lock up Stacks multiple times with different stackers to build up enough STX to clear the minimum reward threshold (i.e. pooling)
- Before Stacking can be initiated for a token holder, the delegator needs to be granted permission to Stack on behalf of the account owner. The permission is restricted to the maximum amount the delegator is allowed to Stack. An account can only be associated with one single delegator
- The account has to define the delegation relationship. They can optionally restrict the reward address that must be used and the expiration burn block height for the permission, thus limiting the time a delegator has permission to Stack
- Delegators have to lock Stacks from different accounts ("pooling phase") until they reach the minimum amount of Stacks required to participate in Stacking
- Once a delegator locks enough STX tokens, they can finalize and commit their participation in the next reward cycle(s). The delegator must send a commitment for each account they want to include
- Certain delegation relationships may allow the STX holder to receive the payout directly from the miner (step 5/6)
- The termination of the delegation relationship can either happen automatically based on set expiration rules or by actively revoking delegation rights
-> Note that the delegation flow allows reward addresses to be used multiple times. This is not the case for the individual Stacking flow
-> Note that the delegation flow allows reward addresses to be used multiple times. This is not the case for the individual Stacking flow.
## PoX mining

Loading…
Cancel
Save