Trustless Work
  • Welcome
    • Why Escrows Matter
    • 🛤️Our Journey so Far
      • 🤔The Problem: Origins of Trustless Work
      • 👾The team comes together
      • 💡The Solution: Escrows
      • 🏆Key Milestones
        • 🌠DraperU Stellar Astro Hacker House: A Pivotal Moment
        • Launching the API V1 at ETH Pura Vida Hackathon
      • 🚀Current Programs
        • 🌟DraperU Embark Program
        • 💻OD Hack Campaigns
      • 🛠️Vertical Development
      • 🔮Future Vision
  • 📌Start Here
    • ☀️About Trustless Work
      • Vision and Mission
      • Team
  • ⚒️Understanding Smart Escrows
    • 🥸Smart Escrow Design
      • What does a Smart Escrow "look like"?
      • Roles in Trustless Work
      • Escrow Lifecycle
        • Initiation Phase
        • Funding Phase
        • Complete phase
        • Approval phase
        • Release phase
        • Dispute Resolution
    • 💵USDC: The Stablecoin Powering Trustless Work
    • 🌟Stellar & Soroban: The Backbone of Trustless Work
  • 💻Developer Resources
    • 🚀Smart Escrow API
    • Quickstart
      • dApp locally
      • API Fundamental Code
    • API Reference
      • Introduction
      • Authentication
        • Request Api Key
      • Deploy
        • Initialize Escrow
      • Escrows
        • Schema
        • Fund Escrow
        • Get Escrow by Contract ID
        • Resolve Dispute
        • Change Milestone Status
        • Change Milestone Flag
        • Change Dispute Flag
        • Distribute Escrow Earnings
        • Update escrow properties
      • Helpers
        • Set Trustline
        • Send Transaction
        • Get Multiple Escrow Balance
    • 🧰Essential Tools for Developers
      • Stellar Wallets
        • Freighter Wallet
        • Albedo Wallet
        • xBull Wallet
        • Rabet Wallet
        • Lobstr Wallet
        • Hana Wallet
        • Additional Resources
        • Troubleshooting & FAQs
      • How to Get Testnet Tokens
  • 🌍Use Cases by Industry
    • Marketplaces & E-commerce
    • Grants, Bounties, and Hackathons
    • P2P Exchanges and OTC Desks
    • Security Deposits
    • Milestone-based Freelance & Contract Work
    • Crowdfunding & Pre-orders
    • DAO Treasury & Working Group Budgets
    • Education & Online Courses
    • Subscription + Performance-based Retainers
  • 🤖Using the dApp
    • Step 1: Accessing the Trustless Work Dapp and Logging In
    • Step 2: Creating a Profile and Requesting an API Key
    • Step 3: Creating an Escrow
    • Step 4: Funding an Escrow
    • Step 5: Marking a Milestone as Done ✅
    • Step 6: Approving the Milestone
    • Step 7: Releasing the Payment
    • Resolving Disputes
  • 🏴‍☠️Community
    • 🌎Spotlight: Kindfi
    • 🛣️Roadmap: The Journey Ahead
    • Contributor's Guide
    • 📂Open-Source Templates & Developer Tools
  • ✒️Background & Theory
    • 📘Core Concepts & Escrow Glossary
    • 🎒Historical Context
      • 📜Escrow History:
        • 🗿Ancient to Colonial Era
        • 🏦Banking Era (19th - 20th Century)
        • 💻The Digital Era and Online Escrow
      • ⛓️Blockchain Era: Smart Escrows
  • Links
    • ⚒️Trustless Work dApp
    • 🌐Trustless Work Website
    • 📣Telegram Chat
    • 💎Only Dust Profile
    • 👩‍💻Swagger for API
    • 📜Github
  • 📢Appendices
    • Contact and Support
    • Notion for Startups
    • Meru
Powered by GitBook
LogoLogo

Links

  • Website
On this page

Was this helpful?

Export as PDF
  1. Understanding Smart Escrows
  2. Smart Escrow Design
  3. Escrow Lifecycle

Initiation Phase

PreviousEscrow LifecycleNextFunding Phase

Last updated 2 months ago

Was this helpful?

The Initiation Phase is the foundation of the escrow process. It ensures that all necessary details are captured, roles are assigned, and conditions are clearly defined. This phase lays the groundwork for a secure, transparent, and efficient transaction.

Participants and Roles

In the initiation phase key roles are assigned to specific parties. These roles determine responsibilities and actions throughout the transaction.

We are currently on the process of updating from client to milestone approver and from service provider to milestone marker. Receiver will be added too (For now, it assumes service provider will be the receiver)

The roles are:

  1. Client/Milestone Approver: Approves or disputes milestones.

  2. Service Provider / Milestone Marker: Marks milestones as completed and ready for approval.

  3. Release Signer: Approves the release of funds for completed milestones.

  4. Dispute Resolver: Resolves disputes and adjusts milestone statuses if necessary.

  5. Receiver: The final recipient of funds once conditions are met.

  6. Platform Address: An address designated to receive the platform fee.

Parties: Parties are entities (e.g., buyer, seller, platform) assigned to fulfill one or more roles based on the use case. You can learn more about how this can work for different use cases later on.

Other escrow properties configuredin this phase:

  • Engagement ID

    • Definition: A customizable identifier that links the escrow to an external system or reference, such as a UUID, Order ID, or Invoice ID.

  • Amount: The total funds to be held in escrow.

  • Platform Fee: A fixed or percentage-based fee for the platform’s services, in bps.

  • Milestones: Defined deliverables or outcomes that are tracked and verified throughout the process.

  • Trustline: The Contract address of the Token used for the escrow.


Process Steps

Step 1: Configuring Terms

  • Parties and Address are configured at a platform level. All parties agree on the transaction terms, including:

    • Deliverables or milestones.

    • Payment amounts and structure.

    • Roles and responsibilities.

Step 2: Recording Metadata

  • The platform records escrow details, assigns an Engagement ID for their own tracking, platform fee, platform address, trustline, and prepares to deploy the escrow contract.

Step 3: Initializing the Escrow

  • Using the Trustless Work API, the platform deploys the escrow contract with the configured terms.

  • Upon deployment:

    • A unique Escrow ID (Contract ID) is generated and returned to all parties for reference. Funds of the approved trustline can be deposited to the escrow ID.


Example Scenario: Freelance Marketplace (e.g., Upwork)

  • Engagement ID: Order_12345 links the escrow to the platform's order system.

  • Escrow ID: Generated by the Soroban network as 0xABC123....

  • Roles Assigned:

    • Milestone Approver: Client.

    • Milestone Marker: Freelancer.

    • Release Signer: Upwork.

    • Dispute Resolver: Upwork.

    • Receiver: Freelancer.

    • Platform Address: Upwork (receiving platform fees).

  • Outcome: The escrow contract is initialized with:

    • Clear roles and responsibilities.

    • Transparent milestone and payment structures.

    • A shared understanding among all parties.


Outcome of the Initiation Phase

  1. A smart escrow contract is successfully created and ready for the transaction.

  2. Roles, parties, and conditions are clearly defined and documented.

  3. Engagement and Escrow IDs provide traceability and clarity.

  4. All participants have full visibility, fostering trust and reducing potential disputes.

Escrow ID (Contract ID)

The escrow ID is what we are going to use as address to deposit funds in the next phase. Anyone can send funds to an escrow, as long as it is the accepted token (Trustline is set).

  • Definition: A unique identifier automatically generated by the Soroban network when the escrow smart contract is deployed.

  • Purpose: Serves as the primary identifier for the escrow contract on the blockchain.


⚒️
🥸