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.
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.
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.
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:
Application will need to store small amount of the persistent data, for transactions recovery and latest processed block.
KeyFile
Key in Ethereum v3 format, encrypted with password. It will be used for transactions on PaymentsChain. Path must be absolute or relative to configuration file.
StreamManagerAddress
Used as a source for rewards. Obtain it from VideoCoin support site
StakingManagerAddress
Used as a source for delegation shares, Obtain it from VideoCoin support site
BlockContractAddress
Application needs to store last processed block in a safe place. By default we will store this block in a file inside DataDir, but there is also an option to deploy a contract on VideoCoin blockchain and use it for storage. If you want to store the last processed block number on blockchain, run the following command:
vidpool -c config.json deploy
WorkerChainURL
This URL gives access to VideoCoin blockchain. Obtain it from VideoCoin support site
PaymentsChainURL
This URL gives access to PublicMint blockchain. Obtain it from VideoCoin support site
ClientID
ClientID can be obtained from VideoCoin console while creating a worker.
AuthURL
d.dev.videocoin.network:5008. Obtain it from VideoCoin support site
Option
Description
c
Configuration file
dry-run
Reward distribution transactions are generated for display only i.e. won't be sent to blockchain
to
The block until which accumulated rewards are calculated for distribution