LIGHTPAPER
DMS, a nostr interface to the Decentralized anonymous Reward System built on top of Tari Network.
Decentralized Reward System Contract on the Tari Network: Empowering Collaboration and Fair Compensation
Introduction:
In the world of decentralized networks, the Tari Network stands out as a secure and privacy-focused blockchain built on the Monero (XMR) blockchain. Leveraging the power of the Tari Network, we present a smart contract that facilitates a transparent and collaborative reward system. This contract allows individuals to create tasks, provide rewards, and verify task completion, ensuring fair compensation and accountability. With its robust features and integration with the Tari blockchain and XTR currency token, this contract revolutionizes the way rewards are distributed and tasks are accomplished.
Contract Overview:
The smart contract, designed specifically for the Tari Network, offers a range of functionalities to support the reward system. It comprises several public methods accessible to users:
createTask:
This method enables anyone to register a desired task with a unique topic, description, symbol, and a timer of at least one week for completion. The task creator specifies the minimum reward and an initial deposit value, which adds to the contract's reward pool. Additionally, the method generates voting tokens for the sender, equal to the amount of reward offered.
addReward:
Users can support existing tasks by adding additional rewards. For each reward added, the supporter earns an equivalent number of tokens, proving their deposit. This method ensures that supporters are appropriately recognized and incentivized for their contributions.
taskCompletionCandidate:
Individuals claiming task completion can use this method to provide evidence. The provider must submit three URLs, an open text area, and a binary input, both limited to the capacity of a Tari contract. The method requires the TaskID, ensuring the completion is associated with the correct task.
acceptTask:
Once a task completion is claimed, supporters who deposited rewards for that specific task can use this method to accept or reject the completion. If more than two-thirds of the minted tokens for that task accept the completion, the task accomplisher receives the entire reward deposited. Tokens are deducted from the sender accepting the task, and an equal amount of ETH is sent to the task completion candidate.
withdrawalTimeout:
If the task timer expires without being considered complete, users can withdraw their equivalent deposited amount by exchanging their tokens.
listTasks:
This method provides a comprehensive list of all open tasks, including their respective rewards and the number of candidates who claim to have completed the tasks awaiting acceptance. It helps users navigate and identify tasks that align with their interests.
withdrawalTimeout2:
After five years of a task ID timing out, this method allows users to withdraw the total amount of ETH remaining in the contract for that task. The task ID is then considered "permanently expired," and no further methods work for that specific task ID.
Token Generation and Security:
For each task, the contract generates unique tokens that identify and accept only that specific task. The token name and identifier, referred to as the Symbol, are chosen by the task creator. The contract mints and sends an equal amount of task-specific tokens to the sender's wallet address for each XMR deposited as a reward.
To ensure security and prevent reentrancy attacks, the contract implements robust measures. It follows best practices and security standards set forth by the Tari Network, guarding against potential vulnerabilities and unauthorized access.
Conclusion:
With its innovative approach to reward systems, the smart contract running on the Tari Network transforms collaboration and compensation. By utilizing the Tari blockchain and XTR currency token, this contract provides a decentralized and secure environment for users to create tasks, support them, verify completions, and receive fair rewards. The transparent and accountable nature of this contract fosters a collaborative ecosystem where contributors and task accomplishers are duly recognized and incentivized.
Harnessing the power of the Tari Network and its privacy-focused architecture, this contract ensures the confidentiality and integrity of transactions, safeguarding user data and assets.
The integration of the contract with the Tari Test Network and Tari Mainnet further enhances its functionality and accessibility. Users can participate in the reward system using XMR and XTR currencies, benefiting from the efficiency and scalability of the Tari Network.
By adhering to the RPSL style and leveraging the Nostr NIP-04 private messaging interface, users can interact with the contract seamlessly. The contract understands RPSL commands and responds accordingly, enabling users to create tasks, support them, claim completions, and view task-related information easily.
With its emphasis on privacy, security, and fair compensation, this smart contract on the Tari Network revolutionizes the way rewards are distributed and tasks are accomplished. It empowers individuals to collaborate, contribute, and be rewarded for their efforts while maintaining the utmost privacy and security of their transactions. The Tari Network's robust infrastructure, coupled with the contract's innovative features, establishes a new standard for decentralized reward systems, fostering a more inclusive and equitable digital economy.
In conclusion, the smart contract running on the Tari Network introduces a groundbreaking reward system that leverages the Tari blockchain, XTR currency token, and advanced privacy features. It facilitates the creation, support, and verification of tasks while ensuring fair compensation and maintaining the highest level of security. This contract represents a significant step towards a decentralized and collaborative future, empowering individuals to participate in a transparent and rewarding ecosystem on the Tari Network.
Authors:
We are on Tari discord channel. Join the conversation, join the mob, show your code.