Inspiration

The world of freelancing is built on platforms that act as trusted middlemen. While services like Upwork and Fiverr have enabled the gig economy, they also introduce centralization, high fees, and subjective conflict resolution. A freelancer's hard-earned reputation is trapped within a single platform, and disputes are often settled by an opaque, sometimes arbitrary, moderation process.

My inspiration for TaskChain came from a simple question: "Can we build a freelancing platform that runs itself?" The idea is to replace the centralized middleman with a transparent, autonomous system powered by a blockchain. It is a world where escrow is automated, reputation is a portable, on-chain asset you truly own, and disputes are settled fairly by a jury of one's peers, all governed by immutable code.

What it does

TaskChain is a fully decentralized freelancing parachain built on Substrate. It creates a trustless ecosystem for clients and freelancers to collaborate from project inception to final payment, without needing a central authority. Its core features are:

  • Automated Escrow: pallet-projects locks a client's funds on-chain when a project is created and automatically releases them to the freelancer upon successful completion, eliminating the need for a trusted financial intermediary.
  • Portable On-Chain Reputation: pallet-reputation tracks every user's history—projects completed, earnings, ratings, and dispute outcomes. This data is the foundation for a rich, verifiable professional identity that a user owns and can take anywhere.
  • Multi-Tiered Decentralized Arbitration: pallet-arbitration provides a structured, economically rational dispute resolution process. If a client rejects work:
    1. AI Arbitration (Round 1): The freelancer can initiate a fast, cheap arbitration handled by an AI oracle.
    2. Human Jury (Round 2 & 3): The losing party can appeal the decision to a jury of high-reputation peers, selected from a pool of staked users. The process uses escalating bonds to deter frivolous appeals.
  • Economic Security: Jurors must stake tokens to participate and they are paid for jury duty using the project funds. This "skin in the game" incentivizes fair and thoughtful voting, as misbehavior can lead to their stake being slashed.

How we built it

TaskChain is built as a Substrate parachain, leveraging the power and security of the Polkadot ecosystem. The architecture is modular and composed of three core pallets:

  1. pallet-projects: This is the base pallet as this is where projects are based. It uses Substrate's LockableCurrency trait to manage the entire project lifecycle, acting as the automated escrow engine and state machine for every job.
  2. pallet-reputation: This is the heart of the trust system. It uses a comprehensive ReputationData struct to store on-chain metrics. A key feature here was building a scalable juror selection system using BoundedVecs for each tier (Bronze, Silver, Gold), which allows for efficient, round-robin selection without performance degradation. Then I added a full staking and slashing mechanism using ReservableCurrency to provide economic security.
  3. pallet-arbitration: This pallet is modelled on the battle-tested ERC-792 Arbitration Standard but it is adapted for a multi-tiered, AI-first approach. It communicates with the other two pallets through clean, trait-based interfaces (Arbitrable and ReputationInterface), allowing it to request project data, select jurors, and execute final rulings without being tightly coupled. For the frontend:
  4. Next.js and React for the UI.
  5. Tailwind CSS for a clean, minimalist design.
  6. @polkadot/api and @polkadot/extension-dapp to connect to the parachain and interact with browser wallets like Talisman and SubWallet.

Challenges we ran into

  1. Rust's Trait System & Circular Dependencies 
  2. Genesis Configuration
  3. Frontend Wallet Integration

Accomplishments that we're proud of

  • A Functionally Complete On-Chain System: I am happy to have built a full, end-to-end system with three interconnected pallets that handle a project from creation to payment, including a complex, multi-stage dispute resolution process. The entire on-chain logic is complete.
  • Scalable Juror Selection: The juror selection algorithm is efficient and fair. By avoiding full storage iteration, I have ensured the system can scale to a large number of users without compromising performance or decentralization.
  • Innovative AI-First Arbitration: I believe that hybrid AI-then-human arbitration model is the best approach for this problem. It makes dispute resolution accessible and affordable for minor disagreements while retaining the robust security of human judgment for high-stakes conflicts.

What we learned

  1. The Power of Modular Pallet Design: Designing the pallets with clean interfaces from the start saved us countless hours. When we needed to connect pallet-arbitration, the Arbitrable and ReputationInterface traits made the integration logical and straightforward.
  2. The Devil is in the Details: From serde requirements in genesis configs to the nuances of LockableCurrency vs. ReservableCurrency, I learned that building on Substrate requires a deep understanding of its primitives. Every detail matters.
  3. Frontend is Half the Battle: A powerful backend is useless without a clear and intuitive user interface. Learning to bridge the gap between on-chain data and a responsive React frontend using @polkadot/api was a critical part of making the project tangible.

What's next for TaskChain

TaskChain is just the beginning. Our roadmap includes:

  1. Building Out the AI Oracle: We need to build the off-chain backend service that listens for events, communicates with an LLM like OpenAI or Google's Gemini, and submits rulings as the trusted AiOracleOrigin. A big issue is that multi-turn AI arbitration is a minefield. The LLMs can be jail-broken using specific prompts so getting warring parties to interact with AI agents is not a fully solvable problem for now. My current workaround is to have agents make decisions only on the submission requirements and the submitted work.
  2. Implementing a better Treasury and Juror Rewards: The bond slashing logic is currently simplistic. The plan is to build a proper treasury.
  3. Offchain Reputation Calculation: The idea is to use off chain workers and perform all the complex reputation calculations using off chain workers. Right now the reputation point system is fairly simple and can be gamed.
  4. XCM Integration: TaskChain proof of concept only uses native currency payment for simplicity. The idea is to have DOT, USDT, USDC payments available across multiple parachains and the asset hub using XCM instead.
  5. Extending point 1, the idea is to build an offchain messaging and notification system leveraging offchain workers.

Built With

Share this project:

Updates