SentimentPerps: Sentiment-Driven Perps Trading on Solana
A hackathon trading terminal that reads social sentiment, places leveraged perps on Pacifica and turns the whole loop into a competition.
- Blockchain
- Product
SpecSheet 015
- Status
- Prototype
- Role
- Sole developer
- Year
- 2026
- Language
- TypeScript
- Platform
- Web
- Reading
- 3 min
- Stack
- Next.js 16
- React 19
- Tailwind CSS 4
- Zustand
- Privy
- Prisma
- PostgreSQL
- Lightweight Charts
- Pacifica
- Elfa AI
- Fuul
- Rhinofi

The problem
Crypto traders see a trending token on social media and then lose minutes switching between a sentiment feed, a chart, an exchange and a wallet. The idea was one terminal where sentiment, execution and a bit of competition share the same screen.
The system
8 components · 7 connections · 4 request flows
A Next.js app talks to Pacifica for trading, Elfa AI for sentiment and Fuul for referrals through server API routes. Privy handles wallets, and PostgreSQL stores trades, badges and progress.
Play a request
- Client
- External service
- Service
- Data store
- Data / control flow
- The request
- Trust boundary
Select a component to see its role, the technology behind it and what it talks to — or play a request and watch it travel the system.
Arrow keys move between components, Home and End jump to the first and last. Enter or Space selects one; Escape clears. Plus and minus zoom, 0 fits the map.
Component reference8 components · 4 flows · as text
Components · in request order
- Client · layer 01Trading terminal
- Sentiment, charts, orders, leaderboard
- Component, hook, API route, service, Zustand store. Candlestick charts with Lightweight Charts.
- TechNext.js 16, React 19, Tailwind CSS 4, Zustand
- ToPrivy (login and signing); Rhinofi widget (deposit); API routes (hooks call routes)
- External service · layer 02Privy
- Auth and embedded wallets
- Ed25519 signing for exchange orders.
- TechPrivy
- FromTrading terminal (login and signing)
- InsideThird-party services
- External service · layer 02Rhinofi widget
- Cross-chain deposits
- TechRhinofi
- FromTrading terminal (deposit)
- InsideThird-party services
- Service · layer 02API routes
- 19 route handlers
- Trading, sentiment, referrals, leaderboard and badges.
- TechNext.js route handlers
- FromTrading terminal (hooks call routes)
- ToPacifica (orders, klines); Elfa AI (sentiment); Fuul (referrals); Database (trades and progress)
- External service · layer 03Pacifica
- Perps exchange
- Orders, take-profit and stop-loss, klines, leverage up to 20x.
- TechPacifica API
- FromAPI routes (orders, klines)
- InsideThird-party services
- External service · layer 03Elfa AI
- Social sentiment
- Trending tokens, chat and sentiment-triggered auto-trading.
- TechElfa AI
- FromAPI routes (sentiment)
- InsideThird-party services
- External service · layer 03Fuul
- Referrals
- TechFuul
- FromAPI routes (referrals)
- InsideThird-party services
- Data store · layer 03Database
- Trades, referrals, badges, progress
- Models: Trade, Referral, Badge, UserProgress, ReferralClaim.
- TechPostgreSQL, Prisma
- FromAPI routes (trades and progress)
Request flows
Scan
Trending tokens and the sentiment heatmap.
- Step 1: Trading terminal
- Step 2: API routes
- Step 3: Elfa AI
Trade
- Step 1: Trading terminal
- Step 2: API routes
- Step 3: Pacifica
Compete
Leaderboard, badges and progress.
- Step 1: Trading terminal
- Step 2: API routes
- Step 3: Database
Refer
- Step 1: Trading terminal
- Step 2: API routes
- Step 3: Fuul
Trust boundaries
- Third-party services — Privy, Rhinofi widget, Pacifica, Elfa AI, Fuul
Decisions & trade-offs
5 decisions
One core loop: scan, trade, compete
Every screen serves one of three steps. Scan sentiment, trade on Pacifica, compete on a leaderboard with badges and referrals.
Embedded wallets with Privy
Sign-in creates a wallet, and orders are signed with Ed25519 keys, so a new user can trade without installing anything.
A strict data path
Component, then hook, then API route, then external service, then Zustand store. Keys stay on the server and components stay dumb.
Sentiment can trigger trades
Elfa AI provides trending tokens, chat and a sentiment heatmap, and sentiment-triggered auto-trading closes the loop from signal to order.
Growth built in
Fuul handles referrals and the Rhinofi widget handles cross-chain deposits, so onboarding and funding are part of the product, not an afterthought.
Outcomes
Role · Sole developer
- Built for the Pacifica Hackathon 2026 on DoraHacks.
- 19 API routes and 5 database models (trades, referrals, badges, progress, referral claims).
- Sentiment feed, heatmap, leveraged trading up to 20x with take-profit and stop-loss, leaderboard and badges.
The write-up
3 min read
SentimentPerps was built for the Pacifica Hackathon 2026 on DoraHacks. The idea: notice a token heating up, open a leveraged position and see how you rank, all in one place.
The loop
Scan, Trade, Compete.
Scan. Elfa AI supplies trending tokens, a chat interface and a sentiment heatmap.
Trade. Orders go to the Pacifica exchange: market and limit orders, take-profit and stop-loss, up to 20x leverage, with candlestick charts from Lightweight Charts. Sentiment-triggered auto-trading can place orders from a signal.
Compete. Trades feed a leaderboard, badges and progress, and Fuul referrals add a growth loop.
Under the hood
The app is Next.js 16 with React 19, Tailwind CSS 4 and Zustand. Privy handles sign-in and embedded wallets, and orders are signed with Ed25519 keys. 19 API routes keep exchange and sentiment keys on the server, and PostgreSQL with Prisma stores five models: Trade, Referral, Badge, UserProgress and ReferralClaim. A Rhinofi widget handles cross-chain deposits.
Data always flows the same way: component, hook, API route, external service, Zustand store.
Status
A hackathon prototype. It shows how sentiment, execution and gamification can share one surface; it is not a production trading product.


