Skip to content
 
 

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

cargo build --release --target wasm32-unknown-unknown

Test

cargo test

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

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages