Skip to content
← Back to documentation

Two-Phase Model: Inventory Fill / Inventory Release

The core principle of the Own Liquidity Module is the two-phase model. Every trade belongs to one of two phases: the system either buys the asset and accumulates inventory, or sells the asset from accumulated inventory.

Buy phase (Inventory Fill)

User A sells BTC → receives USDT → the system accumulates BTC.

User A  –BTC–>  System  (BTC inventory grows)
User A  <–USDT–  System  (USDT stock decreases)
In this phase the exchanger acts as the buyer: it accepts BTC from the user, fixes the rate, and pays out USDT. The purchased BTC does not go to an external market — it lands in the system’s own inventory.

Sell phase (Inventory Release)

User B buys BTC → the system releases previously accumulated BTC.

User B  –USDT–>  System  (USDT stock grows)
User B  <–BTC—  System  (BTC inventory decreases)
In this phase the exchanger acts as the seller: it accepts USDT and releases the BTC it previously bought from user A during the Inventory Fill phase.

Flow hedging

The two phases close on each other: the opposite client flow is itself the hedging mechanism. The system does not have to close every position on an external market immediately — the position is closed by subsequent user orders.

Phase 1 (Fill):     A sells BTC  ->  system buys BTC    ->  inventory_BTC ↑
Phase 2 (Release):  B buys BTC   ->  system sells BTC   ->  inventory_BTC ↓
The more symmetric the order flow in both directions, the longer the system runs without external hedging. If the flow becomes lopsided, the position grows — then the Inventory Model (deviation control against the target level) and the Pricing Engine (price adjustment that stimulates the opposite flow) step in.

Why this is a micro-OTC desk

An OTC desk earns on the spread between the asset’s buy and sell prices while managing its own position. The module reproduces the same mechanics at the scale of an exchanger’s order flow: price fixing on every trade, inventory accumulation and release, and price as a position-balancing tool.

See also