Mechanic & Foundation of ALO
ALO = Automated Limit Order Book Market Maker For Perpetual Market
Last updated
ALO = Automated Limit Order Book Market Maker For Perpetual Market
Last updated
The mechanics of ALO's smart contract involve the integration of two key pools:
Liquidity Pools: This pool is composed of funds contributed by market participants.
Position Pools: This pool encompasses all accumulated position sizes, both long and short, that have arisen during trading activities.(diagram0)
Market participants inject funds into the smart contract, specifically into the liquidity pools.
Subsequently, the smart contract undertakes the task of generating limit orders on both the bid and ask sides. This generation process adheres to the formula:
X . Y = k (or alternately y = ax + b), in alignment with the guidance provided by the oracle price.
The X . Y = k formula serves the purpose of determining the depth of the order book as well as the spread. These determinations are established based on the equilibrium of the liquidity pool's balance.
This approach underscores the mathematical foundation that orchestrates the dynamics of our smart contract, facilitating an optimized trading experience for all participants.(diagram1)
The liquidity pool operates by deploying a series of limit orders onto the market book. As a limit order gets executed, the associated margin for that specific order becomes immobilized, transforming it into a position within the Position pools. To eventually regain the locked margin along with potential profit or loss, these positions must be closed.
To optimize the capital deployment timeline and enhance utility, the Position pools will take action. Specifically, they will initiate a close position limit order using a designated margin on the opposite side.
For instance, if the initial position was a long one, the Position pools will promptly generate a short position order.(diagram2) This strategic maneuver aims to efficiently manage the position and associated resources, thus streamlining the overall trading process.