Index

Elsewhere

Project / 015Case study

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
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
SentimentPerps: Sentiment-Driven Perps Trading on Solana cover
SentimentPerps: scan, trade, compete

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.

System map

Follow a request
  • Client
  • External service
  • Service
  • Data store
  • Trust boundary

Select a component to see its role, the technology behind it and what it connects to, or follow a request through the system hop by hop.

Start at
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

  1. Scan

    Trending tokens and the sentiment heatmap.

    1. Step 1: Trading terminal
    2. Step 2: API routes
    3. Step 3: Elfa AI
  2. Trade

    1. Step 1: Trading terminal
    2. Step 2: API routes
    3. Step 3: Pacifica
  3. Compete

    Leaderboard, badges and progress.

    1. Step 1: Trading terminal
    2. Step 2: API routes
    3. Step 3: Database
  4. Refer

    1. Step 1: Trading terminal
    2. Step 2: API routes
    3. Step 3: Fuul

Trust boundaries

  • Third-party services — Privy, Rhinofi widget, Pacifica, Elfa AI, Fuul

Decisions & trade-offs

5 decisions

  1. D01

    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.

  2. D02

    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.

  3. D03

    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.

  4. D04

    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.

  5. D05

    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

  • 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.

RoleSole developer

View on GitHub

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.

Linked by shared domain, stack or language

  • Project / 016 · 2026

    FanFuel: Turning Social Comments into Content Ideas

    An AI intelligence engine that turns thousands of raw Reddit, Instagram and TikTok comments into 12+ structured content ideas in under 10 seconds.

    Shared:

    • Product
    • TypeScript
  • Project / 017 · 2026

    Zzyra.io: AI Workflow Automation Across Web2 and Web3

    An AI-driven workflow engine that connects everyday Web2 APIs with Web3 networks like Hedera and Ethereum, and has been in grant discussions with Hedera Hashgraph.

    Shared:

    • Blockchain
    • TypeScript
  • Project / 005 · 2022

    Nepali Land Converter

    Convert Ropani, Aana, Paisa, Daam and Bigha, Kattha, Dhur to square feet, square metres, acres and hectares, and see how big the area really is.

    Shared:

    • Product
    • TypeScript

rk@request · simulated terminal