Case Study
The 'Huay' has worked on a handshake for generations. I wanted to know what's left when you replace the handshake with code that enforces itself.
- 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

01 · The Mechanism
A credit system with no bank, no contract, and no enforcement mechanism. It works because everyone knows everyone.
The Huay doesn't appear in any app store. You won't find it described on a government website or in a financial services product catalogue. You find it by living in Laos long enough to have real friendships there — by being around when people mention it in passing, the way you mention a game you play on weekends.
My wife is originally from Laos. Her family left as refugees in the eighties and eventually settled in California. We'd been to Laos before — we married in Luang Prabang in 2007, our families traveling from opposite ends of the world to be there. In 2017, with three young kids and the ability to work remotely, we decided to live there for a while. That while became four years.
Long enough to have real friends. Long enough for those friends to mention the Huay in conversation, and for my wife to translate not just the words but the texture of it — the way Lao people talk about it with lightness, almost like a game, while relying on it for things that matter.
The mechanism is simple. A group of people — often co-workers, neighbors, friends — agree to form a circle. Each period, every member contributes a fixed amount to a shared pool. Each period, one member collects the entire pool. The rotation continues until everyone has received their turn.
The elegant wrinkle: once you've received your payout, your subsequent deposits must include an interest premium. You had your money early; now you contribute a little more to enrich each subsequent payout. The person who waits longest receives the most. Early access costs. Patience earns.
There is no enforcement mechanism. No late-payment penalty, no default process, no legal recourse. It works because everyone knows everyone. The social cost of defaulting — the relationships destroyed, the face lost, the reputation damage within a community where you still have to live — is higher than the amount owed. The system runs on exactly the kind of trust that Western banking regulations were designed to eliminate the need for.


02 · The Question

A lending circle runs on trust. Smart contracts are trustless by design. What happens to the mechanism when you replace one with the other?
Among a group of technically curious expat friends in Laos, blockchain was a frequent topic of conversation — not the price speculation that dominated headlines, but the questions that felt more interesting: what is this technology actually for? Where does it genuinely change something that couldn't be changed before?
The Huay surfaced as a concrete answer. A lending circle runs on social trust — it requires participants to know each other well enough that the cost of defection outweighs any short-term gain. A smart contract removes that dependency entirely. The rules are encoded in code that executes automatically: deposits are accepted, payouts trigger when conditions are met, interest is calculated and applied without human intervention. No Mae (the traditional Lao organiser) required. No mutual history needed. No trust necessary.
The question I wanted to test: could a smart contract encode the Huay mechanism faithfully enough that the social substrate could be removed entirely — and the system still function? Not as a startup idea, not as a product for Laos. As a proof of concept, and as a learning project. I'd never written a line of Solidity. This was also my first React project.
The hypothesis
The Huay's elegance isn't the trust — it's the mechanism underneath. The trust is just what enforces it in the absence of code. Remove the trust, keep the mechanism, and you have something more interesting than either: a community financial instrument that can operate between strangers.
03 · The Build
Learn by building, not by reading. First Solidity contract. First React project. Pick a real problem and break things until it works.
I could have read about Solidity and blockchain development for weeks before writing a line of code. I could have audited courses, watched tutorials, absorbed documentation, and then decided whether to build something. That's never been how I've learned a technology. I picked the problem, opened a code editor, and started breaking things.
A friend started the project with me. After an initial combined push, as I had more of a head start in programming and in design, the project became largely solo. The stack: Solidity for the smart contract logic, running on Ethereum. A second contract for a mock ERC-20 stablecoin — USDS — to use as the circle's currency. React on the frontend, connected via web3.js to MetaMask. Ganache as a local development blockchain, sandboxed so no real funds were involved. Every action that writes to the chain — creating a circle, making a deposit — pops a MetaMask confirmation, exactly as it would in production.
What made the build manageable was the problem's clear structure. The Huay has defined states: forming, active, period complete, circle complete. Each state has specific rules. Smart contract logic maps well onto finite-state machines, which made the mechanism translatable even for someone learning the language as they went.
The part I underestimated: the precision that on-chain logic demands. A Solidity function either executes correctly or it doesn't — there's no graceful degradation, no “mostly works.” Every rule in the lending circle had to be specified exactly: who deposits this period, who receives, when payouts trigger, how the interest premium is calculated and for whom. That discipline turned out to be valuable — it forced complete specification of every edge case before a single transaction could succeed.


04 · The Design



Take something that has never existed on a screen and make it so obvious it requires no explanation.
The Huay has never been on a mobile screen. There are no existing UX patterns to adapt, no category conventions to follow. The design problem was precise: take a social system that people understand through relationships and lived experience, and make it legible to someone who has never heard of it — in a few screens, without explanation.
The constraint I set was simple: if it requires explanation, it is not done.
State as the primary interface
Every screen a participant sees is determined by where they are in the circle's lifecycle: waiting to start, depositing, watching the pool fill, receiving, or seeing the final accounting. The app shows exactly one thing at a time, and that thing is always the most relevant action or piece of information for the current state. A participant never has to ask “what do I do now?” — the screen already knows, and shows only that.
The progress ring as natural consequence
I needed something that communicated how full the shared pool was at any moment during a period. The project was already called “Lending Circle.” A ring that fills as deposits arrive was not a design insight — it was the obvious answer once the question was clear. The visual and the concept arrived at the same shape without trying to be clever. That's usually a sign that something is right.
The summary as proof of mechanism
The final summary screen was the clearest test of whether the design was working. If the outcome — Adam paid in more than he received, Debby came out ahead for her patience — was legible from the numbers alone, without a paragraph of explanation, then the mechanism had been communicated. The summary shows each participant's total deposited, total received, and net interest position. A stranger who had never heard of the Huay should be able to read it and understand, immediately, that this is fair.
Design principle
You know you're done when you can't remove anything more.
Not when there is nothing left to add. The summary screen could have had charts, graphs, a period-by-period breakdown. None of that would have made the outcome clearer. The numbers in a plain list, properly labelled, do the job.
05 · Reflection
A few lines of code in a smart contract can reach further than the problem it appears to be solving.
At some point during the build, the conversation between me and my friend shifted from “how do we make this work” to “what would happen if this actually worked.”
The mock stablecoin I created — USDS — stood in for real currency during development. But if the app were real, a real stablecoin would be needed. And if the app became popular in Laos — a country with limited formal banking access, where informal credit systems like the Huay are genuinely relied upon by ordinary people — that stablecoin would circulate. Enough circulation, and it becomes part of the economy. Enough integration into the economy, and it begins to interact with monetary policy. At scale, a privately issued digital currency running outside the central bank's control isn't a fintech product — it's a political event.
We reasoned our way to the same conclusion simultaneously: the Lao government would never allow it.
A few months later, the Lao government outlawed cryptocurrency.
I'm not claiming prescience. The reasoning was not complicated — any government with a functioning central bank and awareness of what blockchain enables would reach the same conclusion. What the moment clarified was something about the technology itself: a relatively small contract, on a public ledger, encoding a centuries-old community practice, had implications that reached from a circle of four people in a demo to the monetary policy of a sovereign nation. That's worth understanding before you build with it, not after.
What this project actually is
Not a blockchain story. Not a fintech prototype.
This is the story of setting out to do something I wasn't sure I was capable of — and doing it. When I started, I was a competent product manager and a competent designer. I had opinions about engineering and could work alongside engineers, but had always depended on other people to build what I imagined. Completing this project end-to-end — concept, design, smart contract, frontend, demo — gave me a different kind of confidence. The chapter that started here is the chapter I'm still in.
