Loading...
Lucrumia system architecture is designed to support high concurrency, high availability and high security to meet the transaction needs of a large number of users. Its design is divided into five layers: User layer: Provides user interface (UI) and API interface, supports access from web and mobile terminals. Interacts with the application layer through RESTful API or WebSocket to achieve real-time data updates and user operations. Application layer: As the core of the system, it contains business logic such as user authentication, order management, transaction matching, risk control management, etc., and is responsible for processing various user requests. Data layer: Relational databases (such as MySQL, PostgreSQL) and NoSQL databases (such as Redis, MongoDB) are used to store user data, transaction records, market conditions and other information. At the same time, the cache system is used to accelerate data reading and improve system response speed. Network layer: Provides secure and reliable network communication, and adopts load balancing, firewall, DDoS protection and other technologies to ensure high availability and security of the system. Blockchain layer: Interacts with the blockchain network and supports recharge, withdrawal and trading of multiple digital currencies. Improve efficiency through node cluster deployment.
The Lucrumia system cleverly uses the microservice architecture to subdivide the complex exchange functions into multiple independent and efficient microservices, including user management services, transaction matching services, fund management services, and market data services. These microservices each assume specific responsibilities, such as user registration, login, personal information management, real-name authentication, fund security, as well as the recharge, withdrawal, and transfer operations of multiple digital currencies, the automation of transaction processes, and the real-time update and analysis of market data. Through the unified management and scheduling of the API gateway, these microservices achieve seamless collaboration, maintaining a high degree of module independence and ensuring the overall coordination and response speed of the system. This microservice architecture design not only greatly enhances the scalability and maintainability of the Lucrumia system, allowing each service to be independently upgraded and optimized according to business needs without large-scale changes to the entire system; at the same time, it also effectively reduces the coupling between modules and improves the stability and reliability of the system. In addition, the microservice architecture also enables Lucrumia to respond more flexibly to market changes and technical challenges, providing users with safer, more convenient, and more efficient trading services, further enhancing user trust and satisfaction.
The Lucrumia order service stores these market data in the Redis service and synchronizes them to the Redis server in the front-end cluster through the Redis replication mechanism. The front-end server then loads and pushes them to users who subscribe to the data.
• Order verification. This includes confirming that the trading pair is in a tradable state, verifying that the price and quantity of the order meet the minimum requirements, etc.
• Funds check. The purpose is to ensure that the user has sufficient funds in the account to place the order.
• Risk check to avoid abnormal trading behavior.
• Determine the maker rate and taker rate of the order, based on the rules that may be designed for the trading pair, order quantity, user level, etc.
• Create an order object for matching processing and freeze the maximum amount of funds that may be used in the ordering user account.
• Match the new order in the trading order book, and the matching result may be: no match, partial transaction, or full transaction.
When a partial transaction or a full transaction is completed, there may be one or more matching orders in the trading order book.
• Update and persist the account balance of the user who completed the order, and update the trading order book.
• Persist other data triggered by the successful order matching, such as order execution records, fund transaction logs, etc.
• Generate market data and publish the updated data to the front server (Front Server).
Lucrumia Exchange has effectively enhanced the liquidity of the exchange by integrating an advanced market-making module developed based on Akka and Spring framework, significantly narrowing the bid-ask spread and increasing the depth of the trading order book. This module not only attracts external professional market makers to provide orders, but also the exchange itself actively participates in market making and flexibly adjusts strategies to cope with market fluctuations. The market-making module has excellent performance in processing orders, can efficiently distinguish and prioritize market-making orders, and can seamlessly connect with external exchanges to perform automated hedging operations, further reducing risks and improving profitability. These comprehensive measures have enabled Lucrumia Exchange to stand out in the fiercely competitive cryptocurrency market and become an efficient and liquid trading platform trusted by traders.
Lucrumia User Service is a key component integrated into the Akka cluster, which provides comprehensive user-related services for the front-end server, covering user registration, identity authentication, KYC submission, password management, API key management, and recharge address management. When the service starts, it will automatically join the Akka cluster, which is convenient for the front-end service node to discover and use. In order to enhance the scalability and high availability of the service, multiple user service nodes can be deployed in the cluster, and the front-end server sends messages to all surviving nodes through polling scheduling. In addition, the Lucrumia user service can directly access the core database and Redis cluster, and use the wallet service node to create a new blockchain address, thereby providing users with an efficient and reliable service experience.
Lucrumia wallet service is a comprehensive service consisting of multiple applications, which are responsible for generating user recharge addresses, managing exchange hot wallet private keys, creating and submitting withdrawal transactions, connecting to multiple blockchain networks to process transactions, collecting cryptocurrencies in user addresses, and verifying the amount of funds in exchanges. The implementation of these functions is based on different connectivity and security requirements. Some are called through the REST interface of the user service module, some are directly connected to the blockchain network, and some do not require network access, which reflects Lucrumia's careful consideration of security and functionality in the design of wallet services.
Lucrumia Exchange regards security as a core element, and its system risk control mechanism covers multiple aspects, including database read-write separation, efficient cache system, RPC/SOA architecture to reduce coupling, and composite event processing (CEP) to improve real-time risk control performance. At the same time, Lucrumia adopts a central bank-level security system design, which comprehensively covers the five dimensions of physical, network, host, application and data security from a technical level. With multiple protection as the core concept, it builds a multi-level information system to ensure the safe and stable operation of the exchange.