St0x: Blockchain-based token management platform

Decentralized token management platform designed to streamline real-time trading and management of tokenized stock assets, providing users with secure, transparent transactions and up-to-date market data from multiple brokers.
St0x
Project category

Web3 & Blockchain

Industry

Fintech, Web3

Location

Global

Duration

Jul 2024 - Sep 2024

Blockchain-based token management platform

St0x is a blockchain-powered token management platform that leverages Cloudflare Workers, Durable Objects, and D1 databases to handle high-volume token data streams. It enables users to buy, sell, and manage tokenized stock assets like GME and Apple, while tracking real-time token prices through integrated data from multiple brokers, including IBKR.

The platform ensures fast, reliable trading, with real-time price updates delivered via WebSockets, and utilizes smart contracts for trade execution. Historical token data is stored for long-term analysis, providing users with comprehensive insights into asset performance.

Objectives

The primary objectives for the development of St0x were:

  • To create a high-performance platform for buying, selling, and managing tokenized stock assets in real-time.
  • To provide seamless integration of blockchain data with token pricing information from multiple brokers.
  • To ensure secure, transparent transactions through smart contracts and a robust backend system.
  • To deliver real-time token price updates and historical data storage for better user insights.

Approach used

The development process included:

  • Integrating Cloudflare Workers to handle high volumes of requests and trigger smart contract execution in real-time, ensuring order matching without delays.
  • Implementing smart contracts to automate trade processes and ensure optimal pricing for tokenized assets.
  • Storing real-time data with Durable Objects for quick access to broker-specific token prices during transactions.
  • Maintaining long-term historical data through the D1 database for detailed performance analysis.
  • Providing real-time token price updates via WebSockets for accurate tracking.
  • Aggregating token prices from multiple brokers, including IBKR, for transparency and accuracy.

Technologies used​

  1. Solidity: For developing the smart contracts that power the lottery on the BASE network.
  2. HardHat: For contract deployment, testing, and scripting automation.
  3. Python: For backend services that interact with smart contracts and manage data aggregation.
  4. TypeScript: For developing robust, type-safe Workers and Durable Objects logic.
  5. WebSockets: To provide live updates on token price changes and historical data for users.
  6. Cloudflare Durable Objects: Manage token-specific data, providing a distributed system for storing and processing real-time information.
  7. Cloudflare D1 Database: Used for long-term storage of token prices and historical data.
  8. Cloudflare Workers: The backbone of the platform, handling user requests, blockchain event processing, and interactions with smart contracts.
  9. Next.js - It optimizes scripts, images, and fonts, while allowing easy integration of meta-information for SEO.
  10. Wagmi + Viem: Simplifies the integration of etherium into web application - makes it easy to "Connect Wallet", display ENS and balance information, interact with contracts, sign messages and other.
  11. TypeScript: Allows to track type errors and others at the development stage.
  12. Tailwindcss: Allows to minimize project structure, and utility classes speed up component styling and are easy to maintain.
  13. Graphql-request - Minimal GraphQL client supporting Node and browsers for scripts or simple apps. To send graphql queries to the application backend.
  14. Testing: Automated testing of Workers and Durable Objects and D1 using Wrangler and Vitest to simulate real-world usage and ensure data consistency.

Additional Features:

  1. Historical Data Storage: Through D1, the system stores and provides access to token performance data over time.
  2. Global Low-latency Access: By leveraging Cloudflare’s global network, the system ensures low-latency data access for users worldwide.
  3. Scalability: Built to handle high traffic and token price updates with low overhead using Cloudflare’s edge infrastructure.

Tech stack

Similar Case Studies

Gaming project

Tryraffle: Crypto Raffle

Lottery for basic ETH tokens on BASE network with 3 games at different logic.

Fintech project

Polytrade: Blockchain-based trade finance platform

Decentralized blockchain protocol designed to modernize receivables financing by bridging buyers, sellers, insurers, and investors for a smooth trading journey.

Web3 project

Layer-1 Blockchain

Developing a cutting-edge Layer 1 blockchain based on the Proof of Stake algorithm that solves scalability and security issues, and offers low-cost and near-instantaneous transactions.

Fintech project

Crypto Portfolio Management Platform

Cryptocurrency portfolio management platform that offers users a comprehensive set of tools: trading bots for rebalancing, correlation analysis, backtesting trading strategy, and social portfolio management, all supported by a capacity to analyze up to 5,000 portfolios.

Web3 project

NFT Marketplace

Created on a native PoS Layer-1 network, NFT-marketplace gives users a secure environment for transparent and hacker-proof transactions. Every user can buy, sell, create, and exchange NFTs without intermediaries.

Thank you!

Your message has been successfully submitted. We appreciate your interest and will get back to you as soon as possible