chronix

Decentralized platform to predict crypto price trends and place secure bets.

chronix

Created At

ETHGlobal New Delhi

Project Description

Chronix is a decentralized betting platform that allows users to predict and bet on cryptocurrency price movements in a secure, transparent, and trustless way. Built with Next.js, Node.js, and Solidity smart contracts, Chronix creates a seamless experience for users to place bets, manage funds, and view outcomes — all powered by blockchain technology.

What it does Enables users to place long or short bets on cryptocurrency price movements. Uses smart contracts to handle bet placement, settlement, and payouts without intermediaries. Provides a vault system where users can deposit and withdraw tokens securely. Includes a lottery mechanism for additional rewards and engagement. Tracks betting history, statistics, and user performance in real time.

How it works Frontend (Next.js): Provides an interactive dashboard with real-time charts, wallet integration, and a responsive design for both desktop and mobile. Backend (Node.js + PostgreSQL): Handles user accounts, authentication, and blockchain event listening. Ensures bets and payouts are properly tracked and verified. Smart Contracts (Solidity): Execute the betting logic, manage vault operations, control the lottery system, and interact with external data sources for accurate price information.

Key Features Trustless betting where all logic is executed on-chain. Crypto-native with direct wallet integration. Transparent outcomes with verifiable price and settlement data. Automated event listener that processes bets and triggers settlements. User analytics including win/loss ratios and historical performance. Extendable design that can integrate future DeFi or sustainability-related features.

Why Chronix Chronix reimagines online betting by removing middlemen and ensuring fairness through decentralized infrastructure. Instead of relying on a centralized operator, users interact directly with open-source smart contracts and verifiable data. This creates a transparent, community-driven platform for prediction markets and crypto-based wagering.

How it's Made

How it’s Made

Chronix is built as a full-stack decentralized application with three core layers: frontend, backend, and smart contracts. Each layer is tightly integrated to create a smooth user experience while ensuring security and decentralization.

Frontend

Built with Next.js 14 and TypeScript for a fast, scalable, and modern web application.

Tailwind CSS was used for styling with a custom neumorphic-inspired design system to make the UI clean and user-friendly.

Integrated TradingView charts to display real-time crypto price data directly within the betting dashboard.

Redux Toolkit powers state management, keeping wallet data, user bets, and real-time updates in sync across the app.

Wallet integration was achieved using Reown AppKit, which allowed seamless connection to MetaMask and other EVM-compatible wallets.

Backend

Built with Express.js (Node.js + TypeScript) as a lightweight REST API.

PostgreSQL with Prisma ORM manages user profiles, bets, and historical data efficiently.

JWT-based authentication was implemented to ensure secure login and API usage.

A custom event listener service runs in the backend, constantly watching for blockchain events (bet placements, bet settlements, vault interactions) and synchronizing them into the database.

This approach ensures that the frontend always displays up-to-date and verifiable data, even if users refresh or reconnect.

Smart Contracts

Written in Solidity and developed using Hardhat.

Deployed on a testnet for accessibility and low transaction costs during development.

Core contracts include:

Betting contract: Handles bet placement, timing, settlement, and payouts

Vault contract: Manages deposits, withdrawals, and funds for bet settlements

Lottery contract: Provides random rewards to incentivize participation

Carbon credit contract: Experimental feature to integrate environmental impact tracking into betting

Contracts are modular and extensible, designed to support additional use cases without redeploying the entire system.

Integrations and Partner Tech

Used decentralized oracle services (price feeds, automation, verifiable randomness, and data streams) to ensure that external data like crypto prices and randomness are trustworthy and tamper-proof.

Automated execution was particularly useful in settling bets without requiring manual intervention.

Hacky or Notable Implementations

Built a custom real-time event listener in the backend that re-processes historical events if it ever falls behind, ensuring no bet or payout is missed.

The frontend and backend both share contract ABIs for consistent blockchain interaction, which eliminated mismatches between the UI and backend services.

Implemented a fallback mechanism where if external price feeds fail, bets are paused to prevent unfair settlements.

Designed the architecture so developers could redeploy only specific contracts (like Lottery or Vault) without breaking the entire system.

background image mobile

Join the mailing list

Get the latest news and updates