Case Study

The Huay has worked on a handshake for generations. I wanted to see what remains when code enforces the same rules.

Project
Personal
Learning project · Laos, 2021
My role
Solo builder
Concept · Design · Engineering
Timeline
2021
Luang Prabang, Laos
Stack
Solidity · React
web3.js · MetaMask · Ganache
Period 1 in progress with one deposit and Barbara checked in the participant list
The pool fills as deposits arrive. The ring tells you where things stand without a word.

01 · The Mechanism

A credit system with no bank or legal contract. It works because everyone knows everyone.

The Huay does not appear in an app store. You find it by living in Laos long enough to make real friendships, then hearing someone mention it in passing, like a game people play on weekends.

My wife is from Laos. Her family left as refugees in the 1980s and settled in California. We had visited before, and married in Luang Prabang in 2007. In 2017, with three young children and the ability to work remotely, we moved there for a while. The while became four years.

That was long enough to make friends who mentioned the Huay in conversation. My wife translated more than the words. She explained how people talked about it lightly, almost like a game, while relying on it for things that mattered.

The mechanism is simple. Co-workers, neighbors, or friends agree to form a circle. Each period, everyone contributes a fixed amount to a shared pool, and one member collects the whole pool. The rotation continues until everyone has had a turn.

Once someone receives a payout, their later deposits include an interest premium. They had their money early, so they contribute a little more to later payouts. The person who waits longest receives the most.

There is no late-payment penalty, default process, or legal recourse. The social cost of defaulting is higher than the amount owed. People still have to live with the relationships they damage and the reputation they lose. The system relies on trust that formal banking tries to replace with rules.

Illustration of people arranged in a lending circle, each contributing coins to a shared pool
Every participant contributes a fixed amount each period. The pool rotates through the group one slot at a time.
Circle diagram showing early recipients paying interest and later recipients earning it
Early recipients pay more over time. Later recipients come out ahead. The totals balance across the circle.

02 · The Question

Illustration of a Lao lending circle becoming a smart contract
The same lending circle, with trust replaced by code.

A lending circle runs on trust. A smart contract runs on rules. What changes when one replaces the other?

Blockchain came up often among a group of technically curious expat friends in Laos. We were less interested in price speculation than in the practical question: what is this technology for? Where does it change something that could not be changed before?

The Huay offered a concrete test. A lending circle needs people to know each other well enough that defaulting costs more than the short-term gain. A smart contract removes that dependency. Code accepts deposits, triggers payouts when conditions are met, and calculates interest. No Mae, the traditional Lao organizer, is required. The participants do not need a shared history.

I wanted to know whether a smart contract could encode the Huay closely enough to remove the social layer and still work. This was a proof of concept and a learning project, not a startup for Laos. I had never written Solidity, and this was my first React project.

The hypothesis

The interesting part of the Huay is the mechanism underneath. Trust enforces it only because code is absent. Remove that dependency and the same community financial instrument could operate between strangers.

03 · The Build

I learn new technology by building with it. This was my first Solidity contract and my first React project.

I could have spent weeks reading about Solidity and blockchain development before writing code. That is not how I learn. I picked the problem, opened an editor, and started breaking things.

A friend started the project with me. After the first push, it became mostly solo because I had more experience with programming and design. The stack used Solidity on Ethereum, a mock ERC-20 stablecoin called USDS, React, web3.js, MetaMask, and Ganache as a local blockchain. No real funds were involved. Creating a circle or making a deposit still opened a MetaMask confirmation, just as it would in production.

The problem had a clear structure. The Huay moves through forming, active, period complete, and circle complete states. Each state has its own rules. That maps well to a finite-state machine and made the mechanism easier to translate while I learned Solidity.

I underestimated the precision that on-chain logic demands. A Solidity function either works or it does not. Every rule had to be explicit: who deposits, who receives the pool, when payouts trigger, and how interest is calculated. That forced me to specify the edge cases before the first transaction could succeed.

Create your circle form with name, currency, deposit amount, and interest rate
The entry point: a circle creator defines the rules. The contract enforces them.
My Spiffy Circle with four members joined and a prompt to wait for Adam
All four members on-chain. Each join transaction written to the contract individually.

04 · The Design

Period 1 active with a one-third-full progress ring and a deposit button
The pool fills as deposits arrive. The ring tells you where things stand without a word.
Period 1 with a two-thirds-full progress ring and two participants checked
Once you've deposited, your status updates. The ring keeps filling.
Final summary showing deposits, payouts, and net interest for Adam and Debby
The circle is finished. The math is visible. No explanation required.

Put a system that has never been on a screen into a few views anyone can understand.

The Huay had never been on a mobile screen. There were no UX patterns to borrow. The task was to make a social system that people understand through relationships legible to someone who had never heard of it, in a few screens and without a tutorial.

My constraint was simple: if it needs an explanation, it is not finished.

State as the primary interface

Each screen follows the circle's lifecycle: waiting to start, depositing, watching the pool fill, receiving, or reading the final accounting. The app shows the action or information that matters in that state. A participant should not have to ask “what do I do now?” The screen should answer it.

The progress ring as natural consequence

I needed to show how full the shared pool was during a period. The project was already called “Lending Circle,” so a ring that fills as deposits arrive was the natural answer. The concept and the visual landed on the same shape without trying to be clever.

The summary as proof of mechanism

The summary screen tested whether the design worked. Adam paid in more than he received; Debby came out ahead for waiting. If the numbers made that clear without a paragraph of explanation, the mechanism was doing its job. The summary shows each participant's deposits, payouts, and net interest position.

Design principle

You know you're done when you can't remove anything more.

The summary could have included charts and a period-by-period breakdown. None of that would make the result clearer. A labeled list of numbers does the job.

05 · Reflection

A small smart contract can have consequences well beyond its original problem.

At some point, my friend's question changed from “how do we make this work?” to “what would happen if it did?”

The mock stablecoin, USDS, stood in for real currency during development. A real version would need a real stablecoin. If the app became popular in Laos, where informal credit systems like the Huay matter to ordinary people, that currency could circulate. With enough use, it could touch the wider economy and monetary policy. A private digital currency outside the central bank's control would be a political issue as well as a fintech product.

We reached the same conclusion: the Lao government would not allow it.

A few months later, the Lao government outlawed cryptocurrency.

I am not claiming prescience. The reasoning was straightforward. What it clarified was the reach of the technology: a small contract on a public ledger, encoding a long-standing community practice, could connect a circle of four people in a demo to a sovereign nation's monetary policy. That is worth understanding before building with it.

What this project actually is

Not a blockchain story. Not a fintech prototype.

I set out to do something I was not sure I could do. When I started, I was a product manager and designer who could work with engineers but depended on other people to build my ideas. Completing the concept, design, smart contract, frontend, and demo gave me a different kind of confidence. I am still working from that lesson.

Panoramic illustration of a golden line tracing from a phone and community circle through village and city to a government building on a hill
At scale, a privately issued currency can reach monetary policy, and the state responds.