Price Discovery
The price discovery process in the Omotic Protocol Network ensures users receive competitive and transparent exchange rates through interactions between users, the relay, and Liquidity Provider (LP) nodes. Here’s how it works:
- LP node status verification: Each LP node continuously sends heartbeat signals to the relay at regular intervals to confirm its online presence. This process ensures that the relay only interacts with active and available LP nodes, maintaining a reliable network status.
- User-initiated trading query: When a user queries the relay for trading pair information, relay filters the available results based on the currently active LP nodes. This step provides the user with relevant, real-time data on supported trading pairs and available liquidity.
- Request for Quote: Once the user selects a trading pair and specifies the desired exchange quantity, they send an ASK (price quote request) to the relay. The relay processes this request and forwards price inquiry messages to all LP nodes capable of handling the desired trading pair.
- LP node Processing and AMM interaction: Upon receiving the price inquiry, each LP node evaluates the request against its current liquidity and trading parameters. The LP node forwards the inquiry to its Automatic Market Maker (AMM), which calculates the best possible quote for the user’s requested trade.
- Quote submission: AMM generates a quote based on market conditions and the LP’s strategy, sending the calculated quote back to the respective LP node. The LP nodes then return these quotes to the relay server.
- Quote aggregation and user Response: Relay aggregates the quotes from all participating LP nodes and sends them back to the user. This aggregation allows the user to view multiple offers, compare them based on price, reputation, and conditions, and make an informed decision on which quote to accept.
notes
- Communication between the frontend and fep-websocket is done via WebSocket.
- Communication between fep-websocket and the relay occurs through a Redis message queue.
- The relay communicates with LP nodes through HTTP requests.
- The LP nodes communicate with the AMM through a Redis message queue.