Skip to content

Latest commit

 

History

420 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Milestone Escrow Contract

A Soroban smart contract on Stellar that enables trustless milestone-based escrow between a client, freelancer, and arbiter.

Overview

This contract allows a client to fund a job broken into milestones. Funds are locked in the contract and released per milestone only when the client approves delivery. Disputes can be raised by either party and resolved by a designated arbiter.

Contract Functions

Function Caller Description
initialize Anyone Set up job with parties, token, and milestone amounts
fund Client Deposit total amount into contract
mark_delivered Freelancer Mark a milestone as delivered
approve_milestone Client Release funds for a delivered milestone
raise_dispute Client or Freelancer Freeze a milestone for arbitration
resolve_dispute Arbiter Release to freelancer or refund to client
get_job Anyone View current job state

Milestone States

Pending → Delivered → Released

Disputed → Released (arbiter favors freelancer)

→ Refunded (arbiter favors client)

Prerequisites

Build

From the repository root:

cargo build --release --target wasm32-unknown-unknown -p milestone-escrow

Test

From the repository root:

cargo test -p milestone-escrow

Project Status

  • Contract implementation completed in contracts/milestone-escrow
  • Includes milestone delivery, approval, dispute, and arbitration flows
  • Initialize now rejects empty milestone lists, zero/negative amounts, zero addresses, and zero auto-release windows with explicit contract errors
  • Contract tests and snapshots are provided under contracts/milestone-escrow/test_snapshots

Deploy (Testnet)

soroban contract deploy \
  --wasm target/wasm32-unknown-unknown/release/milestone_escrow.wasm \
  --network testnet \
  --source <your-account>

License

MIT

Deployed Contract

Network Contract ID
Testnet CDD5WKK3WT3QVKXMXTJNDIXE4T73FK6GGXDSD6UTJAH6YYZU52SQ4MUH

Explorer: https://stellar.expert/explorer/testnet/contract/CDD5WKK3WT3QVKXMXTJNDIXE4T73FK6GGXDSD6UTJAH6YYZU52SQ4MUH

  • Update README with latest progress

About

Soroban milestone-based escrow smart contract for Stellar

Resources

Contributing

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages