- Handling token transfers to the Vault
- Managing the wrapping and unwrapping of native tokens
- Implementing a sophisticated two-part transaction process for position changes
- A user sends a request to increase/decrease a position to the PositionRouter.
- A keeper fetches the current index price from an aggregate of exchanges.
- The keeper executes the position at the current index price.
- If the position cannot be executed within the allowed slippage, the request is cancelled, and funds are returned to the user.