
TrustLance
Escrow-based freelance marketplace
Overview
TrustLance is an escrow-based freelance marketplace designed around a simple principle: payments should stay protected until the work is actually done. Instead of trusting either party to hold up their end of the deal, funds are held in escrow and only released according to a well-defined, transaction-safe workflow — which matters a lot in freelance work, where disputes over "was this delivered" are common and expensive to resolve informally.
Technical Architecture & Specifications
Key Features & Implementation Highlights
- Transaction-safe escrow workflow that keeps client funds protected until project completion is confirmed
- Secure authentication and role-based permissions that block unauthorized payment actions, with a full audit trail behind every transaction
- Escrow transactions modeled as explicit state transitions (funded → in-progress → released/disputed/refunded), keeping behavior predictable
Challenges & Tradeoffs
Escrow logic was modeled as an explicit state machine with defined transitions (funded → in-progress → released/disputed/refunded) rather than using ad-hoc status flags. Ad-hoc flags are faster to implement initially, but in a system handling real money with disputes and refunds, an undefined or inconsistent state can mean funds get stuck or released incorrectly. The state machine approach ensures every transition is explicit and transaction-safe — if a dispute is filed while a release is in progress, the state machine rejects the conflicting transition rather than allowing both to proceed. The cost is more upfront design work defining all valid transitions, but it makes the escrow behavior provably predictable.