{"id":25640390,"url":"https://github.com/jeninsutradhar/azorion","last_synced_at":"2025-08-24T22:40:04.727Z","repository":{"id":278928299,"uuid":"937196346","full_name":"JeninSutradhar/azorion","owner":"JeninSutradhar","description":"Solana-based smart contract that enables users to complete tasks and earn SOL rewards dynamically based on demand-supply logic","archived":false,"fork":false,"pushed_at":"2025-03-01T14:46:15.000Z","size":253,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T14:11:12.235Z","etag":null,"topics":["anchor","anticheat","blockchain","decentralized","decentralized-applications","demand-supply-management","play-to-earn","smart-contracts","solana","solana-program"],"latest_commit_sha":null,"homepage":"https://azorion.netlify.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JeninSutradhar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-22T15:09:37.000Z","updated_at":"2025-03-22T23:20:53.000Z","dependencies_parsed_at":"2025-02-22T16:24:45.068Z","dependency_job_id":"1c2e44ef-4258-40f6-9ccb-b03f0406703d","html_url":"https://github.com/JeninSutradhar/azorion","commit_stats":null,"previous_names":["jeninsutradhar/azorion"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeninSutradhar%2Fazorion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeninSutradhar%2Fazorion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeninSutradhar%2Fazorion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeninSutradhar%2Fazorion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JeninSutradhar","download_url":"https://codeload.github.com/JeninSutradhar/azorion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248992207,"owners_count":21195007,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anchor","anticheat","blockchain","decentralized","decentralized-applications","demand-supply-management","play-to-earn","smart-contracts","solana","solana-program"],"created_at":"2025-02-23T04:22:33.456Z","updated_at":"2025-04-15T02:23:03.326Z","avatar_url":"https://github.com/JeninSutradhar.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azorion - Dynamic Task-Based Reward System on Solana\n\n[![Project Status](https://img.shields.io/badge/Status-Under_Development-yellow)](https://www.repostatus.org/#wip) [![Rust](https://img.shields.io/badge/Rust-orange?logo=rust)](https://www.rust-lang.org/) [![Anchor](https://img.shields.io/badge/Anchor-red?logo=anchor)](https://www.anchor-lang.com/) [![Solana](https://img.shields.io/badge/Solana-blue?logo=solana)](https://solana.com/) [![License](https://img.shields.io/badge/License-MIT-green)](https://opensource.org/licenses/MIT) [![Tests Passing](https://img.shields.io/badge/Tests-Passing-brightgreen)](https://your-test-results-url-here.com) [![Documentation](https://img.shields.io/badge/Documentation-Available-blue)](https://azorion.netlify.com) ![Website](https://img.shields.io/website?url=https%3A%2F%2Fazorion.netlify.app)\n\n\n\nAzorion is a **Solana smart contract** that powers a **task-driven reward system**, enabling users to earn **SOL dynamically** based on task availability and engagement levels. The system uses **real-time demand-supply mechanics** to adjust rewards, **prevent farming exploits**, and encourage **sustainable participation**.  \n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/d5eefb93-0aae-40d5-8758-55cc3f41c3a5\" alt=\"Azorion Logo\" width=300 height=280\u003e\n\u003c/p\u003e\n\n## **🔹 Key Features**  \n\n|                                                                  | |\n|--------------------------------|--------------------------------------------------------------------------------|\n| **Task-Based Rewards**         | Users earn **SOL** by completing on-chain tasks.                               |\n| **Dynamic Reward Adjustment**  | Rewards **increase or decrease** (±20%/±10%) based on task availability.       |\n| **Secure PDA Storage**         | Uses **Program Derived Addresses (PDA)** for tamper-proof tracking.           |\n| **Anti-Farming Protection**    | **Reduces rewards** for repeated task claims; resets when switching tasks.     |\n| **Cooldown System**            | **5-second delay** enforced between task completions to prevent spam.          |\n| **RNG Task Availability**      | **Randomized task enable/disable** every **10 seconds** to enhance engagement. |\n\nAt its core, Azorion establishes a demand-responsive incentive structure. Rewards are algorithmically increased during periods of high task availability and low user engagement, effectively incentivizing participation. Conversely, rewards are moderated when user activity exceeds available tasks, promoting system sustainability and preventing inflationary pressures.\n\n\n## 🛠️ Program Architecture\n\n![Architecture](https://github.com/user-attachments/assets/5299c3b2-620d-4ebe-9638-ece6eb9e29c8)\n\n\n## **🔹 Use Cases**  \nAzorion's dynamic reward system supports:  \n\n✔ **Play-to-Earn Games** – Task-based in-game incentives.  \n✔ **Educational Platforms** – Milestone-based rewards for learners.  \n✔ **Decentralized Work** – Demand-based compensation for freelancers.  \n✔ **Community Governance** – Rewarding proposal participation.  \n✔ **Loyalty Programs** – Engagement-driven incentives.  \n\n## ✅ Implementation Status\n| Feature                                      | Status      |\n| -------------------------------------------- | ----------- |\n| **Task-Based Reward System**                 | ✅ Completed |\n| **Dynamic Reward Adjustment**                | ✅ Completed |\n| **Program Derived Address (PDA) Storage**    | ✅ Completed |\n| **Anti-Farming Mechanism**                   | ✅ Completed |\n| **Cooldown System**                          | ✅ Completed |\n| **RNG-Based Task Availability**              | ✅ Completed |\n| **Security \u0026 Optimization**                   | ❌ Completed |\n| **Leaderboard (Top 5 Earners)**             | ❌ To be Implemented |\n| **Automated Tests**                          | ❌ Completed |\n\n## **🔹 Security Measures**  \n\n| **Security Aspect**       | **Implementation**                                                                  |\n|--------------------------|------------------------------------------------------------------------------------|\n| **Access Control**       | **Authority-restricted program initialization** and **parameter management**.     |\n| **Anti-Farming**         | Implements **progressive reward penalties** for repeated task farming.            |\n| **Data Integrity**       | Utilizes **Solana PDAs** to ensure **on-chain secure storage**.                   |\n| **Memory Safety**        | Built with **Rust**, ensuring **safe and secure memory management**.              |\n| **Security Audits**      | 🚧 **Planned periodic third-party audits** *(Required before production use).*   |\n\n💡 **Note:** *Azorion is currently under development. Deployment in production environments is not recommended until a formal audit is completed.*  \n\n---\n\n## **🔹 Program API**  \n\n| **Instruction**   | **Purpose**                                                   | **Arguments**                                               |\n|------------------|---------------------------------------------------------------|------------------------------------------------------------|\n| `initialize`     | Sets up **program state** (authority, SOL supply, task limits).  | `initial_supply: u64`, `min_available_tasks: u8`, `max_available_tasks: u8` |\n| `claim_reward`   | Allows users to **claim SOL rewards** for completing tasks.  | `activity_type: String` |\n| `randomize_tasks`| Refreshes **task availability** based on randomization logic. | *(No Arguments)* |\n\n---\n\n## **🔹 Deployment Instructions**  \n\n### **📌 Local Validator Deployment**  \n1️⃣ Start the local validator:  \n```sh\nsolana-test-validator\n```  \n2️⃣ Deploy the program:  \n```sh\nanchor deploy\n```  \n\n### **📌 Devnet Deployment**  \n1️⃣ Configure Solana to **Devnet**:  \n```sh\nsolana config set --url devnet\n```  \n2️⃣ Get **free test SOL**:  \n```sh\nsolana airdrop 5\n```  \n3️⃣ Deploy the program:  \n```sh\nanchor deploy --provider.cluster devnet\n```  \n\n### **📌 Testnet/Mainnet Deployment**  \n1️⃣ Switch to **Testnet/Mainnet**:  \n```sh\nsolana config set --url testnet  # For Testnet  \nsolana config set --url mainnet-beta  # For Mainnet  \n```  \n2️⃣ Ensure sufficient **SOL balance** for deployment.  \n3️⃣ Deploy the program:  \n```sh\nanchor deploy --provider.cluster testnet  # Use mainnet-beta for production  \n```  \n\n---\n\n## **🔹 Testing Overview**  \n\nAzorion undergoes **extensive testing** using **Mocha + Chai** for assertion-based validation.  \n\n| **Test Case**        | **Coverage**                                                                 |\n|----------------------|-----------------------------------------------------------------------------|\n| **Initialization**   | Ensures correct **program setup, authority verification**.                  |\n| **Reward Dynamics**  | Simulates **demand-based reward increases/decreases**.                      |\n| **Anti-Farming**     | Tests **progressive penalties for repeated task claims**.                   |\n| **Cooldowns**        | Verifies **5-second delay enforcement between claims**.                     |\n| **Security Checks**  | **Rejects unauthorized transactions, overflow, and invalid inputs.**       |\n\n---\n\n## 🔹 **Technology Stack:**  \n- **Blockchain:** Solana (Rust + Anchor)  \n- **Smart Contracts:** Rust, Anchor Framework  \n- **Testing \u0026 Deployment:** Solana Devnet, Anchor CLI, TypeScript (for tests)  \n\n## ⬆️ CHANGELOG\n- **Numerical Task Identifiers (Enums):** Replaced string task names with ActivityType enums, significantly improving efficiency in storage and processing. Tasks are now represented and handled internally using numerical IDs, which are faster to compare and less error-prone than strings.\n- **Improved RNG for Task Availability:** Modified the randomize_available_tasks function to use the block slot number from clock::Clock::get()?.slot as the source of randomness, making task availability less predictable and more resistant to potential manipulation compared to timestamp-based RNG.\n- **Error Handling:** Incorporated custom error codes using the ErrorCode enum to provide more informative and specific error messages, aiding in debugging and user feedback.\n- **Account Size Management:** Defined MAX_SIZE constants for ProgramState and User accounts and utilized them in #[account(space = ...)] to ensure rent exemption and prevent potential buffer overflow vulnerabilities.\n\n\n## 🗺️ Roadmap and Future Work\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/58968b40-ec07-4916-8d52-e199157c50e5\" alt=\"brand-page-laptop-on-desk\" width=500\u003e\n\u003c/p\u003e\n\n*   **Leaderboard Integration**\n*   **Frontend UI \u0026 SDK**\n*   **Regular Security Audits**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeninsutradhar%2Fazorion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeninsutradhar%2Fazorion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeninsutradhar%2Fazorion/lists"}