IOrderBook Interface
TheIOrderBook
interface defines the functions available in the OrderBook contract, which manages limit orders for the Satoshi Perps protocol.
Order Creation
Increase Position Orders
Decrease Position Orders
Swap Orders
Order Cancellation
Order Execution
Order Access
Configuration
State Access
Usage Notes
- Orders are triggered when the price or ratio conditions are met.
- Each order requires an execution fee to incentivize keepers to execute it.
- For increase orders with token swaps, the path should include the tokens to swap through.
- The
triggerAboveThreshold
parameter determines if the order should execute when the price goes above or below the trigger price.
Security Considerations
- Ensure trigger prices are set appropriately to avoid unexpected execution
- The execution fee should be sufficient to cover gas costs, otherwise orders may not be executed
- For increase orders, ensure sufficient tokens are approved or sent with the transaction