The collaborative social layer for on-chain traders. Turn solo trading into a team sport.
Trenches turns solo trading into a team sport. Found a Trench with people you trust — one tag, one leader, up to fifty traders, open to anyone or invite-only. Enter seasons from your own wallet: internal seasons inside your Trench, global seasons against everyone. Rise up a public ladder nobody can fake: one human per slot, every fill scored on-chain, prizes that pay out on their own. A season is a trading competition with the assets, the window, the prize pool and the split fixed up front. The pool is escrowed on Hedera when it's funded. Entrants pass one World ID check — one human, one slot, no alt accounts — and trade through Definitive Flash advanced orders (market, DCA, bracket, limit, TWAP) from their own wallet; nothing is custodied, nothing is faked. Fills rank the board on Arkiv in real time, and at the deadline the pool pays the winners while every ranking snapshot and payout is logged to a Hedera Consensus Service topic. Your results lift your Trench. Trenches climb a monthly ladder on their members' season results, scored so a crew is ranked on its traders, not its biggest wallet. Every trader carries a handle, XP and a title from Recruit to Warlord across seasons, and appears on every board as handle · title. Everything public - Trenches, memberships, seasons, entries, boards, scores, payouts, profiles — lives on Arkiv as wallet-owned entities anyone can query without asking us. On-chain trading is solitary and unverifiable: a wallet, a chart, a screenshot. Trenches gives traders a crew to climb with and a record nobody can dispute.
Monorepo: Next.js 15 (App Router) + Tailwind for the mobile-first web app and API routes, a separate Node worker (node-cron) for order polling, board and ladder recompute, XP and settlement, Postgres via Drizzle as a cache/index, and pure TypeScript packages for P&L, Trench score, XP, prize and fee math with 73 unit tests. No Solidity anywhere. Definitive Flash is the execution rail: quote → order with a platform fee attached → trader signs via Privy (embedded or external wallet) → Flash lands the trade on Base. The worker polls open orders every 15 s and ingests fills with tx hashes; the board uses average-cost P&L with mark prices from Flash quotes. Arkiv is the public source of truth: trench, membership, season, entry, board, score, payout and profile entities with filterable annotations, wallet ownership and expiry. The ladder, boards, season discovery, Trench pages and profiles read straight from Arkiv queries in server components; Postgres only speeds up joins. Memberships are stored as dated windows, so a trader's fills count only for the Trench they were in at the time, and a leader who leaves hands over to the longest-standing member. World ID IDKit (Proof of Human, action join-trench, signal = season id) gates entry. Proofs are verified server-side; the nullifier is hashed and unique per season, which gives one human one slot; one handle per nullifier. Success, cancel, invalid and duplicate paths are all handled. Proofs are mocked during the hackathon per World's instructions. Hedera via the JS SDK, no contracts: one escrow account and one HCS topic per season; prize pool in an HTS token; a TransferTransaction pays winners at settlement; Mirror Node REST shows escrow balance and payout status. Escrow keys are generated per season and stored AES-256-GCM encrypted. Hacky bits: a DEMO_MODE fast-forward endpoint ends a season and runs settlement on demand so a full season fits in a 3-minute video; Trench scores clamp each member's ROI to ±50% so one whale can't carry a crew; the OG share card is generated per season with @vercel/og so leaders can post the live top 3; and the Trench layer was added in the final three hours behind a feature flag, with the previous build kept deployable as a fallback.

