2020-03-26 17:40:08 +00:00
.. _worklock-guide:
2020-02-21 17:00:12 +00:00
==============
WorkLock Guide
==============
2020-02-10 12:49:45 +00:00
Overview
--------
2020-04-21 19:20:28 +00:00
:ref: `worklock-architecture` is the distribution mechanism for the NuCypher token.
2020-04-16 23:09:02 +00:00
WorkLock CLI
------------
2020-02-21 17:00:12 +00:00
The `` nucypher worklock `` CLI command provides the ability to participate in WorkLock. To better understand the
commands and their options, use the `` --help `` option.
2020-02-10 12:49:45 +00:00
All `` nucypher worklock `` commands share a similar structure:
.. code ::
2020-04-20 18:38:01 +00:00
(nucypher)$ nucypher worklock <COMMAND> [OPTIONS] --network <NETWORK> --provider <YOUR PROVIDER URI>
2020-02-10 12:49:45 +00:00
Replace `` <YOUR PROVIDER URI> `` with a valid node web3 node provider string, for example:
2020-05-01 19:16:57 +00:00
- `` ipc:///home/<username>/.ethereum/geth.ipc `` - IPC Socket-based JSON-RPC server
- `` https://<host> `` - HTTP(S)-based JSON-RPC server
2020-05-14 18:50:24 +00:00
- `` wss://<host>:8080 `` - Websocket(Secure)-based JSON-RPC server
2020-02-10 12:49:45 +00:00
Show current WorkLock information
---------------------------------
2020-02-13 10:25:56 +00:00
You can obtain information about the current state of WorkLock by running:
2020-02-10 12:49:45 +00:00
.. code ::
2020-04-10 13:26:40 +00:00
(nucypher)$ nucypher worklock status --network <NETWORK> --provider <YOUR PROVIDER URI>
2020-02-10 12:49:45 +00:00
2020-04-17 20:51:22 +00:00
The following is an example output of the `` status `` command (hypothetical values):
.. code ::
_ _ _ _ _
| | | | | | | | | |
| | | | ___ _ __ | | __| | ___ ___ | | __
| |/\| | / _ \ | '__|| |/ /| | / _ \ / __|| |/ /
\ /\ /| (_) || | | < | |____| (_) || (__ | <
\/ \/ \___/ |_| |_|\_\\_____/ \___/ \___||_|\_\
══ <NETWORK> ══
Reading Latest Chaindata...
Time
══════════════════════════════════════════════════════
2020-07-02 15:27:01 +00:00
Escrow (Closed)
2020-04-17 20:51:22 +00:00
------------------------------------------------------
2020-07-09 15:29:03 +00:00
Allocations Available . Yes
2020-04-17 20:51:22 +00:00
Start Date ............ 2020-03-25 00:00:00+00:00
End Date .............. 2020-03-31 23:59:59+00:00
Duration .............. 6 days, 23:59:59
Time Remaining ........ Closed
Cancellation (Open)
------------------------------------------------------
End Date .............. 2020-04-01 23:59:59+00:00
Duration .............. 7 days, 23:59:59
Time Remaining ........ 1 day, 2:47:32
Economics
══════════════════════════════════════════════════════
Participation
------------------------------------------------------
Lot Size .............. 280000000 NU
2020-07-09 15:29:03 +00:00
Min. Allowed Escrow ... 15 ETH
2020-04-17 20:51:22 +00:00
Participants .......... 1000
ETH Supply ............ 50000 ETH
ETH Pool .............. 50000 ETH
2020-07-02 15:27:01 +00:00
Base (minimum escrow)
2020-04-17 20:51:22 +00:00
------------------------------------------------------
2020-04-20 15:52:11 +00:00
Base Deposit Rate ..... 1000 NU per base ETH
2020-04-17 20:51:22 +00:00
2020-07-02 15:27:01 +00:00
Bonus (surplus over minimum escrow)
2020-04-17 20:51:22 +00:00
------------------------------------------------------
Bonus ETH Supply ...... 35000 ETH
Bonus Lot Size ........ 265000000 NU
2020-04-20 15:52:11 +00:00
Bonus Deposit Rate .... 7571.43 NU per bonus ETH
Refunds
------------------------------------------------------
Refund Rate Multiple .. 4.00
Bonus Refund Rate ..... 1892.86 units of work to unlock 1 bonus ETH
Base Refund Rate ...... 250.0 units of work to unlock 1 base ETH
* NOTE: bonus ETH is refunded before base ETH
2020-04-17 20:51:22 +00:00
For the less obvious values in the output, here are some definitions:
- Lot Size
2020-07-02 15:27:01 +00:00
NU to be allocated by WorkLock
2020-04-17 20:51:22 +00:00
- ETH Supply
2020-07-02 15:27:01 +00:00
Sum of all ETH escrows that have been placed
2020-04-17 20:51:22 +00:00
- ETH Pool
2020-04-20 17:27:07 +00:00
Current ETH balance of WorkLock that accounts for refunded ETH for work performed i.e. `ETH Supply` - `Refunds for Work`
2020-04-17 20:51:22 +00:00
- Refund Rate Multiple
2020-07-02 15:27:01 +00:00
Indicates how quickly your ETH is unlocked relative to the deposit rate e.g. a value of `` 4 `` means that you get your ETH refunded 4x faster than the rate used when you were allocated NU
2020-04-20 15:52:11 +00:00
- Base Deposit Rate
2020-07-02 15:27:01 +00:00
Amount of NU to be allocated per base ETH in WorkLock
2020-04-17 20:51:22 +00:00
- Bonus ETH Supply
2020-07-02 15:27:01 +00:00
Sum of all bonus ETH escrows that have been placed i.e. sum of all ETH above minimum escrow
2020-04-17 20:51:22 +00:00
- Bonus Lot Size
2020-07-02 15:27:01 +00:00
Amount of NU that is available to be allocated based on the bonus part of escrows
2020-04-17 20:51:22 +00:00
- Bonus Deposit Rate
2020-07-02 15:27:01 +00:00
Amount of NU to be allocated per bonus ETH in WorkLock
2020-04-17 20:51:22 +00:00
- Bonus Refund Rate
2020-04-20 15:52:11 +00:00
Units of work to unlock 1 bonus ETH
- Base Refund Rate
Units of work to unlock 1 base ETH
2020-04-17 20:51:22 +00:00
2020-07-02 15:27:01 +00:00
If you want to see specific information about your current escrow, you can specify your participant address with the `` --participant-address `` flag:
2020-02-10 12:49:45 +00:00
.. code ::
2020-07-02 15:27:01 +00:00
(nucypher)$ nucypher worklock status --participant-address <YOUR PARTICIPANT ADDRESS> --network <NETWORK> --provider <YOUR PROVIDER URI>
2020-02-10 12:49:45 +00:00
2020-07-02 15:27:01 +00:00
The following output is an example of what is included when `` --participant-address `` is used
2020-04-17 20:51:22 +00:00
.. code ::
2020-07-02 15:27:01 +00:00
WorkLock Participant <PARTICIPANT ADDRESS>
2020-04-17 20:51:22 +00:00
=====================================================
2020-07-09 15:29:03 +00:00
NU Claimed? .......... No
Total Escrow ......... 22 ETH
2020-04-20 15:52:11 +00:00
Base ETH ......... 15 ETH
Bonus ETH ........ 7 ETH
2020-07-09 15:29:03 +00:00
NU Allocated ......... 68000 NU
2020-04-20 15:52:11 +00:00
Completed Work ....... 0
Available Refund ..... 0 ETH
Refunded Work ........ 0
2020-04-20 17:27:07 +00:00
Remaining Work ....... <REMAINING WORK>
2020-04-20 15:52:11 +00:00
2020-07-02 15:27:01 +00:00
Alternatively, when the NU has been allocated, the following is an example of the output
2020-04-20 15:52:11 +00:00
.. code ::
2020-07-02 15:27:01 +00:00
WorkLock Participant <PARTICIPANT ADDRESS>
2020-04-20 15:52:11 +00:00
=====================================================
2020-07-09 15:29:03 +00:00
NU Claimed? .......... Yes
2020-04-20 18:38:01 +00:00
Locked ETH ........... 22 ETH
2020-04-17 20:51:22 +00:00
Completed Work ....... 0
Available Refund ..... 0 ETH
Refunded Work ........ 0
2020-04-20 17:27:07 +00:00
Remaining Work ....... <REMAINING WORK>
2020-04-17 20:51:22 +00:00
where,
2020-07-02 15:27:01 +00:00
- Total Escrow
WorkLock Escrow
2020-04-20 15:52:11 +00:00
- Base ETH
2020-07-02 15:27:01 +00:00
Minimum required escrow
2020-04-20 15:52:11 +00:00
- Bonus ETH
2020-07-02 15:27:01 +00:00
Surplus over minimum escrow
- NU Allocated
Allocation of NU
2020-04-20 18:38:01 +00:00
- Locked ETH
2020-04-20 17:27:07 +00:00
Remaining ETH to be unlocked via completion of work
2020-07-09 15:29:03 +00:00
- NU Claimed
2020-07-02 15:27:01 +00:00
Whether the allocation of NU tokens has been allocated or not
2020-04-17 20:51:22 +00:00
- Completed Work
2020-07-02 15:27:01 +00:00
Work already completed by the participant
2020-04-17 20:51:22 +00:00
- Available Refund
ETH portion available to be refunded due to completed work
- Refunded Work
Work that has been completed and already refunded
- Remaining Work
2020-07-02 15:27:01 +00:00
Pending amount of work required before all of the participant's escrowed ETH will be refunded
2020-04-17 20:51:22 +00:00
2020-02-10 12:49:45 +00:00
2020-07-02 15:27:01 +00:00
Place an escrow
---------------
2020-02-10 12:49:45 +00:00
2020-07-02 15:27:01 +00:00
You can place an escrow to WorkLock by running:
2020-02-10 12:49:45 +00:00
.. code ::
2020-07-02 15:27:01 +00:00
(nucypher)$ nucypher worklock escrow --network <NETWORK> --provider <YOUR PROVIDER URI>
2020-02-10 12:49:45 +00:00
2020-07-02 15:27:01 +00:00
Recall that there's a minimum escrow amount needed to participate in WorkLock.
2020-03-22 15:32:05 +00:00
2020-07-02 15:27:01 +00:00
Cancel an escrow
----------------
2020-02-10 12:49:45 +00:00
2020-07-02 15:27:01 +00:00
You can cancel an escrow to WorkLock by running:
2020-02-10 12:49:45 +00:00
.. code ::
2020-07-02 15:27:01 +00:00
(nucypher)$ nucypher worklock cancel-escrow --network <NETWORK> --provider <YOUR PROVIDER URI>
2020-02-07 15:50:05 +00:00
Claim your stake
----------------
2020-07-02 15:27:01 +00:00
Once the allocation window is open, you can claim your NU as a stake in NuCypher:
2020-02-07 15:50:05 +00:00
.. code ::
2020-04-10 13:26:40 +00:00
(nucypher)$ nucypher worklock claim --network <NETWORK> --provider <YOUR PROVIDER URI>
2020-02-07 15:50:05 +00:00
2020-07-02 15:27:01 +00:00
Once allocated, you can check that the stake was created successfully by running:
2020-02-07 15:50:05 +00:00
.. code ::
2020-07-02 15:27:01 +00:00
(nucypher)$ nucypher status stakers --staking-address <YOUR PARTICIPANT ADDRESS> --network {network} --provider <YOUR PROVIDER URI>
2020-03-03 16:25:58 +00:00
2020-03-22 15:32:05 +00:00
Check remaining work
--------------------
If you have a stake created from WorkLock, you can check how much work is pending until you can get all your ETH locked in the WorkLock contract back:
.. code ::
2020-04-10 13:26:40 +00:00
(nucypher)$ nucypher worklock remaining-work --network <NETWORK> --provider <YOUR PROVIDER URI>
2020-03-22 15:32:05 +00:00
2020-03-03 16:25:58 +00:00
Refund locked ETH
2020-03-03 22:04:40 +00:00
-----------------
2020-03-03 16:25:58 +00:00
2020-07-02 15:27:01 +00:00
If you've committed some work, you are able to refund proportional part of ETH you've escrowed in the WorkLock contract:
2020-03-03 16:25:58 +00:00
.. code ::
2020-04-10 13:26:40 +00:00
(nucypher)$ nucypher worklock refund --network <NETWORK> --provider <YOUR PROVIDER URI>