Public-goods funding on NEAR: people donate to projects and to matched funding rounds. I built its donation flow, its funding-round pages and its payout processing, and connected it to Nada.bot's human verification.

PotLock funds public goods on the NEAR blockchain. Donors find projects and give to them directly, or through funding rounds, called pots, where a sponsor's matching pool is shared out according to how many people backed each project.
That only works if people can follow the money. Every donation, application and payout is a transaction on a smart contract, and the interface has to make that chain data readable: who donated what, to which project, in which round, and what each project is owed from the pool. A round also moves through four stages, applications, the matching round, a challenge period and payouts, and everyone involved needs to see where it stands.
Matched rounds also invite fake accounts, because many small donations earn more from the pool. One person with many wallets can tilt a round, so a matched donation has to know first whether the donor is a real person.
PotLock is a front end over NEAR smart contracts: one for direct donations, a factory that deploys a contract for each funding round, a registry of projects, and Nada.bot's contract for human verification. Profiles and posts live in NEAR's SocialDB. The app reads those contracts and an indexer API, and signs transactions through the user's wallet.
Direct donations and donations into a round, from form to confirmation to success, with a cart and its checkout, referral fees, and a human check before any matched donation goes through.
Anyone can explore rounds with filter and sort, and a new round is deployed from the app itself. Each round page shows its stage tracker, projects, applications and their review, donations, sponsors and settings.
Each project's allocation from the matching pool is prepared, published for the challenge period, and set on-chain once it ends, with handling for flagged accounts and failed transactions.
Project and profile pages carry their funding history. A donors leaderboard, a sponsors board and donation tables with filtering and pagination show where the money went, and owners register, edit and post to the feed.
A matched donation asks Nada.bot whether the donor is human. A donor who is not verified yet is sent to collect stamps first, so fake accounts cannot tilt the pool.
Feature-Sliced Design for the Next.js app
Instead of folders by file type.
Business logic lives in entities and features, such as pot, campaign, donation and pot deployment, apart from shared UI and services. Each part has clear boundaries and can change on its own.
One typed client per contract
Instead of contract calls written inside components.
A screen asks for donations or round data through one interface. When a contract changes, one file changes.
A structured TypeScript app, compiled to on-chain widgets
Instead of growing a set of loose widgets.
Routes, modules, services and hooks gave the on-chain app the shape of a normal front-end codebase, with types and tests.
Payouts go on-chain only after the challenge period
Instead of setting them the moment a round ends.
The published allocations can be challenged before they become final on the contract.
PotLock is open source, so the whole stack is public. This is what it is built with, and why.
Typed from the rebuild onwards, so data from a contract has one known shape.
Routing and rendering for the third version of the app.
Utility styling, and accessible primitives for dialogs, menus and tabs.
Component styling in the on-chain versions.
The app ships as widgets stored on-chain and served by a gateway, so the front end is as decentralised as the contracts.
Compiles a structured TypeScript app, with routes, modules and state, into BOS widgets.
Global state with persistence, for the cart and the session.
Forms for donating, applying and configuring a round.
Generates the API client from the indexer's schema, so front end and back end stay in step.
Sortable, paginated tables for donations and payouts.
One sign-in for 20 wallets, Ethereum wallets included.
Typed view and call methods for each contract.
Donations, rounds and the project registry: the source of truth.
Profiles, follows and posts.
End-to-end tests of the on-chain app.
The same checks before any change is merged.
I worked on PotLock as a software engineer in a remote product team, across its first on-chain app, its TypeScript rebuild and the start of its Next.js app. My part was where the money moves: the donation flow, the funding rounds and the processing of payouts, from a donor's first click to the transaction on the contract.
I also connected PotLock to Nada.bot, so a matched donation checks that the donor is human, and I wrote the typed contract interfaces that the Next.js app is built on.
I joined when PotLock was a set of on-chain widgets. When I left it had a typed, modular codebase, a complete flow for running a funding round from applications to payouts, and the contract layer its Next.js app is built on.
Donors could give to a project or into a round from one flow, round admins could take a round from applications to final payouts in the app, and a matched donation checked first that the donor was human.



