Architecture

We will separate a discussion of the sysem into three separate types of objects:

  1. Those that deal with the accounting of overall liquidity for LPs and their upkeep

  2. Those that deal with the specific accounting of funds around a particular trade and it's lifecycle

  3. Those that deal with keeping track of external values (oracles)

We originally set out to design a perpetuals contract that is backwards compatible enough with Jupiter that existing bots for Jupiter could plug into Imperial with minimal reconfiguration.

As such, there are some fields are not in use, and we will discuss which are, which are not, and what they do, and in the follow up Lifecycle section we will discuss how each value gets set and when during the lifecycle of a trade and how the LP funds change over time as well during swaps or trading activity.

Finally, we will conclude with some deep dives in the Concepts section to explain how some specific parts of the system work.

Last updated