πIntegrating the f(x) limit orders
For users of the f(x) protocol, Limit Orders are a critical feature. By allowing position management at a fixed rate, limit orders eliminate slippage and reduce exposure to market-price uncertainty β a benefit that is especially valuable for large-size orders and systematic strategy executors. In addition, the introduction of take-profit / stop-loss orders enables the reliable automation of many trading strategies that would otherwise be impractical on an entirely market-priced execution model.
1. Components
1.1 Smart contracts
We introduce the LimitOrderManager
family of smart contracts to implement limit-order functionality. These contracts allow orders to be filled on-chain while simultaneously operating the corresponding position (open/close/adjust), ensuring atomic and auditable execution.
For more details, please read the LimitOrder contracts section.
1.2 Limit order API services
A dedicated API/relayer service is provided to help users broadcast and discover signed orders. Users sign orders off-chain and submit the order plus signature to the API, which acts as an order-relay and discovery layer for counterparties.
For more details, please read the LimitOrder APIs section.
1.3 Front-end
For retail or non-technical users, the standard f(x) front-end provides UI flows to create, submit and monitor limit orders and TP/SL orders, abstracting away the underlying contract interactions and relayer details.
2. Integration flow (high level)
Maker creates and signs an order off-chain (locally).
The maker submits the signed order to the Limit Order API / relayer (optional).
A Taker discovers the order (via the API or other discovery means) and fills it on-chain by calling
LimitOrderManager
. The on-chain fill is executed atomically and operates the associated position.
Last updated