Olive Docs
Expiry Futures

Close Expiry Future

You can close any number of futures you have. The liquidity pool buys back your futures using the exact same pricing models that it used to sell you the futures.

For closing an expiry future position, you can submit a market close order before expiry. Price-triggered exits are handled through TP/SL orders, not through a separate limit-close order. You can choose to receive either currency of the pool when closing.

PnL

Expiry-future PnL uses the stored base quantity from the position:

qbase=future.base_quantity_nativeq_\text{base}=\text{future.base\_quantity\_native}

It does not reconstruct quantity from notional / spot. The entry and current future prices are:

F0=S0erT0F_0=S_0e^{rT_0} Ft=SterTtF_t=S_te^{rT_t}

PnL is:

PnL={qbase(FtF0),long future,qbase(FtF0),short future.\mathrm{PnL}= \begin{cases} q_\text{base}(F_t-F_0), & \text{long future},\\ -q_\text{base}(F_t-F_0), & \text{short future}. \end{cases}

At expiry, T_t = 0, so the current future price is the expiry oracle spot price.

Settlement

At or after expiry, the backend keeper is expected to settle expired futures automatically, but on-chain settlement happens only when the settle-expired-future instruction is submitted. Settlement computes final PnL from the oracle price and sends any positive payout to the owner token account.

On this page