Skip to content

Write-Off Flow

Trigger: A prediction market resolves YES (or is certain to), rendering the vault's NO shares worthless. Caller: Governance (operator)

writeOff() is callable from ACTIVE or SETTLING. The two cases have different operational contexts and different NAV impacts.


Case 1: Write-Off From ACTIVE

Context: The market has not yet formally resolved on-chain, but the YES outcome is certain (or already determined). The operator has not called markSettling().

Steps

  1. Market is trending YES or certain to resolve YES. NO shares will settle at zero.

  2. Operator calls vault.writeOff(slotIndex).

  3. Vault sets:

    positions[slotIndex].entryPrice = 0
    positions[slotIndex].status     = WRITTEN_OFF
    

  4. PositionWrittenOff(slotIndex, previousModeledValue) emitted.

  5. That slot immediately contributes 0 to both aggregateModeledNav() and aggregateMarketNav().

  6. Full NAV drop. The slot was carrying linear accrual value. The entire accrual gap drops instantly.

  7. Other positions continue accruing normally.

  8. Automatic pause check: If the aggregate gap now exceeds 1500 bps, the system pauses automatically.

Accounting Impact (from ACTIVE)

Before writeOff(2) — slot was ACTIVE:
  positionModeledValue(2) = $415,000   (linear accrual)
  positionMarketValue(2)  = $10,000    (near-zero, YES likely)
  gap contribution of Slot 2 = $405,000

After writeOff(2):
  positionModeledValue(2) = $0
  positionMarketValue(2)  = $0
  aggModeledNAV drops by $415,000
  aggMarketNAV  drops by $10,000
  Gap drops by $405,000 (no more phantom accrual)

Case 2: Write-Off From SETTLING

Context: markSettling() was already called (the slot is SETTLING). The market then resolves YES — adapter.claimSettlement() would return zero.

Steps

  1. Slot is SETTLING. markSettling() was called; market resolved YES.

  2. Operator calls vault.writeOff(slotIndex).

  3. Same vault behavior: entryPrice = 0, status = WRITTEN_OFF.

  4. PositionWrittenOff(slotIndex, previousModeledValue) emitted.

  5. Slot contributes 0 to both NAVs.

Accounting Impact (from SETTLING)

Before writeOff(2) — slot was SETTLING:
  positionModeledValue(2) = adapter.positionValue() = $8,000   (near zero, market priced YES)
  positionMarketValue(2)  = adapter.positionValue() = $8,000
  gap contribution of Slot 2 = $0   (gap was already zero — SETTLING collapses gap)

After writeOff(2):
  positionModeledValue(2) = $0
  positionMarketValue(2)  = $0
  aggModeledNAV drops by ~$8,000
  aggMarketNAV  drops by ~$8,000
  Additional drop is small — the slot was already using market value

Why the SETTLING drop is smaller

When markSettling() was called, the gap on this slot collapsed to zero. The modeled value was already tracking market value (near zero for a YES-resolving market). The incremental impact of writeOff() from SETTLING is therefore much smaller than from ACTIVE.


After Write-Off (Both Cases)

  1. Wait for final settlement — once the underlying market actually resolves on-chain, the operator calls reclaimSlot(slotIndex) to reset the slot to EMPTY for reuse.

Cascading pause risk

A write-off from ACTIVE may cause aggregateGapBps > 1500, pausing the system. Plan for this scenario — particularly if the written-off position was large relative to total TVL.


No Cooldown

Unlike rebasePosition(), write-offs have no cooldown. They can be executed at any time, which is important because adverse resolutions are often time-sensitive and require immediate NAV correction.


When to Write Off vs. Rebase

Scenario Action
Market clearly resolving YES — certain loss writeOff()
Market probability shifted adversely but outcome uncertain rebasePosition() to lower entry price
Market near the $0.80 threshold — increased risk rebasePosition() to reset accrual from a conservative base
Position worth zero per market — no recovery possible writeOff()
Slot is SETTLING and resolution was YES writeOff() from SETTLING