Overview
OTC is a marketplace for large token trades on Solana. A seller lists an SPL token, locks it in an escrow program, and a buyer pays from their wallet without the trade moving a public order book. Buyers and sellers can also negotiate in chat and settle a discounted offer on-chain.
I built it end to end on my own: the Rust escrow program, a Node backend with wallet sign-in and messaging, a React web app, and later an Expo mobile app that reuses the same program and API.
The challenge
When a team or a large holder wants to sell a big block of tokens, dumping it on an exchange moves the price against them. The usual alternative is a private deal over chat, which asks both sides to trust each other with money.
A useful OTC tool has to do two jobs: let people agree on terms privately, then hold the tokens so that neither side can walk away with both.
The goal
Make private token deals safe to close, from listing to payout, on both web and phone.
- 01Hold the seller's tokens in a program-owned vault until a buyer pays.
- 02Support partial fills and custom offers, such as a discounted price for one buyer.
- 03Let counterparties negotiate in-app, with wallet-based sign-in and no passwords.
- 04Ship the same marketplace as a web app and an Android build.
The escrow program
The on-chain core is a Rust Solana program. Each listing is a program-owned account, and the seller's tokens sit in a vault token account controlled by a derived address, so no one can move them except through the program's rules.
- 01Initialize a listing, deposit tokens, purchase, and cancel.
- 02Initiate, pay and cancel an offer, so a seller can grant a specific buyer a discounted price, paid all at once or in instalments.
- 03On purchase, quote tokens go to the seller and base tokens leave the vault to the buyer in one transaction.
- 04Deployed to devnet, with a USDC-style dev token as the quote currency.
Listing and buying
The web app reads listings straight from the program with getProgramAccounts. A marketplace page filters by status, a create-listing form previews the listing as it is filled in, and the listing detail page shows the token metadata, price and seller reviews. Sellers can cancel their own listing if they no longer need it. I also wrote scripts to create and update token metadata so the test tokens show real names and logos in wallets.
Negotiation, sign-in and reviews
The Node backend handles what does not belong on-chain. Sign-in uses a wallet signature: the server issues a one-time nonce, verifies the signed message, and returns a short-lived access token with a refresh token. Messages between buyer and seller travel over Socket.IO and are stored in MongoDB, and buyers can leave a one to five star review on a listing.
- 01A chat-based offer modal for the seller and another for the buyer.
- 02Dashboard activity feed of a user's listings and trades.
The mobile app
In March 2026 I ported the product to React Native with Expo and NativeWind. It has an onboarding flow, wallet connect, a dashboard, create and browse listings, messaging and a profile screen, and talks to the same backend and escrow program. A preview Android build is available through Expo's build service.
Documentation
I wrote architecture notes and runbooks covering the account model, each instruction's accounts and the environments, plus a PDF workflow walkthrough of the marketplace. They note that mainnet is not validated yet and that audits would come first.
The outcome
OTC is live on devnet as a web app, with a mobile build alongside it and a single escrow program under both. It covers the full life of a private deal: list, negotiate, pay and review, with tokens held by the program the whole time. It has not been audited or run on mainnet.


