Skip to content
Start a project

Blockchain and DeFi · Marketplaces

Milestone escrow for a freelance marketplace, with disputes and 84 contract tests

A freelance marketplace on BNB Smart Chain needed payments held safely until the work was done. We built escrow contracts that hold each job's payment, release it by milestone and send disputes to an arbiter, plus the platform token.

Client
A freelance marketplace
Chain
BNB Smart Chain
Stack
Solidity, OpenZeppelin, Hardhat, the PancakeSwap router
Team
2 engineers plus PM, QA and design
Timeline
Mar to Dec 2024
Status
Delivered 2024
Escrow test cases
84
Contract test suite, Dec 2024
Token test cases
10
Contract test suite, Dec 2024
Ways to pay
3
BNB, BEP-20 tokens or the platform token, settled in USDT

The challenge

Clients and freelancers who do not know each other needed payment held by code, not by the platform.

Payments arrive in different tokens, while freelancers expect a stable amount.

Our approach

Settle in a stable token

Deposits in BNB, BEP-20 tokens or the platform token are swapped to USDT through PancakeSwap and held for each job.

Release by milestone

Each job splits into milestones, and the client releases each one as the work is delivered.

Disputes go to an arbiter

Either side can raise a dispute, and an admin arbiter releases or refunds the milestone.

What we built

  • Escrow contracts with milestones, disputes, fees and refunds.
  • A platform token, pausable and mintable, with a fee discount for paying in it.
  • Swaps to USDT through the PancakeSwap router at deposit time.

How it fits together

  1. People

    • Clients
    • Freelancers
  2. Contracts

    • Escrow contractsMilestones, disputes, fees and refunds
    • Platform tokenPausable and mintable, with a fee discount
  3. Swaps

    • PancakeSwap routerDeposits swap to USDT
  4. Chain

    • BNB Smart ChainSolidity, OpenZeppelin and Hardhat
How the escrow marketplace moves a payment

Services behind this work

Security and quality

  • The escrow contract ships with 84 test cases, and the token with 10.
  • The contracts build on OpenZeppelin libraries.

Outcome

We delivered the escrow contracts and the platform token in 2024.

Have an agent, protocol or product to ship?

Send a short brief and we'll reply with times for a 30-minute scoping call.

Back to all shipped work