AccorDefi

High-security escrow with DeFi yield. Secure. Liquid. Decisive.

AccorDefi

Created At

HackMoney 2026

Project Description

AccorDefi is a cross-chain freelance escrow platform that seamlessly bridges Ethereum and Sui networks, enabling trustless global payments without intermediaries.

The Problem: Freelancers and clients operate on different blockchains. Traditional escrows charge high fees and lack atomic guarantees.

Solution: Clients fund milestone-based escrows in ETH/USDC on EVM chains. Freelancers connect via Sui wallet - no EVM address needed. Upon milestone approval, our HTLC-powered bridge relayer atomically converts and transfers native SUI to the freelancer's wallet in under 2 seconds.

Sponsor Integrations:

Sui Network: Move smart contracts implementing Hash Time-Locked Contracts for atomic cross-chain swaps. Sub-second finality ensures instant settlement. Native Slush wallet integration for seamless UX.

Yellow Network: Off-chain state channels enable gasless milestone negotiations, approvals, and disputes. Only final settlements hit the chain, reducing costs dramatically. Trustless, instant, multi-chain payments for the global freelance economy.

How it's Made

AccorDefi follows a modular multi-chain architecture with four main components: a Next.js 14 frontend, a Hono.js backend API, Solidity smart contracts on EVM, and Move smart contracts on Sui. The magic happens in the bridge relayer service that orchestrates cross-chain value transfer.

Frontend Stack I built the frontend using Next.js 14 with the App Router for optimal performance and SEO. The UI leverages shadcn/ui components with Tailwind CSS for a polished, responsive design that works seamlessly in both light and dark modes.

For wallet connectivity, I implemented a dual-wallet system:

wagmi + viem + ConnectKit for EVM wallets (MetaMask, Coinbase Wallet) @mysten/dapp-kit for Sui wallets (Slush Wallet) This allows clients to connect with their preferred EVM wallet while freelancers can use native Sui wallets - a key differentiator enabling true cross-chain collaboration.

Backend Architecture The backend runs on Hono.js, a lightweight, high-performance framework perfect for edge deployments. I chose Hono over Express for its TypeScript-first approach and superior middleware composition.

Data persistence uses Drizzle ORM with SQLite for local development, designed to scale to PostgreSQL for production. The schema models escrows, milestones, users, and transaction history with full relational integrity.

Authentication implements JWT tokens with wallet signature verification - users prove ownership by signing a message, eliminating passwords entirely.

Smart Contracts Ethereum (Solidity + Foundry): The Escrow.sol contract handles the client-side of the equation. It stores milestone amounts, manages the escrow lifecycle (funded → active → released), and emits events that the bridge monitors. It is deployed to Anvil for local testing with plans for Sepolia/mainnet.

Sui (Move): The workspace.move module implements Hash Time-Locked Contracts (HTLC) - the cryptographic primitive enabling atomic cross-chain swaps.

Key functions: create_workspace: Locks SUI with a secret hash and timelock release_funds: Releases funds when the correct preimage (secret) is provided refund: Returns funds to sender if timelock expires The HTLC pattern ensures atomicity: either both chains settle or neither does. The secret revealed on one chain unlocks funds on the other.

Sui Network Integration Sui was instrumental to the cross-chain vision.

I leveraged: Sub-second finality: When the bridge sends SUI, freelancers see it in their wallet almost instantly. This UX is impossible on slower chains.

Object-centric model: Each workspace is a unique object on Sui, making state management intuitive and parallel execution efficient.

Move language safety: The type system and resource model prevented entire classes of bugs. Our HTLC implementation guarantees funds can't be double-spent or lost.

Slush Wallet SDK: Native integration means freelancers don't need browser extensions - mobile-friendly from day one.

Yellow Network Integration Yellow Network's state channel infrastructure powers our real-time collaboration features:

Off-chain milestone updates: Clients and freelancers can approve, reject, and negotiate milestones without paying gas for each action. I batch these into final on-chain settlements.

EIP-712 typed signatures: All off-chain actions are cryptographically signed using Ethereum's typed data standard, ensuring non-repudiation and audit trails.

Session management: Maintained virtual channels between client-freelancer pairs, enabling instant message passing for status updates.

Dispute resolution: If parties disagree, the signed state history provides evidence for on-chain arbitration.

The Bridge Relayer - Hacky Innovation

The bridge relayer is where the magic happens. When a client releases payment on EVM:

Backend generates a cryptographic secret pair (32-byte random + SHA256 hash) The hash is stored for HTLC verification Bridge wallet (funded with SUI) executes a TransferObjects transaction Freelancer receives native SUI in their Slush wallet Transaction digest is returned to frontend for verification The secret/hash mechanism ensures that even with a custodial bridge, the cryptographic proof exists for dispute resolution.

Notable Technical Decisions USD-to-SUI conversion: We hardcoded a demo rate (1 USD = 0.001 SUI) but architected for oracle integration (Pyth/Switchboard) Testnet-first: All Sui transactions target testnet with easy mainnet switching via environment variables Type-safe end-to-end: TypeScript across frontend, backend, and API types ensure compile-time safety

background image mobile

Join the mailing list

Get the latest news and updates