Galactic Worm envisions a vibrant ecosystem where digital ownership becomes an integral part of everyday life, providing users with exciting opportunities to earn, play, and explore.
A perpetual decentralized exchange
Confidential
2 months
Blockchain
2025
AWS, Mongo Atlas, Infura IPFS, Solidity, The Graph, ReactJS, NodeJS
PerpFi is a DEX, aiming to deliver the speed, efficiency, and liquidity of centralized platforms but with the complete security and transparency of decentralized finance (DeFi)
PerpFi aims to provide a high-performance Perpetual DEX. However, several challenges stand in the way of achieving this goal:
– Data latency and synchronization: The core trading interface requires a continuous, real-time stream of market data. Relying on the decentralized data layer introduces inherent lag. The time delay between an event being confirmed on the blockchain and it being indexed and available to the front-end can lead to traders viewing stale data, resulting in poor execution and bad user experiences.
– Scalability of off-chain infrastructure: The backend processing that handles market data ingestion, risk calculations, and user transaction tracking must be able to scale instantly and globally. During periods of high market volatility, a sudden 10x spike in trade volume could overwhelm the primary database, leading to slow query times, data backlogs, and ultimately, platform unreliability and transaction failures.
– Frontend performance with real-time data: Without heavy optimization, continuous updates from the backend can trigger excessive component re-renders, causing the trading interface to become sluggish, laggy, or even crash, undermining the platform’s focus on a “CEX-like” trading experience.
To overcome the challenges, Hola Tech adhered to the best practices. Key components of the solution included:
– Implement a high-speed caching layer: Use a fast, in-memory data store (like Redis, managed on AWS) between NodeJS and the ReactJS front-end. The NodeJS service should pull indexed data from The Graph but aggressively cache critical, real-time data (like the merged order book and current funding rate) with a sub-second Time-To-Live (TTL), ensuring the trading interface serves near-instantaneous data without waiting for the next full indexing cycle.
– Adopt a serverless, event-driven architecture: Utilize AWS Lambda and AWS SQS/SNS for core backend functions. Instead of a monolithic NodeJS server, critical tasks can be triggered asynchronously by events. This allows the system to automatically and elastically scale compute resources up during peak load and down to zero during idle times, ensuring high availability and cost efficiency.
– Introduce react list virtualization and memoization: Apply advanced ReactJS performance techniques. Use list virtualization libraries (like react-window or react-virtualized) to only render visible rows in the order book and transaction history tables. Furthermore, extensively use React.memo and useMemo to prevent unnecessary re-renders of complex components when their data props haven’t genuinely changed, maintaining a smooth, high-frame-rate user interface.
– Achieved average order execution latency of under 100 milliseconds via the high-speed caching layer
– Maintained 99.99% system uptime through market volatility, handling peak trade spikes of 2,000 transactions per second
– Reduced the front-end data loading time for the live order book by 45% using virtualization techniques
The implemented system successfully met this PerpFi’s requirements for CEX-like performance, decentralized security, and trading functionality. The platform has significantly enhanced the capital efficiency and trading experience for on-chain derivatives, empowering serious traders to execute complex perpetual swap strategies quickly and with unparalleled transparency. This demonstrates project success in providing a low-latency, resilient, and trustless solution for the highly demanding decentralized futures market.
Galactic Worm envisions a vibrant ecosystem where digital ownership becomes an integral part of everyday life, providing users with exciting opportunities to earn, play, and explore.
Blockchain, UI/UX Design, Website Development Fanpad A new generation fundraising platform on the Fantom blockchain Client Confidential Duration 2.5 months Category Blockchain Year 2022 Technology AWS, Mongo Atlas, Infura IPFS, Solidity, The Graph, Lambda serverless, NodeJS, ReactJS Introduction FanPad is a next-generation fundraising and funding platform built on the Fantom blockchain. Beyond financial support through token sales, FanPad also assists …
BookMind is an innovative application that aims to revolutionize the way users interact with books through artificial intelligence.
MNM TruckRace is a pioneering Web 3.0 gaming platform that integrates NFT ownership with real-world truck driving, aiming to provide players with an immersive experience and unique earning opportunities.