draw-fi

Draw price predictions on live charts, trade instantly, and turn intuition into a game on Yellow.

draw-fi

Created At

HackMoney 2026

Winner of

Yellow

Yellow - Integrate Yellow SDK: Trading apps/Prediction markets/Marketplaces 2nd place

Project Description

Draw-Fi is a gamified futures trading platform that reimagines how users express market intent. Instead of placing traditional long or short orders, users draw a price trajectory directly on a live market chart, representing how they believe an asset will move over a short time horizon (1–5 minutes). This drawing is transformed into a structured prediction and used to open a futures position whose outcome is determined by directional accuracy rather than precise price targets.

Each drawn curve is converted into 60 discrete prediction points, representing second-by-second directional expectations (up, down, or flat). These predictions are stored in EigenDA for scalable and tamper-resistant data availability, while corresponding live price data is aggregated in parallel. When a position expires, Draw-Fi compares the predicted directions against actual market movements and calculates profit or loss based on how accurately the user anticipated price direction over time. This model rewards intuition and consistency, making trading feel more like a skill-based game than a binary bet.

To enable fast, expressive trading without friction, Draw-Fi deeply integrates the Yellow Network and Nitrolite protocol. Users fund their accounts using Yellow’s off-chain ledger (ytest.usd), open positions instantly without paying gas, and receive payouts immediately when positions close. All trading activity happens within a session-based off-chain balance, with smart contracts used only for final verification and settlement when required. This architecture delivers Web2-speed interactions while preserving Web3 trust guarantees.

Draw-Fi combines real-time market data, off-chain scalability, verifiable settlement, and playful interaction design to demonstrate how session-based finance can unlock entirely new user experiences. The result is an accessible, engaging trading product that showcases the strengths of Yellow Network for high-frequency, low-friction financial applications.

What It Does

  • Draw predictions – Sketch a path on a live market chart representing your expected price trajectory over 1–5 minutes
  • Open positions – Your drawing is converted to 60 price points, stored in EigenDA, and committed on-chain
  • Calculate PnL – Profit/loss is based on directional accuracy: how many of your 59 step-by-step direction predictions (up/down/flat) match actual market movements
  • Leaderboard – Compete with other traders ranked by total PnL, win rate, and accuracy
  • Yellow Network – Fund positions off-chain (ytest.usd), settle on-chain. No gas for deposits; instant payouts via Yellow.

Architecture

┌─────────────────┐     ┌──────────────────┐     ┌─────────────────┐
│  Bybit WebSocket │────▶│  Price Aggregator │────▶│    EigenDA      │
│  (Live Prices)   │     │  (60 prices/min)  │     │  (Blob Storage) │
└─────────────────┘     └──────────────────┘     └────────┬────────┘
                                                          │
                                                          ▼
┌─────────────────┐     ┌──────────────────┐     ┌─────────────────┐
│  User Draws     │────▶│ Prediction       │────▶│ PriceOracle     │
│  Prediction     │     │ Service          │     │ (On-chain)      │
└─────────────────┘     └──────────────────┘     └─────────────────┘
        │
        ▼
┌─────────────────┐     ┌──────────────────┐     ┌─────────────────┐
│  LineFutures    │◀────│ Position Closer  │◀────│ PNL Calculator  │
│  (Positions)    │     │ (Cron every 10s) │     │ (Directional)   │
└─────────────────┘     └──────────────────┘     └─────────────────┘

Yellow Network:
┌─────────────────┐     ┌──────────────────┐     ┌─────────────────┐
│  Yellow Ledger  │────▶│ Deposit Poller   │────▶│ Yellow Balances │
│  (Incoming xfer)│     │ (every 15s)      │     │ (DB)            │
└─────────────────┘     └──────────────────┘     └────────┬────────┘
                                                          │
User opens position ──▶ deduct balance ──▶ Relayer ──▶ LineFutures
Position closes ──▶ Payout via Yellow transfer to user

Key Components

Smart Contracts

  • LineFutures – Position lifecycle: openPosition, batchOpenPositions, closePosition. 60s per position, 1–2500x leverage, 2% fee on profits. Requires EigenDA commitment IDs for predictions and actual prices.
  • PriceOracle – Stores EigenDA commitment strings for 60-second price windows (minute-aligned).

Backend

  • Price pipeline: Bybit WebSocket → PriceAggregator (60 prices/min) → EigenDA → PriceOracle
  • Prediction pipeline: User uploads 60 predictions → EigenDA → LineFutures commitment
  • Position closer: Cron every 10s finds expired positions, fetches predictions + actual prices from EigenDA, computes PnL, closes on-chain
  • Yellow integration: Deposit poller (credits user balances from Yellow transfers), payout via Yellow on position close

PnL Formula

  1. Compare 59 directional changes: predicted vs actual (up/down/flat)
  2. accuracy = correctDirections / 59
  3. maxProfit = priceMovement × positionSize × leverage
  4. pnl = (2 × accuracy - 1) × maxProfit — 50% = break-even, 100% = max profit, 0% = max loss
  5. 2% fee on profits only

How it's Made

Draw-Fi is built with a Next.js frontend for live charts and drawing interactions, a Node.js backend for price aggregation and position management, and Solidity smart contracts for verifiable settlement. Live prices are streamed via exchange WebSockets, aggregated into minute windows, and stored in EigenDA for scalable, tamper-resistant data availability.

User-drawn predictions are uploaded to EigenDA and referenced on-chain. Yellow SDK and the Nitrolite protocol power instant, session-based balances: users deposit ytest.usd via Yellow, open positions with off-chain deductions, and receive instant payouts via Yellow transfers. Smart contracts finalize outcomes only when needed, demonstrating a real-world use case for gas-free, high-frequency financial interactions.

background image mobile

Join the mailing list

Get the latest news and updates

draw-fi | ETHGlobal