Task Development Guide
More details on task deployments coming soon!
When creating a new task, there are three main functions that define the task's logic, how results should be verified, and how rewards will be distributed. These are the functions:
The Task Function
This function contains the core logic of the Koii task and submits the proof of the work done by participating nodes to K2.
The Audit Function
This function verifies the validity of the submissions made by nodes. If a node's submission is invalid, an audit is initiated, and other participating nodes vote for or against the audit. If they cast a negative vote, the malicious node's stake is slashed and they are not eligible to receive rewards for completing the task.
Any significant aspects of the task, regardless of whether they are directly associated with bounties or not, should be subject to audits.
Please see the audit section for details.
The Distribution Function
This function generates a distribution list and submits it on-chain. A distribution list is a JSON object containing a key-value pair, where the key is the public key of the node that made the submission and the value is the number of KOII tokens to be rewarded to the node.