System architecture
Vaults
and TradingEngine
are the core components of the system. Keepers
are a group of web servers that can be run by any entities.
- Liquidity providers provde liquidity to vaults
- Traders need to place position-orders through the OrderRouter
- Keepers listen for new orders submited to OrderRouter and execute them. assets from the GLP pool.
- The state of the order will be sent to the TraingEngine. Here is the place of the system to handle risk management, PNL of an order.
- The TradingEngine get the price from the oracle to calculate PNL for a position.
- Keepers constantly compute the median price from top 5 exchanges: Bi- nance, Coinbase, Kraken, Kucoin, Bybit and update the price in the Or- acle contract.
- Keepers monitor for underwater positions and execute liquidation.