project screenshot 1
project screenshot 2
project screenshot 3

minipay

Instant exchange on/offramp using state channels and a hub-and-spoke model.

minipay

Created At

ETHGlobal Cannes

Project Description

This project enables instant token deposits and withdrawals from exchanges by combining a state channels hub-and-spoke architecture with a browser-based frontend. Users open a state channel with a central hub, allowing off-chain transfers that are fast, cheap, and scalable.

By integrating the Worldcoin minikit-web3-example, we add secure identity verification, ensuring that only verified users can access on/offramp functionality. This enhances security and enables compliance-ready flows (e.g., for regulated exchanges).

The hub abstracts complex channel operations and provides a simple interface for users to deposit and withdraw tokens instantly, minimizing on-chain interactions to final settlement only. This drastically reduces gas fees and improves user experience, making it practical for real-world exchange onboarding/offboarding.

How it's Made

The system is built using Solidity smart contracts to handle channel creation, deposits, and final on-chain settlement logic. The off-chain hub logic is written in TypeScript (Node.js), managing state transitions, user sessions, and liquidity routing.

The frontend is a React app that integrates with ethers.js for wallet interactions and uses the Worldcoin minikit-web3-example for proof of personhood verification. This lets us securely verify users' identities without compromising privacy.

We use cryptographic signatures (ECDSA) for all off-chain state updates, and a Merkle tree structure to efficiently handle proofs during disputes. Exchange APIs are integrated to simulate realistic liquidity and instant pricing.

A notable hacky detail: we implemented an emergency exit mechanism that lets users forcibly settle their balances on-chain in case the hub becomes unavailable, inspired by Lightning Network-like watchtower logic.

background image mobile

Join the mailing list

Get the latest news and updates