Reward Distribution

Tutorial on using vidpool tool

On VideoCoin network workers are paid for work they perform. Amount of work that each worker gets is proportional to the amount of stake that the worker holds on system, including stake from delegators. In order to incentivize delegators workers have to share payouts with them.

A worker, while registering with the VideoCoin network, advertises the percentage of payouts that it will share with delegators. The calculated rewards are distributed proportional to the delegated stake. Self stake is also used for the calculation and the worker will distribute the reward related to self-stake to it self.

The rewards from worker's payout are accumulated and distributed to delegators by running the VideoCoin Pool tool(vidpool) periodically by the worker.

The VideoCoin Pool tool (vidpool) tool is available as a docker image. Use the following command to pull the image.

docker pull registry.videocoin.net/vidpool/vidpool:latest

Prepare a configuration file required by the vidpool. A sample file is shown below. The values for the keys either obtained from VideoCoin support team or generated by the user as indicated in the table.

{
    "DataDir": "/tmp/vidpooldata/",
    "KeyFile": "worker-key.json",
    "Password": "",
    "StreamManagerAddress": "0xee714E6f2686929AE33614aAA332D67EaC9f5ede",
    "StakingManagerAddress": "0xe535420fD393C202c5F47aAfDc210fF36f697584",
    "WorkerChainURL": "https://symphony.dev.videocoin.net/",
    "PaymentsChainURL": "https://rpc.tst.publicmint.io:8545/",
    "LogLevel": "debug",
    "PaymentURLSpec": "https://explorer.tst.publicmint.io/tx/%s/token_transfers"
    "Auth": {
        "ClientID": "69cf5e81-5301-414f-9cd9-a39bbe06c0ff",
        "AuthURL": "d.dev.videocoin.network:5008"
    }
}

The vidpool tool can be run to distribute the rewards accumulated until the current mined block using the following command. The worker can optionally specify a block number until which the accumulated rewards calculated for distribution. The "from" block number i.e. starting block number for calculating reward accumulation is obtained from the persistant storage specified by either from a file stored in DataDir or contract located at BlockContractAddress on the VideoCoin blockchain.

vidpool -c <config file> payout [--dry-run] [--to block]

The distributed rewards will be deposited in the delegators accounts on PublicMint blockchain. With --dry-run option, transactions will be created but they won't be sent to blockchain. Following is an example output:

+--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+--------+
| DELEGATOR                                  | TRANSACTION URL                                                                                                          | AMOUNT |
+--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+--------+
| 0x262B68f6A7A1bE373fd36BDE19C9EC7fF875A81b | https://explorer.tst.publicmint.io/tx/0x8792808a086030c5cb323e7bb4b81df38f54deffac69bd8e26934812ee158054/token_transfers | 220    |
| 0x08a5077C9Be4C9e5a362f8b92B71a9a10E1d9934 | https://explorer.tst.publicmint.io/tx/0x1626c61644f656ca2b89e2baf3f9c46e9fe90bc7349203eedfaf15cb6c4018e3/token_transfers | 220    |
| 0xd4fb38060f68008e0aAcF49eC507AC9F62117C6C | https://explorer.tst.publicmint.io/tx/0xe7c14f637ad6ad21bb974637c32538a403efee89b0cc42308276975c8264af90/token_transfers | 220    |
| 0xc2cdA70eC0fE6B9f0918b6fb546124973dCb7Ad2 | https://explorer.tst.publicmint.io/tx/0xb17d1221e968a42a351450b260340b7ba9fafc54b18f3c92fc4b22764320c91d/token_transfers | 220    |
| 0x9D36BDF7B1420dDA449155dff434ce44D539E4f8 | https://explorer.tst.publicmint.io/tx/0xfdf477010a8c70be3f62b144a6503d98de3ed7d4031790101a2f248940e67c96/token_transfers | 220    |
+--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+--------+

Last updated