Copy trading as playbooks: apply a trader's entry, TP & SL in one tap, executed onchain by Flash.
Playbook is a mobile social trading app where traders publish "playbooks" instead of signals: a complete trading plan with an entry (market, limit below the price, or DCA over time), a take-profit, a stop-loss and a creator fee. Followers apply a playbook with one tap from their own self-custodial wallet, and Definitive Flash executes every order onchain on Base or Solana.
Most copy trading mirrors someone's trades after they happen: you get in late, without the plan, and often hand your funds to a custodian. Playbook copies the plan instead. When you apply, Flash places the entry order and an attached take-profit / stop-loss bracket together, so the position is protected the moment it fills. No server ever holds funds; the app only asks the wallet to sign.
Traders build playbooks by dragging Buy, Take-profit and Stop levels on a live candlestick chart, pick Market, Limit or DCA (Flash TWAP), set expiry and slippage, and publish with a wallet signature. Every apply routes the creator's cut through Flash's integrator fee, so creators can earn from day one.
Followers discover playbooks in a social feed (Newest, Hot picks, Following), upvote or downvote them, follow creators, search traders, and compare a leaderboard ranked by realized return, win rate, applies and volume. Positions show a live timeline (placed, bought, take-profit or stop), and any position can be closed early: Playbook cancels the bracket with one batch-cancel signature and market-sells through Flash.
The built-in wallet uses one recovery phrase for both Base and Solana, is locked with the phone's fingerprint, and shows every transaction and signature in plain English before you sign. Short on USDC? A one-tap Uniswap swap buys exactly the missing amount.
Mobile app: Expo SDK 58 / React Native 0.88 with Expo Router, written in TypeScript. The backend is Expo Router API routes (src/app/api), exported server-only and hosted on Vercel through expo-server's Vercel adapter. Data lives in Supabase Postgres (postgres.js through the pooler, Supabase CLI migrations, row-level security on, API roles revoked so only our server can read and write).
Definitive Flash does all trade execution. The server requests quotes and submits signed orders for market, limit and TWAP (DCA) entries, each with an attached bracket (take-profit + stop-loss), plus expiry and max-slippage options. On Base the wallet signs Flash's EIP-712 order and Permit2 payloads; on Solana it signs Flash's Ed25519 order messages, and we build the one-time setup transaction (token accounts and delegations) ourselves. Closing a position uses Flash's batch cancel and then a market sell. Creator cuts are passed as Flash integrator fees. A small client-side rate limiter keeps us inside Flash's 5 requests/second per endpoint (pacing, 429 retry after RateLimit-Reset, shared in-flight GETs).
Wallet: self-custodial and built in. A BIP-39 phrase derives the Base key (viem) and the Solana key (SLIP-0010 ed25519, m/44'/501'/0'/0'). Keys are encrypted in SecureStore behind biometrics. A confirmation sheet decodes every request on the phone (ERC-20 transfers and approvals, Flash orders, Permit2 permits, Uniswap swaps, Solana transfers) and warns when something doesn't match. Creator profiles and playbooks are published with wallet-signed ownership proofs, so nobody can impersonate a trader.
Uniswap: in-app swaps on Base through the Uniswap API (check_approval -> quote -> Permit2 signature -> swap). The API key stays on our server, and the phone refuses any swap that doesn't call a known Universal Router.
Hacky bits worth mentioning:

