Decentralized infrastructure for OTC and premarket trading with secure on-chain settlement.
PreSettle is a trustless marketplace for two kinds of crypto deals that today happen in Telegram groups and on centralized desks: OTC trades and pre-launch (premarket) token sales.
OTC: a maker locks the tokens they want to sell (or the USDC/EURC they want to buy with) in an escrow contract on Arc, sets a price, a deadline and whether partial fills are allowed. Takers fill all or part of the order and the contract computes the price on-chain, so nobody can underpay. The maker can cancel at any time, and once the deadline passes anyone can expire the order. Our keeper does this automatically, so unfilled tokens always go back to the maker.
Premarket: an admin opens a market for a token that hasn't launched yet (symbol, TGE time, delivery window). Sellers lock 100% collateral in USDC or EURC and list an amount and price; buyers pay before TGE. After TGE the real token is set and the seller delivers it to every buyer inside the window. If the seller doesn't deliver, anyone can trigger the default: each buyer gets their payment back plus their share of the seller's collateral. If the token never launches, the offer is voided and everyone is refunded.
The order book is open data on Arkiv. Every listing is an entity owned by the trader's wallet, not by us, so we can't edit or hide anyone's price. A listing expires on Arkiv at the same moment its deadline passes, so the book cleans itself. Every fill is written as a read-only record, giving each trader a track record nobody can rewrite. Anyone can query the book directly, without our API.
Proceeds, refunds, delivered tokens and fees are credited in the escrow and withdrawn from the dashboard, so one blocked address can never freeze settlement for everyone else.
Two chains, each doing what it is best at: money on Arc Testnet, data on Arkiv (Rabdi testnet). There is no centralized database.
Contracts (Solidity 0.8.24, OpenZeppelin, Hardhat): OTCMarket and PreMarket. Every price is computed on-chain with Math.mulDiv and rounded in favour of the escrow, so a taker or buyer can never underpay. State changes happen before transfers, every settlement path can run only once, and payouts are pull-based (credit, then withdraw) because Arc's USDC blocklist makes direct transfers to a blocked address revert, and one blocked address must not freeze settlement for everyone. Gas is Arc's native USDC, so users only ever need USDC. 35 Hardhat tests cover fills, fee splits, cancel/expire, delivery, default, void, reclaim and a solvency check after every path, and we verified that the deployed bytecode is identical to the tested build.
Arkiv: five typed schemas (OTC orders, premarket offers, fills, trader profiles, the token list). Users sign Arkiv writes with their own wallet, so they own their listings and we cannot edit or hide them. Expiry matches the business rules: an order expires on Arkiv exactly at its on-chain deadline, a premarket offer after TGE plus the delivery window, a fill is created read-only for 90 days, and a profile is patched and extended in one atomic batch. Only the fields the UI filters on are indexed (side, token, price, partial, symbol). The token list is trusted only via createdBy(admin).
Backend (Node, Express, viem, Docker on AWS EC2): it queries Arkiv and verifies every listing against the Arc contract (the Arkiv owner must be the on-chain maker and the order must still be open), so a fake listing that copies our schema name is dropped. Market stats are computed straight from Arkiv entities, and prices come from CoinMarketCap.
Notable hacks:
Frontend: React 19, Vite, Tailwind, wagmi, RainbowKit, TanStack Query. Admin sign-in uses Sign-In with Ethereum, checked by the backend and by the on-chain contract owner. Hosted on Vercel; the backend deploys through GitHub Actions to Docker on AWS with automatic CI/CD.

