> For the complete documentation index, see [llms.txt](https://docs.dimes.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dimes.fi/positions/position-lifecycle.md).

# Position Lifecycle

<mark style="color:$info;">This section describes how a leveraged prediction market position moves from creation to settlement. All user actions occur through the originating front-end. Dimes executes and maintains the underlying hedge through Multiply.</mark>

{% stepper %}
{% step %}
**Opening a Position**

<mark style="color:$info;">The user selects:</mark>

* <mark style="color:$info;">a supported prediction market</mark>
* <mark style="color:$info;">a direction (YES or NO)</mark>
* <mark style="color:$info;">a leverage level</mark>
  {% endstep %}

{% step %}
**The terminal requests a quote from Multiply, passing information such as:**

* <mark style="color:$info;">market and trader</mark>
* <mark style="color:$info;">direction</mark>
* <mark style="color:$info;">requested leverage</mark>
* <mark style="color:$info;">notional demand and collateral value</mark>
  {% endstep %}

{% step %}
**Multiply evaluates:**

* <mark style="color:$info;">current venue price and market microstructure</mark>
* <mark style="color:$info;">hedgeability of requested size within slippage bounds</mark>
* <mark style="color:$info;">required collateral and margin</mark>
* <mark style="color:$info;">per-market, per-side, and per-user cap headroom</mark>
  {% endstep %}

{% step %}
**Multiply returns a firm executable quote that includes:**

* <mark style="color:$info;">entry price and execution cost</mark>
* <mark style="color:$info;">required collateral</mark>
* <mark style="color:$info;">maximum allowed size (if clipped by caps or depth)</mark>
* <mark style="color:$info;">implied liquidation price</mark>
* <mark style="color:$info;">an expiry timestamp — the offer is only valid for a limited window. The</mark> <mark style="color:$info;">`expires_at`</mark> <mark style="color:$info;">field in the API response indicates the deadline. If the user does not execute before this time, the offer becomes invalid and a new quote must be requested.</mark>
  {% endstep %}

{% step %}
**Hedge-first execution**

<mark style="color:$info;">If the user accepts, the front-end submits an execute call. Multiply executes the hedge on the external venue first.</mark>

* <mark style="color:$info;">Only if the hedge fills within slippage bounds is the position created, user collateral is locked, and the leveraged exposure is established.</mark>
* <mark style="color:$info;">If the hedge fails or slippage exceeds bounds, the order is rejected and no position is created.</mark>

<mark style="color:$info;">After the hedge fills, the position payload exposes both the indicative entry price quoted on the offer (</mark>`entry.price_*`<mark style="color:$info;">) and the actual fill price reported by the venue (</mark> `entry.effective_entry_price_*`<mark style="color:$info;">). The difference is reported as</mark> `entry.effective_slippage_bps` <mark style="color:$info;">— signed basis points, positive when the fill came in worse than the quote and negative when better. These three fields are</mark> `null` <mark style="color:$info;">until the onchain fill is recorded.</mark>
{% endstep %}

{% step %}
**Active monitoring**

<mark style="color:$info;">The position becomes active and appears in the front-end's portfolio view. Once active:</mark>

* <mark style="color:$info;">Multiply monitors margin, venue health, and eligibility continuously</mark>
* <mark style="color:$info;">Limits and maximum leverage evolve dynamically based on market conditions</mark>
* <mark style="color:$info;">The market may enter close-only if any eligibility threshold is breached</mark>
  {% endstep %}

{% step %}
[**Leverage decay (J-factor)**](/leverage-and-risk/leverage-decay-j-factor.md)

* <mark style="color:$info;">J-factor is Multiply's dynamic risk engine. It continuously monitors depth profile, odds dynamics, open interest microstructure, and resolution conditions, defining when leverage should be reduced.</mark>
* <mark style="color:$info;">Leverage reduction is triggered only when microstructure conditions warrant it. On the winning side, this means leverage often remains intact through resolution. On the losing side, deteriorating microstructure typically triggers deleverage earlier, protecting both the user and the facility.</mark>
* <mark style="color:$info;">Each unwind in a position's history (via</mark> <mark style="color:orange;">`expand=unwinds`</mark><mark style="color:$info;">) carries a</mark> <mark style="color:orange;">`reason`</mark> <mark style="color:$info;">— the specific microstructure signal that drove that deleverage, such as</mark> <mark style="color:orange;">`spread_blowout`</mark><mark style="color:$info;">,</mark> <mark style="color:orange;">`depth_decay`</mark><mark style="color:$info;">, or</mark> <mark style="color:orange;">`price_drop_severe`</mark><mark style="color:$info;">. It is</mark> <mark style="color:orange;">`null`</mark> <mark style="color:$info;">for unwinds not driven by the risk engine (e.g. manual admin deleveraging). See the API reference for the full list of reasons.</mark>
  {% endstep %}

{% step %}
**Liquidation** **(if triggered)**

* <mark style="color:$info;">Multiply is designed to keep your position alive. The J-factor risk engine works continuously to ease your leverage down as a position deteriorates, giving your collateral room to recover before hard limits are reached. As such, forced liquidations are rare. But the system can't guard against every market move. If your remaining collateral falls to maintenance margin at any point during the position lifecycle, Multiply liquidates to protect what's left: the hedge is unwound on the originating venue and all execution costs are deducted from your collateral.</mark>
  {% endstep %}

{% step %}
**Voided markets**

* <mark style="color:$info;">Occasionally a market is voided — cancelled, forfeited, or closed with no winner (e.g. rescheduled sporting events). When this happens, both YES and NO tokens pay out at $0.50 each via the Conditional Token Framework. The position's mark price updates to $0.50 immediately. The</mark> <mark style="color:orange;">`timing.is_voided`</mark> <mark style="color:$info;">field on the position becomes</mark> <mark style="color:orange;">`true`</mark><mark style="color:$info;">, and</mark> <mark style="color:orange;">`timing.is_settlement_pending`</mark> <mark style="color:$info;">indicates that settlement is incoming. PnL is calculated against the trading venue refund.</mark>
  {% endstep %}
  {% endstepper %}

## Entry vs exit notional

<mark style="color:$info;">A closed position reports two notional figures so you can show the round trip.</mark> <mark style="color:orange;">`entry.notional_usd`</mark> <mark style="color:$info;">is the levered exposure the position opened with (entry shares × entry price).</mark> <mark style="color:orange;">`result.exit_notional_usd`</mark> <mark style="color:$info;">is the volume-weighted notional realized as the position wound down — the sum of shares sold × fill price across every force-unwind plus the final close. Because positions are partially deleveraged over their lifetime at different prices, this is not a single exit price; it is the aggregate of all exit fills. It is distinct from</mark> <mark style="color:orange;">`result.proceeds_usd`</mark><mark style="color:$info;">, which is the de-levered cash equity returned to the wallet after repaying the loan and fees. Exit notional is</mark> <mark style="color:orange;">`null`</mark> <mark style="color:$info;">for</mark> <mark style="color:orange;">`reverted`</mark> <mark style="color:$info;">and</mark> <mark style="color:orange;">`cancelled`</mark> <mark style="color:$info;">positions, where no shares were ever sold.</mark>

## On-chain transaction visibility

<mark style="color:$info;">Every on-chain step above — opening, finalizing, closing, liquidating, settling, force-unwinding, and redeeming — is recorded as a transaction the position owner can inspect. The</mark> [<mark style="color:$info;">position transactions endpoint</mark>](/for-developers/api-and-events/api-reference.md#position-transactions-sub-resource) <mark style="color:$info;">returns these transactions grouped by operation type, including the on-chain hashes of the nested exchange (CLOB/DEX) fills that hedge the position. Only transactions that landed and finalized on-chain are returned — pending, failed, and reverted attempts are excluded — so the result reflects the transfers that actually moved funds.</mark>

## Reverted opens

<mark style="color:$info;">If an open fails after the on-chain position is created — most often because the hedging exchange order could not be filled — the protocol reverts the open and returns the collateral and origination fee in full. No position is held. The closed-position response carries</mark> <mark style="color:orange;">`close_reason: "reverted"`</mark> <mark style="color:$info;">and a</mark> <mark style="color:orange;">`revert_reason`</mark> <mark style="color:$info;">enum explaining why:</mark>

* <mark style="color:orange;">`exchange_unavailable`</mark> <mark style="color:$info;">— the prediction-market venue was temporarily unavailable (e.g. its matching engine was restarting). This is transient; submitting the same offer again shortly after will usually succeed.</mark>
* <mark style="color:orange;">`slippage_exceeded`</mark> <mark style="color:$info;">— the price moved beyond the offer's slippage tolerance before the order could fill. Re-quote and retry.</mark>
* <mark style="color:orange;">`unknown`</mark> <mark style="color:$info;">— the revert could not be attributed to a specific cause.</mark>

<mark style="color:$info;">`revert_reason`</mark> <mark style="color:$info;"></mark><mark style="color:$info;">is null for any non-reverted close.</mark>

## Deferred closes

<mark style="color:$info;">If you request a close but the market resolves before the remaining shares can be sold on the order book, the close cannot complete as a normal sale. Rather than fail the request, the protocol defers it: the remaining tokens are redeemed when the market settles instead of being sold. While this is pending, the position stays</mark> <mark style="color:orange;">`open`</mark> <mark style="color:$info;">and carries a</mark> <mark style="color:orange;">`close_attempt`</mark> <mark style="color:$info;">object describing the deferral:</mark>

* <mark style="color:orange;">`outcome: "deferred"`</mark> <mark style="color:$info;">— the close was postponed rather than completed.</mark>
* <mark style="color:orange;">`reason: "awaiting_settlement"`</mark> <mark style="color:$info;">— the market resolved before the position could be sold, so the remaining tokens will be redeemed at settlement.</mark>
* <mark style="color:orange;">`deferred_at`</mark> <mark style="color:$info;">— ISO-8601 timestamp of when the close was requested.</mark>

<mark style="color:$info;">`close_attempt`</mark> <mark style="color:$info;"></mark><mark style="color:$info;">is</mark> <mark style="color:orange;">`null`</mark> <mark style="color:$info;">for any open position without a deferred close. When the market settles, the position transitions to a closed/settled state in the usual way and the redeemed proceeds are reported under</mark> <mark style="color:orange;">`result`</mark><mark style="color:$info;">.</mark>
