Collateral and Margin
Positions on Ollo are collateralized with allowlisted collateral assets. The protocol uses an isolated margin model where each position has its own dedicated collateral, and margin is tracked per-account across two buckets: available and committed.
In the current closed beta, USDC is the only allowlisted collateral asset. The examples below therefore use USDC, but the model is not meant to imply that Ollo is permanently limited to USDC collateral.
Why Isolated Margin?
Isolated margin means a loss in one market cannot drain margin from positions in other markets. If a USD/JPY position gets liquidated, it does not affect a EUR/USD position in the same account. Each position's risk is self-contained.
This provides clear risk boundaries at the cost of some capital efficiency as a trader cannot share margin across positions the way a cross-margin system would allow.
The Two Margin Buckets
Every trading account maintains two margin balances:
Available Margin
Free collateral that is not backing any position or order. Available margin can be:
- Used to place new orders
- Withdrawn at any time
- Increased by deposits, realized profits, and received funding payments
Committed Margin
Collateral locked against open positions and active orders. Committed margin:
- Cannot be withdrawn
- Is released when orders are cancelled or positions are closed
- Can be reduced by funding payments owed, which pushes the position closer to liquidation
The total account value is availableMargin + committedMargin.
Margin Lifecycle
1. Deposit
A user deposits an allowlisted collateral asset into their trading account. In the current closed beta, that asset is USDC. The deposit is converted from the asset's external precision into 18-decimal (WAD) precision internally for consistent arithmetic. The full amount lands in available margin.
Anyone can deposit into any account. Only the account owner can withdraw.
2. Order Placement
When a trader places an order, the required collateral moves from available to committed:
availableMargin -= collateralAmount
committedMargin += collateralAmount
The position size is determined by collateralAmount × leverage. For example, in the current closed beta, 1,000 USDC at 10× leverage creates a 10,000 USDC notional position.
Closing orders are an exception. When closing a position (opposite side, zero collateral), no margin is committed. The existing position's margin already covers the close.
3. Fill
When an order is matched on the order book, the committed margin is allocated to the resulting position. If an order is partially filled across multiple matches, margin is split proportionally across each fill to prevent rounding errors.
4. Close & PnL Realization
When a position is closed, PnL is calculated and margin is redistributed:
- Profit: the position's committed margin plus the profit amount are returned to available margin.
- Partial loss: the remaining margin (after deducting the loss) is returned to available margin.
- Total loss: all committed margin for the position is consumed. Nothing returns to available.
5. Cancellation
If an order is cancelled before being fully filled, any unfilled margin returns from committed to available immediately.
6. Withdrawal
The trader can withdraw from available margin at any time. Committed margin cannot be withdrawn. It must first be released by closing positions or cancelling orders.
Position Flipping
If a closing fill exceeds the current position size, the position flips to the opposite direction. For example, if a trader has a 100-unit LONG and receives a 150-unit SHORT fill:
- The existing 100-unit LONG is fully closed, PnL is realized.
- A new 50-unit SHORT is opened with proportionally allocated margin.
- The margin for the closed portion is returned to available.
Funding Impact on Margin
Funding payments are settled before any position modification and directly affect margin balances:
When the position owes funding (e.g., a long paying in a positive-rate environment), the payment is deducted from available margin first. If available margin is insufficient, the shortfall is deducted from committed margin, specifically from the position's own margin allocation. This reduces the position's margin ratio and can push it toward liquidation. If both are exhausted, the position is insolvent.
When the position receives funding, the payment is added to available margin. This can be withdrawn or used for new orders.
Precision
All internal margin tracking uses 18 decimals (WAD precision) to maintain consistency with price and position size arithmetic. In the current closed beta, USDC uses 6 decimals externally, so deposits convert 6 to 18 on the way in, and withdrawals convert 18 to 6 on the way out.