Skip to main content

Real-Time Features

Beforehand provides real-time updates for market activity and user notifications.

Real-Time Updates

Market Updates

  • Pool size changes
  • Price updates
  • New trades
  • Status changes

Notifications

Users receive real-time notifications for:

  • Market matched
  • Market closed
  • Market resolved
  • New comments
  • Trade confirmations

Implementation

Supabase Realtime

  • WebSocket connections
  • Database change subscriptions
  • Efficient updates
  • Automatic reconnection

Contract Events

  • Listen to on-chain events
  • Update UI when trades happen
  • Show confirmations
  • Refresh data

User Experience

  • Live prices: Prices update as trades happen
  • Instant notifications: No page refresh needed
  • Status updates: Markets update in real-time
  • Trade confirmations: Immediate feedback

Performance

  • Efficient: Only subscribed to relevant data
  • Scalable: Handles many concurrent connections
  • Reliable: Automatic reconnection on disconnect
  • Optimized: Batched updates where possible