You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Staking works by locking funds for a period of time to support a specific network validator. The guide details out how to stake using the [flare-stake-tool](https://github.com/flare-foundation/flare-stake-tool) CLI.
3. You can specify the account from which staking will take place in different ways - [using Ledger](#using-ledger-recommended) or [using a private key](#using-private-key).
@@ -220,7 +223,7 @@ It is highly recommended to [use Ledger](#using-ledger-recommended) instead.
220
223
### Check validator info
221
224
222
225
1. Note down the `NodeID` of the validator you want to stake to:
223
-
- If you created the validator, retrieve its `NodeID` by running:
226
+
- If you created the validator, retrieve its `NodeID`, `publicKey` and `proofOfPossession` by running:
224
227
225
228
```bash
226
229
curl \
@@ -278,6 +281,7 @@ It is highly recommended to [use Ledger](#using-ledger-recommended) instead.
278
281
```plaintext
279
282
? What do you want to do? Move assets from C-chain to P-chain
280
283
? Enter amount (in FLR): 50000
284
+
? Enter fees (in FLR): (1)
281
285
```
282
286
283
287
:::warning[Transaction Fees]
@@ -295,19 +299,12 @@ It is highly recommended to [use Ledger](#using-ledger-recommended) instead.
295
299
Using network: flare
296
300
Fetching account from ledger...
297
301
Creating export transaction...
298
-
Using fee of 0.00028075 FLR
299
-
Please review and sign the transaction on your ledger device...
300
-
Sending transaction to the node...
301
-
Transaction with id ●●●●●●●● sent to the node
302
+
Transaction finalized!
302
303
// highlight-next-line
303
304
Please approve import transaction
304
305
Using network: flare
305
306
Fetching account from ledger...
306
-
Creating export transaction...
307
-
Please review and sign the transaction on your ledger device...
308
-
Sending transaction to the node...
309
-
Transaction with id ●●●●●●●● sent to the node
310
-
Finished execution
307
+
Creating import transaction...
311
308
```
312
309
313
310
If you encounter any issues during this process, refer to the [Troubleshooting](#troubleshooting) section.
@@ -324,27 +321,9 @@ If you encounter any issues during this process, refer to the [Troubleshooting](
324
321
325
322
- If you are going to stake to another node (delegation), select **Delegate to a validator node** (You may need to scroll down to see this option).
326
323
327
-
:::info[First-time address registration.]
328
-
329
-
The first time you use the **Add a validator node** or **Delegate to a validator node** options you are asked to sign an additional transaction.
330
-
This step is required so that staking rewards accrued on the P-chain can be claimed on the C-chain and participate in the wider ecosystem.
331
-
332
-
This procedure only needs to be done once per P-chain address:
333
-
334
-
```plaintext
335
-
Checking Address Registration...
336
-
No address found for key 0x●●●●●●●●
337
-
Note: You need to register your wallet address before you can delegate your funds
338
-
// highlight-next-line
339
-
Please complete this registration transaction to proceed
340
-
Submitting txn to the chain
341
-
```
342
-
343
-
:::
344
-
345
324
2. You then need to provide the following information:
346
325
-**amount**: Amount must be provided in FLR units.
347
-
-**NodeID**, **start time** and **end time**: Use the values noted down from the [setup](#setup).
326
+
-**NodeID** and **end time**: Use the values noted down from the [setup](#setup).
348
327
349
328
If you are adding a validator node, you also need to provide the proof of possession **BLS public key** and **BLS signature**.
350
329
@@ -381,7 +360,6 @@ If you encounter any issues during this process, refer to the [Troubleshooting](
381
360
? What do you want to do? Add a validator node
382
361
? Enter amount (in FLR): 50000
383
362
? Enter Node NodeId (E.g. NodeID-FQKTLuZHEsjCxPeFTFgsojsucmdyNDsz1): NodeID-●●●●●●●●
384
-
? Enter start time(E.g. 1693185095): ●●●●●●●●
385
363
? Enter end time(E.g. 1693185095): ●●●●●●●●
386
364
? Enter delegation fee(E.g. 10): 10
387
365
? Please enter the popBLSPublicKey: 0x●●●●●●●●
@@ -472,28 +450,22 @@ If you encounter any issues, refer to [Troubleshooting](#troubleshooting).
472
450
Using network: flare
473
451
Fetching account from ledger...
474
452
Creating export transaction...
475
-
Please review and sign the transaction on your ledger device...
476
-
Sending transaction to the node...
477
-
Transaction with id ●●●●●●●● sent to the node
453
+
? Enter fees (in FLR): (1)
478
454
// highlight-next-line
479
455
Please approve import transaction
480
456
Using network: flare
481
457
Fetching account from ledger...
482
-
Creating export transaction...
483
-
Using fee of 0.00028075 FLR
484
-
Please review and sign the transaction on your ledger device...
485
-
Sending transaction to the node...
486
-
Transaction with id ●●●●●●●● sent to the node
458
+
Creating import transaction...
487
459
Finished execution
488
460
```
489
461
490
462
If you encounter any issues, refer to [Troubleshooting](#troubleshooting).
491
463
492
-
## Claiming rewards
464
+
## Claiming staking rewards
493
465
494
466
At the end of every reward epoch, participants are rewarded according to how well their chosen validator performed in that period, but these rewards are not claimable yet. Every 4 reward epochs, rewards are accumulated in a dedicated smart contract and can then be claimed from the Flare Stake CLI tool:
495
467
496
-
1. Select the **Claim Rewards** option when executing:
468
+
1. Select the **Claim staking rewards** option when executing:
497
469
498
470
```bash
499
471
flare-stake-tool interactive
@@ -502,27 +474,77 @@ At the end of every reward epoch, participants are rewarded according to how wel
502
474
You are shown the amount of pending rewards (in wei) and are asked how much you want to claim (in FLR):
503
475
504
476
```plaintext
505
-
? What do you want to do? Claim Rewards
506
-
Checking your Rewards status...
507
-
You have unclaimed rewards worth 1000000000000000000
508
-
? Enter amount to claim (in FLR): 1
477
+
? What do you want to do? Claim staking rewards
478
+
State of rewards for 0x●●●●●●●●:
479
+
Total rewards: 2000.0 FLR
480
+
Claimed rewards: 1010.0 FLR
481
+
Unclaimed rewards: 990.0 FLR
509
482
```
510
483
511
-
2. Select **Receive with another wallet** and enter the C-chain address where you want the rewards to be sent.
512
-
This can be the same address from where you are staking.
484
+
2. Claim all or a portion of the rewards and optionally choose to wrap them or not:
485
+
486
+
<TabsgroupId="claim"block>
487
+
488
+
<TabItemvalue="all"label="Claim All"default>
489
+
490
+
```plaintext
491
+
? Do you want to claim all unclaimed rewards? (total unclaimed: 990.0 FLR) Yes
492
+
? Should claimed rewards be wrapped? Yes
493
+
```
494
+
495
+
</TabItem>
496
+
497
+
<TabItemvalue="partial"label="Claim Partial">
513
498
514
499
```plaintext
515
-
? Where do you want to receive your rewards? Receive with another wallet
516
-
? Please enter the C-address where you want to receive your rewards: 0x●●●●●●●●
500
+
? Do you want to claim all unclaimed rewards? (total unclaimed: 990.0 FLR) No
501
+
? Please enter the amount to claim: 100
502
+
? Should claimed rewards be wrapped? Yes
503
+
```
504
+
505
+
</TabItem>
506
+
507
+
</Tabs>
508
+
509
+
3. Decide the recipient address for the rewards - defaults to the address you used to connect to the Flare Stake Tool.
510
+
511
+
```plaintext
512
+
? Please enter the recipient address (default address is reward owner): 0x●●●●●●●●
517
513
```
518
514
519
515
You are then asked to confirm the staking transaction on your hardware wallet.
520
516
521
-
```text hl_lines="1"
522
-
Please sign the transaction on your ledger
523
-
Submitting txn to the chain
524
-
Rewards successfully claimed
525
-
Finished execution
517
+
```plaintext
518
+
Using network: flare
519
+
Creating claim transaction...
520
+
Signing transaction...
521
+
// highlight-next-line
522
+
Transaction with hash 0x●●●●●●●● built and sent to the network
523
+
```
524
+
525
+
## Transfer P-chain funds to another P-chain address
526
+
527
+
1. You can transfer P-chain funds to another P-chain address by selecting the **Transfer funds to another P-chain address** option:
528
+
529
+
```bash
530
+
flare-stake-tool interactive
531
+
```
532
+
533
+
```plaintext
534
+
? What do you want to do?
535
+
❯ Transfer funds to another P-chain address
536
+
Claim staking rewards
537
+
Quit
538
+
```
539
+
540
+
2. Select the amount to transfer and the destination P-chain address:
541
+
542
+
```plaintext
543
+
? Enter amount (in FLR): 100
544
+
? Please enter the destination P-chain address: P-flare●●●●●●●●
545
+
Using network: flare
546
+
Fetching account from ledger...
547
+
Creating transfer transaction...
526
548
```
527
549
528
550
## Troubleshooting
@@ -555,18 +577,38 @@ Try the operation again after a while.
555
577
Transfer operations require [an export and an import transaction](#move-funds-to-p-chain).
556
578
If the export succeeds, but then the import fails, it looks like the funds have disappeared from both chains, but they are still retrievable.
557
579
558
-
Repeat the failed import operation manually:
580
+
Importthefundsusingtheinteractivetool:
559
581
560
582
- If you are moving funds from the C-chain to the P-chain:
0 commit comments