Inspiration
We are computer science students at the University of Information Technology (UIT - VNU-HCM). Like many of our classmates, we regularly take on freelance coding and Web3 design projects to support our tuition and living expenses. Over the past two years, we repeatedly ran into two major issues that plague student freelancers:
First, payment ghosting is rampant. More than 60% of student freelancers we surveyed have delivered completed work only for the client to vanish without paying. Because typical student gigs range from $50 to $500, hiring a lawyer or pursuing formal legal action is practically impossible.
Second, the crypto onboarding paradox. Smart contracts theoretically solve trust issues through non-custodial escrows, but a university student entering the space usually has a fresh wallet with exactly zero ETH. Expecting a beginner to complete KYC on a centralized exchange, buy crypto, bridge funds to a Layer-2, and pay gas fees just to submit their code creates an immediate barrier to entry.
We built MicroEscrow to solve both sides of this problem: guaranteed milestone payments for students, with a flexible system that eliminates friction.
What It Does
MicroEscrow is a decentralized milestone escrow protocol deployed on Base Sepolia. It replaces traditional 20% intermediary fees on platforms like Upwork and Fiverr with a direct, peer-to-peer smart contract workflow:
- Non-Custodial Milestone Locking: The client deposits project funds directly into the smart contract before work begins. Neither party can unilaterally withdraw or tamper with the funds while work is in progress.
- Automated Timeout Protection: If a student submits their deliverable and the client becomes unresponsive or ghosts them, the smart contract automatically releases 100% of the locked funds to the student once the review window expires.
- Zero Platform Commission: MicroEscrow takes 0% platform cuts, ensuring that students keep every dollar they earn.
- Dispute Mediation: If requirements are contested, a built-in mediation mechanism allows an arbiter to split funds proportionally based on verified deliverables.
Dual-Mode Execution Architecture (Standard Wallet & Gasless)
One of our main technical priorities was ensuring MicroEscrow remains accessible to both crypto-native builders and complete beginners. To achieve this, we designed a hybrid execution model:
Standard Direct Wallet Execution (EOA Mode): Demonstrated in our live submission video, users with existing testnet funds can interact directly with the smart contract using MetaMask. Transactions execute natively on Base Sepolia with sub-cent gas fees and near-instant finality.
Account Abstraction & Gasless Relay Mode (ERC-4337 Compatibility): For students starting with an empty wallet balance ($0.00 ETH), the interface provides a dedicated toggle for gasless operations. Deliverables can be signed off-chain via typed signatures, allowing a paymaster relayer to sponsor the transaction so students never get blocked by gas requirements.
This dual-mode approach guarantees that the dApp works reliably across different user environments without forcing a single rigid onboarding path.
How We Built It
We built MicroEscrow using modern, reliable Web3 standards:
- Smart Contracts: Written in Solidity (v0.8.24) using OpenZeppelin v5 libraries. Fund safety is enforced through ReentrancyGuard, Ownable access control for arbitration, and strict Checks-Effects-Interactions (CEI) design patterns.
- Testing Suite: Developed and thoroughly tested using Foundry. We wrote comprehensive unit tests covering all state machine transitions, timeout edge cases, reentrancy prevention, and unauthorized caller reverts. All 18 tests pass with 100% core logic branch coverage.
- Network Deployment: Deployed and verified on Base Sepolia Layer-2 (Chain ID: 84532), capitalizing on low gas fees and fast block times.
- Frontend Stack: Built with Next.js 14 (App Router), TypeScript, and Tailwind CSS. Blockchain connectivity is handled via Wagmi v2 and Viem.
Challenges We Faced
The most difficult challenge was designing a deterministic state machine that prevents deadlocks. We needed to protect freelancers from client abandonment without creating a vulnerability where a freelancer could prematurely claim funds before the client had a chance to review the work. We resolved this by tying the state transitions strictly to immutable block timestamps and deliverable proof verification on-chain.
Another hurdle was handling wallet state synchronization across different roles. Because an escrow involves two distinct parties (Employer and Contractor), our frontend dynamically recalculates permissions based on the active wallet address so users only see actions relevant to their role.
Accomplishments We Are Proud Of
- Deploying a verified smart contract on Base Sepolia that works end-to-end with our live frontend.
- Achieving an 18/18 passing test suite in Foundry with zero test failures across complex multi-step escrow workflows.
- Creating a clean, intuitive user interface that abstracts away the technical complexities of Web3 escrow mechanics.
What We Learned
Working on MicroEscrow gave us hands-on experience with production Foundry testing workflows, L2 contract verification, and the latest Wagmi v2 state hooks. More importantly, it taught us how to design Web3 applications around real-world human behavior—accounting for communication breakdowns, missed deadlines, and dispute scenarios.
What Is Next for MicroEscrow
- Production Paymaster Integration: Expanding our gasless relay infrastructure to mainnet Layer-2 networks with dedicated bundler support.
- Soulbound Reputation Tokens (SBTs): Minting non-transferable on-chain credentials for students upon successful milestone completions, creating a verifiable work history.
- Multi-Stablecoin Support: Adding native support for USDC and EURC deposits so students can hedge against crypto volatility.
- Decentralized Jury Courts: Introducing community-driven dispute resolution mechanisms similar to Kleros for higher-value contracts.
Verification and On-Chain Links
- Official Pitch Deck (10-Slide PDF): https://canva.link/ca61ro49onzif3q
- Live Base Sepolia Contract: 0x57099f3125faF6591f23000E8985E18c0c2202Ac
- BaseScan Explorer: https://sepolia.basescan.org/address/0x57099f3125faF6591f23000E8985E18c0c2202Ac
- Deployment Transaction Hash: 0xb3976987fe4eee2eb5e2d3565cddc78826b16de9abab7855dd8b64d4ae020012
- GitHub Repository: https://github.com/PHONGUIT22/MicroEscrow
Built With
- base
- ethereum
- foundry
- next.js
- smart-contracts
- solidity
- tailwind-css
- typescript
- viem
- wagmi
- web3
Log in or sign up for Devpost to join the conversation.