IPositionRouter Interface
TheIPositionRouter
interface defines the functions available in the PositionRouter contract, which manages the queuing and execution of position requests in the Satoshi Perps protocol.
Position Creation
Increase Positions
Decrease Positions
Position Execution
Request Cancellation
Request Query
Configuration
Callback System
State Access
Usage Notes
- Position requests are added to a queue and executed by keepers or the public after a delay.
- Each request requires an execution fee to incentivize keepers to execute it.
- The PositionRouter uses a callback system to notify external contracts when positions are executed.
- Requests have a maximum execution time window, after which they can be cancelled.
Security Considerations
- Ensure acceptable price parameters are set appropriately to avoid unexpected execution at unfavorable prices
- The execution fee should be sufficient to cover gas costs, otherwise requests may not be executed
- Consider the delay between request creation and execution when setting acceptable prices