Case Study

AI2Work

On-chain freelancer marketplace — smart contracts on Celo, Next.js PWA, native Android wallet with ECDSA signing.

SolidityNext.js 15CeloKotlinCapacitorECDSATypeScript
20+
smart contract functions
3
ERC-20 tokens supported
4
platforms (Web + Android)
100%
on-chain settlement

Challenge

The Problem

Freelancers lose 5-20% in platform fees on traditional marketplaces. Payment disputes take days. Cross-border payments add 3-5% forex and 2-3 business days. Existing Web3 freelance platforms are desktop-only and require MetaMask — inaccessible to the 70% of global users on mobile.

Approach

The Solution

AI2Work is a mobile-first Web3 freelancer marketplace on Celo — carbon-negative, mobile-optimized L1. Freelancers post bounties in cUSD, CELO, or USDC. Funds held in auditable smart contract escrow. 2% protocol fee (vs 5-20%). Settlement: instant on-chain. No KYC. No bank. Works on any Android device.

Stack

Architecture

Smart Contracts

Solidity · Foundry · OpenZeppelin v5

  • • ClaudelanceCore.sol — escrow, dispute resolution, stake settlement
  • • ReentrancyGuard + Ownable2Step + Pausable
  • • 20+ mutating functions, tested with forge test
  • • Deployed on Celo Mainnet (chain 42220), verified on Celoscan

Web PWA

Next.js 15 · TypeScript · Tailwind · WalletConnect v2

  • • Server-side rendering with App Router
  • • PWA with offline support, installable on mobile
  • • Hosted on Render.com, CI/CD via GitHub Actions

Native Android

Kotlin · Capacitor · Android Keystore

  • • Custom Capacitor plugin for ECDSA signing
  • • Android Keystore for private key storage (hardware-backed)
  • • Keccak256 implemented from scratch in Kotlin
  • • EIP-1559 transaction signing + RLP encoding
  • • WebView bridge injecting window.ethereum

SDK & Types

npm packages · typed client

  • @yeheskieltame/claudelance-sdk — typed contract client
  • @yeheskieltame/claudelance-types — shared ABI + TypeScript types
  • • Published on npm + GitHub Packages

Deep Dive

Native ECDSA on Android

The core innovation is a custom Capacitor plugin that implements Ethereum transaction signing natively in Kotlin — no Web3 wallet required. This eliminates the MetaMask dependency that blocks mobile Web3 adoption.

Key decisions

  • • secp256k1 via BouncyCastle (SpongyCastle on Android)
  • • Keccak256 implemented manually — no extra dependency
  • • RLP encoding for transaction serialization
  • • Android Keystore for key generation (hardware-backed when available)
  • • Bridge.js injected into WebView — dapps see a standard window.ethereum
// EthWalletHelper.kt — Keccak256 core fun keccak256(data: ByteArray): ByteArray { val digest = Keccak(256) return digest.digest(data) } // EIP-1559 transaction signing fun signTransaction(tx: EthTransaction, key: PrivateKey): ByteArray { val encoded = rlpEncode(tx.toList()) val hash = keccak256(encoded) return signECDSA(hash, key) // secp256k1 deterministic }

Metrics

Results & Impact

Gas cost per bounty~$0.01 (Celo)
Protocol fee2%
APK size4.2 MB
Android API24+ (99.1% devices)
Transaction signingNo external wallet needed

Retro

Lessons Learned

1

Capacitor plugins are the right abstraction for Web3 mobile — they bridge the gap between web UX and native crypto without forcing users into a separate wallet app.

2

Celo's sub-cent gas fees make on-chain freelancing viable. On Ethereum mainnet, a single bounty posting would cost $5-20 in gas. On Celo: $0.01.

3

The hardest part of Web3 mobile is key management. Android Keystore + hardware backing is the only acceptable solution — no plaintext keys in SharedPreferences.

4

The Celo ecosystem's focus on mobile-first and real-world assets (cUSD, USDC) aligns perfectly with freelancer payments — stablecoins are non-negotiable for professional use.

Want something like this?

I build full-stack Web3 products — smart contracts, mobile apps, agent orchestration.

Get in touch