> For the complete documentation index, see [llms.txt](https://logx-1.gitbook.io/logx-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://logx-1.gitbook.io/logx-docs/logx-aggregator/technical-guide/architecture.md).

# Architecture

Following diagram depicts the architecture of LogX Aggregator.

<figure><img src="/files/EtcyZckUC80w70xxeQVt" alt=""><figcaption></figcaption></figure>

User's trade request is sent to LogX Aggregator ProxyFactory via the Transferable Upgradeable proxy Contract.

For each unique User Address, Collateral Token, Underlying Token, isLong (true if position is long and false if position is short), a User Position Contract is created which will interact with the Exchange Contracts. The ProxyFactory contract makes sure each trade request is routed to the right User Position Contract.

The User Position Contract handles opening and closing trades, placing, modifying and cancelling orders and getting information related to the user's position.
