Skip to content
Milesstone

Milesstone

Every agreement deserves protection .

Created on 29th November 2026

•

Milesstone

Milesstone

Every agreement deserves protection .

The problem Milesstone solves

Freelancers and software agencies routinely agree on projects over WhatsApp or LinkedIn, where advance payments create an asymmetric trust problem:

  • Clients pay upfront and risk the freelancer disappearing without delivering.
  • Freelancers deliver work and risk the client stalling, moving the goalposts, or going silent when it is time to pay.

Because acceptance criteria are vague and files live in scattered chat threads, whoever goes silent wins.

MilestoneLock fixes this from a single invite link:

  • Locked Funds Before Work Begins: Supports both INR via Cashfree Sandbox (PG Checkout + Payouts V2) and ETH on Ethereum Sepolia (MilestoneEscrow).
  • Explicit Milestones & Private Evidence: Deliverables are scanned, SHA-256 hashed, and stored privately, while only the Merkle root / manifest CID is anchored on-chain (EvidenceRegistry / CaseRegistry).
  • Silence Never Wins: Automated deadline timers refund unreleased milestones if a freelancer ghosts, or trigger AI-assisted verification / escalation if a client ghosts after delivery.
  • Three-Tier Dispute Protection: Contested milestones move through time-boxed Negotiation, advisory AI Review (Qwen / Claude comparing the raised dispute ticket, policy terms, and evidence), and Independent Arbitration with dual-signed rulings. No single person or AI can both decide a disputed award and move the money.

Challenges we ran into

  1. Separating Fiat Payment Custody from On-Chain Proof:
    Real-world Indian freelancers and clients want to pay and settle in INR, not crypto, while still needing tamper-evident dispute and evidence integrity. We solved this by keeping money movement in Cashfree Sandbox (double-entry ledger + PG/Payouts V2) and deploying a dedicated Sepolia CaseRegistry contract that holds zero funds and only notarizes evidence Merkle roots, dispute openings, rulings, and payout hashes—linked directly to Etherscan in the escrow view.

  2. Preventing Single-Point-of-Failure in Smart Contracts & AI:
    Our initial single-contract design hit edge cases on Tier 3 dispute settlement and mixed responsibilities. We refactored into workflow-isolated contracts (MilestoneEscrow, DisputeResolver, EvidenceRegistry, plus CaseRegistry) where only the vault holds ETH, ARBITER_ROLE and SETTLEMENT_SIGNER_ROLE must be distinct keys, and the AI review (Qwen / Claude) is strictly advisory—isolated in its own prompt-injection-hardened module with zero access to signing keys or fund movement.

  3. Postgres Row-Level Security, BigInt Serialization, and Deadline Race Conditions:
    Combining Next.js REST APIs with PostgreSQL RLS and BullMQ workers surfaced subtle bugs—such as BigInt JSON serialization failures on minor-unit amounts (paise/wei), RLS blocking system-level worker writes, and deadline timers firing out of order. We resolved these by routing worker writes through explicit withSystem database contexts, standardizing minor-unit string serialization, and backing async jobs + chain relays with a transactional outbox and idempotent deduplication keys.

Discussion

Builders also viewed

See more projects on Devfolio