Profit is only recognized when it is cash-backed and irreversible (during the terminal cash flow from a settled expiry back to the pool). Marked profit in NAV is considered 'unmaterialized' and is excluded from protocol share calculations until materialization.
Profit Calculation and Distribution
The ledger tracks profit against a watermark. Profit is defined as new cash received above this watermark. It is first used to fill net_losses_to_fill (aggregate prior losses across all expiries). Any remaining profit is materialized and split:
protocol_profit: floor(profit × protocol_reserve_profit_share) (where protocol_reserve_profit_share is a 1e9-scaled fraction).lp_profit: profit − protocol_profit (added to idle USDC, increasing NAV).
Note on Protocol Cuts: If the protocol cut exceeds available idle USDC at the instant of settlement, the remainder is carried in pending_protocol_profit and drained during a later sweep. This prevents the settlement/flush process from aborting due to insufficient idle cash.
protocol_profit = floor(profit × protocol_reserve_profit_share)
// Remaining profit goes to LPs
// lp_profit = profit − protocol_profit