SecureFlow is a comprehensive decentralized platform combining escrow services with a freelance marketplace, built on Monad blockchain. Features gasless transactions through MetaMask Smart Accounts, multi-arbiter dispute resolution, and reputation systems.
- Hybrid Escrow + Marketplace: Direct hires and open job applications
- Gasless Transactions: MetaMask Smart Account integration for zero-fee transactions
- Multi-Arbiter Consensus: 1-5 arbiters with quorum-based voting
- Reputation System: Anti-gaming reputation tracking
- Native & ERC20 Support: MON and whitelisted ERC20 tokens
- Milestone Management: Submit, approve, reject, dispute milestones
- Job Applications: Freelancers apply to open jobs
- Dispute Resolution: Time-limited dispute windows with arbiter consensus
- Real-time Notifications: In-app notification system
- Client Feedback: Rejection reasons and improvement suggestions
- Smart Account Integration: Delegated execution for gasless transactions
- Paymaster Contract: Gas sponsorship for seamless UX
- Reentrancy Protection: All external functions protected
- Input Validation: Comprehensive parameter checking
- Emergency Controls: Admin pause and refund mechanisms
βββ contracts/
β βββ SecureFlow.sol # Main escrow & marketplace contract
β βββ Paymaster.sol # Gas sponsorship contract
βββ frontend/ # Next.js application
β βββ app/ # App router pages
β βββ components/ # UI components
β βββ contexts/ # React contexts
βββ scripts/
β βββ deploy.js # Contract deployment
β βββ deploy-paymaster.js # Paymaster deployment
βββ test/
βββ SecureFlow.test.js # Test suite
- Node.js 18+
- MetaMask wallet
- Monad testnet access
- Clone and install dependencies
git clone https://github.com/your-org/secureflow.git
cd secureflow
npm install
cd frontend
npm install- Environment setup
# Copy environment files
cp .env.example .env
cp frontend/.env.example frontend/.env.local
# Configure your environment variables- Deploy contracts
# Deploy to Monad testnet
npx hardhat run scripts/deploy.js --network monad
npx hardhat run scripts/deploy-paymaster.js --network monad- Start frontend
cd frontend
npm run dev- Create Escrow β Set project details, milestones, budget
- Manage Projects β Review submissions, approve/reject milestones
- Provide Feedback β Give rejection reasons for improvements
- Browse Jobs β View open listings, apply with proposals
- Work Management β Submit milestones, address feedback
- Resubmit β Improve rejected milestones with updates
- Dispute Resolution β Review cases, vote on resolutions
- Maintain Integrity β Help resolve platform disputes
# Run smart contract tests
npm test
# Run frontend tests
cd frontend
npm testTest Coverage: 26+ tests covering deployment, escrow creation, marketplace functions, work lifecycle, reputation system, and security.
# Deploy to Monad testnet
npx hardhat run scripts/deploy.js --network monad
npx hardhat run scripts/deploy-paymaster.js --network monad# Build for production
cd frontend
npm run build
# Deploy to Vercel
vercel --prod- Contract Address:
0x540fDEc0D5675711f7Be40a648b3F8739Be3be5a - Paymaster Address:
0x5333A1A9Aec72147E972B8A78d0bb0c42fDeE2E2 - Network: Monad Testnet (Chain ID: 10143)
- Status: Production Ready
// Platform fees (0% for demo)
uint256 public platformFeePercentage = 0;
// Arbiter management
function authorizeArbiter(address arbiter) external onlyOwner
function revokeArbiter(address arbiter) external onlyOwner// Contract addresses
export const CONTRACTS = {
SECUREFLOW_ESCROW: "0x540fDEc0D5675711f7Be40a648b3F8739Be3be5a",
PAYMASTER: "0x5333A1A9Aec72147E972B8A78d0bb0c42fDeE2E2",
};- User connects MetaMask β Smart Account initializes
- Transaction request β Delegation system activates
- Gasless execution β Paymaster sponsors gas fees
- Blockchain confirmation β Transaction completed
- Reentrancy Protection: All external functions protected
- Input Validation: Comprehensive parameter checking
- Access Control: Role-based permissions
- Emergency Pause: Admin-controlled pause functionality
- Gas Optimization: Efficient contract design
- Smart contract development
- Frontend application
- Basic escrow functionality
- Job marketplace
- Gasless transactions
- Smart Account integration
- Dispute resolution
- Reputation system
- Mobile application
- Advanced analytics
- Multi-chain support
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
This project is licensed under the MIT License.
- GitHub Issues: Report bugs
- Documentation: See project docs for detailed guides
Built with β€οΈ for the decentralized future of work
SecureFlow - Where trust meets technology