Example Solver Order Flow
Introduction to the Solver Role
Market makers, also known as solvers, are critical to the functioning of decentralized exchanges, ensuring trades are executed efficiently. Their complex role is essential for delivering the best possible outcomes for traders. In this section, we’ll outline the steps a solver takes, highlighting the depth and sophistication of their operations.
Note: The following provides an example of how a solver might hedge off-chain. The system is designed to offer maximum flexibility, with solvers having nearly infinite freedom in their operations.
1. The Solver Deposits Collateral On- and Off-Chain
The solver begins by depositing their collateral across both on-chain and off-chain venues. Typically, they deposit 50% of their collateral in the on-chain execution contracts, while the other 50% is deposited in off-chain hedging venues, which can include centralized exchanges (CEX), over-the-counter (OTC) trading desks, and other platforms.
Note: These off-chain venues give solvers flexibility in managing their risk and optimizing their strategies.
2. The Solver Sets Up Their Market Making Software
The solver sets up their market-making software to:
Query and execute trades on off-chain hedging venues.
Interact with on-chain execution contracts.
Stream pricing data and quotes to the platform's front-end via WebSockets and APIs.
This setup ensures that solvers can provide real-time, accurate pricing information and execute trades seamlessly.
3. The Solver Streams Pricing Data to the Front-End
Once set up, the solver streams pricing quotes to the platform front-end using data obtained from their off-chain hedging venues. The price feeds are continuously updated to provide the most accurate market data. These quotes are then streamed to the platform, usually at a desired spread (+/- Xbps) in comparison to the on-chain order book price feed.
4. The Trader Inputs Trade Intent and Accepts the Quote
As described in the Trading Tutorials section, a trader on the platform inputs their intent to trade, specifying details such as order size, type, and leverage. In response, they receive real-time price quotes from solvers. The platform's proprietary matching system ensures that the trader receives the best available quote based on their trade intent.
If the trader accepts the quote, they submit a “request for trade,” along with the required margin, through the on-chain execution engine via a signature.
5. The Solver Receives the Request, Hedges Off-Chain, and Opens the Trade
Upon receiving the trade request, the solver proactively hedges the trader’s position off-chain at their chosen hedging venues. This preemptive hedging ensures the solver is delta-neutral for their on-chain position. After hedging, the solver fills the trade request by depositing the required margin in the on-chain perpetual contract, confirming with a signature.
Note: While the solver can hedge their positions, they are not required to do so. They may choose to take on directional risk or use other methods such as spot holdings for hedging.
6. Both Parties Monitor and Rebalance, Close the Trade, or Face Liquidation
Both the trader (on-chain) and the solver (on- and off-chain) must manage their collateral to meet margin requirements. If either party fails to do so, liquidation can occur through a third-party liquidator.
As outlined in the Trading Tutorials section, the trader must monitor their on-chain margin account to ensure they have sufficient collateral to avoid liquidation. They can also request to close their position and recover their collateral, plus or minus any profits or losses (PnL).
The solver must maintain both on-chain and off-chain margin levels. When the trader requests to close their position, the solver can close their off-chain hedge position (remaining delta-neutral) and then accept the on-chain request to close the trade.
Third-party liquidators continuously monitor the margin balances of open positions using oracle price feeds. If either the trader or the solver’s margin balance falls below the required threshold, liquidation may occur.
Conclusion: On-Chain and Off-Chain Integration
The system’s strength lies in its seamless integration of on-chain and off-chain activities, benefiting both traders and solvers.
For Traders:
Optimal Price Execution: Access liquidity from off-chain sources directly on-chain.
Fast Fill Times: Streamlined RFQ process with fill times typically under 5 seconds.
Access to Derivatives: Trade products that may not be available on-chain.
Trustless Execution: Enjoy permissionless, self-custodial, and trustless on-chain execution.
Efficient Large Orders: Fill large orders via multiple solvers acting as liquidity aggregators for optimal price discovery.
For Solvers:
Delta-Neutral Positions: Proactively hedge to maintain a neutral risk profile.
Flexible Liquidity Sources: Source liquidity from any location, maximizing arbitrage opportunities (CEX, DEX, OTC, Spot, CME options, etc.).
Advanced Netting: Utilize netting infrastructure to minimize directional exposure and reduce cost (future product offering).
The system’s openness and flexibility give solvers and traders the tools they need to efficiently and optimally execute derivative trade agreements. It provides a powerful, dynamic solution for both sides of the trade, maximizing value and minimizing risk.
Last updated