covr.Docs

Users: contract design

Accounts

Every on-chain account a position uses: what it holds, every field, who can change it, its address seeds and its size.

On these pages, you are the writer: the wallet that sells the option and receives the premium. The maker is the market maker on the other side, which buys the option. A maker is identified by its quote key, a 20-byte Ethereum-style address that signs quotes.

Conventions

  • Offsets are byte offsets into the raw account data. Bytes 0 to 7 are the account discriminator: the first 8 bytes of sha256("account:<Name>").
  • Integers are little-endian. u8 and bool take 1 byte, u16 2, u64 and i64 8. A public key or 32-byte hash takes 32 bytes.
  • Atoms are a token's smallest unit. 1 USDC is 1,000,000 atoms. 1 JitoSOL is 1,000,000,000 atoms.
  • Times are unix seconds from the Solana cluster clock.
  • Seeds are listed in order. A text seed is its ASCII bytes. A key seed is its 32 bytes. The quote key seed is its 20 raw bytes. A nonce or salt seed is a u64 in 8 little-endian bytes. Every address is derived under the program ID in Program facts.

At a glance

Accounts created by put instructions (fill_put_v3, create_market_v3x, init_put_asset_vault_v1 and the other put instructions) exist from the program upgrade of 4 November 2026, which added cash-secured puts.

AccountOne perHoldsCreated by
Market (MarketV3)creator and saltOne market's fixed terms: asset, payment token, strike, expiry, window, fee.create_market_v3, create_restricted_market_v3, create_market_v3x
Position (PositionV3)maker and quote nonceOne filled quote: your claim, its amounts, its state and its current writer.fill_v3, fill_restricted_v3, fill_put_v3
Collateral vaultpositionYour locked collateral (covered calls).fill_v3, fill_restricted_v3
Strike escrowpositionYour locked cash (puts), or the maker's funded strike (restricted calls).fill_put_v3, fund_restricted_exercise_v3
Maker payment vaultmaker and payment mintThe maker's cash: pays premiums, strikes and buybacks.initialize_vault
Put asset vaultmaker and assetThe maker's asset stock for put deliveries.init_put_asset_vault_v1
Maker and its limit accountsmakerThe maker's identity, nonce floor and the caps on what it can open.maker setup instructions
Flash context and its two token accountspositionExist only inside one flash exercise transaction.begin_flash_exercise_v3, begin_flash_put_v3
Close and sale receiptsmaker and nonceMake each early-close and sale quote single-use.early_close_v3, early_close_put_v3, buy_position_v3, buy_put_position_v3

Market

MarketV3. One market's terms. Any wallet can create one. Every position on a market shares its strike, expiry and exercise window.

Seeds"market-v3", creator, salt
Size376 bytes
Ownerthe covr program
Rent paid bythe creator
OffsetFieldTypeMeaning
8versionu8Always 3.
9bumpu8Address bump.
10settlement_modeu80 covered call, settled in one step. 1 restricted covered call, settled in two steps (fund, then deliver). 2 cash-secured put.
11collateral_decimalsu8Decimals of the collateral mint (for puts, the asset).
12payment_decimalsu8Always 6.
13creatorkeyThe wallet that created the market. It alone can pause it.
45collateralkeyCovered calls: the token you lock. Puts: the asset the maker delivers if it exercises.
77collateral_programkeyToken program of that mint: SPL Token or Token-2022.
109paymentkeyCovered calls: always USDC. Puts: the market's payment token, a plain 6-decimal SPL Token mint.
141payment_programkeyAlways SPL Token.
173fee_ownerkeyOwner of the token account that receives the fee. Never zero.
205genesis_hash32 bytesSolana mainnet genesis hash.
237deployment_id32 bytescovr's deployment ID.
269terms_id32 bytesNames the settlement rules. See Terms IDs.
301profile_hash32 bytesFingerprint of the collateral mint when the market was created.
333saltu64The creator's salt. Part of the address.
341expiryi64Expiry time.
349windowu64Exercise window after expiry, in seconds. 60 to 3,600.
357strike_e8u64Strike per whole collateral token, in payment-token units, times 10^8.
365max_quantity_atomsu64Largest single fill, in collateral atoms. Not a cap on the market's total.
373fee_bpsu16Fee taken from the gross premium, in basis points. At most 1,000.
375pausedbooltrue: no new fills or sales. Exits still work.

Who can change it. Only paused, and only the creator, with set_market_v3_pause (covered calls), set_restricted_market_v3_pause (restricted) or set_market_v3x_pause (puts). No instruction writes any other field, and no instruction closes a market. Each maker quote is signed over every byte of the market except bump and paused, so a quote for one market can never fill on another.

Rules at creation. Expiry must be between 60 seconds and 90 days after creation. Covered-call and put markets accept only a plain mint (the 82-byte base layout, no token extensions) with no freeze authority. Restricted markets also accept a freeze authority and one bounded tokenized-stock profile. Native SOL is refused as collateral. A put market's payment mint must differ from its asset.

If the collateral mint changes after the market is created (for example, a new mint authority), the stored profile_hash no longer matches and new fills fail. The fingerprint covers the mint address, its token program, decimals, mint and freeze authorities, and any token extensions.

Terms IDs

Market kindsettlement_modeterms_id
Covered call00xddae69a8d6ba258eb6501331627a583ee6951df68af6a50760d0a038c0a8379d, the SHA-256 of COVR:ORDINARY-ATOMIC:1 plus a zero byte
Restricted covered call10xeedfb6068a9b748d45b3341000c743a4b758460d05a852c8473e9fa0469bd7e1, the SHA-256 of COVR:RESTRICTED-PENDING:1, a zero byte, the byte 1 and 604,800 as a u64. It commits to a 7-day cancellation timeout.
Cash-secured put20xd474a4f04d59f2d78a41ed2e5a392671a4f07c46c03c5457eda24d3b6842da78, the SHA-256 of COVR:ORDINARY-ATOMIC-PUT:1 plus a zero byte

Position

PositionV3. One filled quote. The same account type holds covered calls, restricted covered calls and cash-secured puts. timeout_anchor says which.

Seeds"position", quote key (20 bytes), nonce
Size652 bytes
Ownerthe covr program
Rent paid byyou, at fill. You can take it back after settlement only once the maker raises its nonce floor above the position's nonce. covr's maker does not do that yet. See Closing the position account.

"Fixed" below means the fill writes the field and no instruction changes it afterwards.

OffsetFieldTypeMeaningChanged by
8versionu8Always 3.fixed
9bumpu8Address bump.fixed
10collateral_vault_bumpu8Bump of the collateral vault address.fixed
11strike_escrow_bumpu8Bump of the strike escrow address.fixed
12stateu8Lifecycle state. See States.the lifecycle instructions on Position lifecycle
13timeout_anchoru8Position kind. 0 covered call. 1 restricted covered call. 2 cash-secured put.fixed
14collateral_decimalsu8Decimals of the collateral (puts: the asset).fixed
15payment_decimalsu8Always 6.fixed
16maker32 bytesThe maker's Maker account, on the other side of your position.fixed, also after a transfer or sale
48maker_authority32 bytesThe maker's Solana authority at fill. Exercised collateral and refunds to the maker go to accounts it owns.fixed
80maker_eth_address20 bytesThe maker's quote key. Part of the address.fixed
100writer32 bytesThe current owner of the position. It receives every payout to the writer side. Starts as the wallet that signed the fill.transfer_position_v3, buy_position_v3, transfer_position_v3x, buy_put_position_v3: signed by the current writer, open positions only, before expiry
132terms_account32 bytesThe market's address.fixed
164terms_id32 bytesCopied from the market.fixed
196profile_hash32 bytesCopied from the market.fixed
228genesis_hash32 bytesSolana mainnet genesis hash.fixed
260deployment_id32 bytescovr's deployment ID.fixed
292collateral_mint32 bytesCovered calls: the collateral you locked. Puts: the asset you receive if the maker exercises.fixed
324collateral_program32 bytesSPL Token or Token-2022.fixed
356payment_mint32 bytesCovered calls: USDC. Puts: the market's payment token.fixed
388payment_program32 bytesSPL Token.fixed
420policy32 bytesThe maker's mint policy for this asset (MintPolicyV1 for calls, MintPolicyV2 for puts).fixed
452usage32 bytesThe maker's usage counters for this asset (MintUsageV1 or MintUsageV2).fixed
484collateral_vault32 bytesAddress of the collateral vault. Covered calls: holds your collateral. Puts: derived but never created.fixed
516strike_escrow32 bytesAddress of the strike escrow. Puts: holds your cash from fill. Restricted calls: holds the maker's strike once funded. Covered calls: unused.fixed
548nonceu64The maker's quote nonce. Part of the address.fixed
556admission_generationu64The generation of the maker's mint policy when the fill ran.fixed
564quantity_atomsu64Covered calls: collateral locked. Puts: asset atoms the maker delivers at exercise.fixed
572gross_premium_usdcu64Premium the maker paid at fill, fee included, in payment atoms. You received this minus the fee.fixed
580strike_usdcu64Covered calls: the payment you receive if the maker exercises. Puts: the cash you locked, paid to the maker if it exercises. In payment atoms.fixed
588opened_ati64Fill time.fixed
596expiryi64The market's expiry.fixed
604exercise_window_secondsu64The market's exercise window.fixed
612cancellation_timeout_secondsu640 for covered calls and puts. 604,800 (7 days) for restricted calls.fixed
620intent_generationu64Restricted only. 0, then 1 once the maker funds the strike.fund_restricted_exercise_v3, once
628funded_ati64Restricted only. When the strike was funded. 0 before.fund_restricted_exercise_v3, once
636cancel_eligible_ati64Restricted only. funded_at + cancellation_timeout_seconds. 0 before funding.fund_restricted_exercise_v3, once
644funded_strike_usdcu64Restricted only. Strike moved into the escrow. Always equal to strike_usdc once set.fund_restricted_exercise_v3, once

The field names that end in _usdc are the on-chain names. On a put with another payment token, those amounts are in that token's atoms.

Every exit checks the stored record against the market, the maker and the canonical addresses again before it moves anything, so a position cannot be pointed at another market, maker or vault.

States

CodeStateMeaningUsed by
0openFilled and not settled.all kinds
1pendingThe maker funded the strike in escrow and delivery has not completed.restricted calls
2exercisedThe maker exercised.all kinds
3releasedThe window closed without an exercise and the locked funds went back to the writer.all kinds
4early closedThe writer closed the position before expiry at a price the maker signed.covered calls, puts
5canceled by bothMaker and writer both signed to undo a funded restricted exercise.restricted calls
6flashA lock used only inside one flash exercise transaction. It is never stored.covered calls, puts

Position lifecycle lists every transition and its timing rule.

Vaults and escrows

All four are standard token accounts. Their token authority is an address of the covr program, which has no private key. Only the program can sign for it, and only inside the instructions listed here.

AccountSeedsToken programMintToken authorityHolds
Collateral vault"collateral", positionthe collateral'scollateralthe position accountYour locked collateral (covered calls).
Strike escrow"strike-escrow-v3", positionSPL Tokenpayment mintthe position accountPuts: your locked cash. Restricted calls: the maker's funded strike.
Maker payment vault"stable", maker, payment mintSPL Tokenpayment mintthe Maker accountThe maker's cash.
Put asset vault"put-asset-v1", maker, assetthe asset'sassetthe Maker accountThe maker's asset stock for put exercises.
AccountCreated by, rent paid byTokens inTokens outClosed by, rent to
Collateral vaultfill_v3 or fill_restricted_v3, youyour collateral at fillexactly quantity_atoms to the maker's authority at exercise, or to the flash input at flash exercise; everything else to the writer at exercise, release, early close or cancellationthe same exit, to the writer's collateral token account
Strike escrow (put)fill_put_v3, youexactly strike_usdc from you at fillto the maker's vault at exercise; back to the writer at release; split at early close; to the flash input at flash exercisethe same exit, to the writer's payment token account
Strike escrow (restricted call)fund_restricted_exercise_v3, the maker's signerexactly strike_usdc from the maker's vaultall to the writer at delivery, or all back to the maker at cancellationthe same exit, to the maker's authority
Maker payment vaultinitialize_vault, the makerdeposit; early-close payments; put strikes at exercise; flash proceeds above what the writer is owedpremiums and fees at fill; call strikes at exercise; sale prices; restricted strike funding; withdrawnever closed
Put asset vaultinit_put_asset_vault_v1, the makerdeposit_put_asset_v1; extra asset from a flash putasset to the writer at put exercise; withdraw_put_asset_v1never closed

Two points matter for you:

  • Your funds are never pooled. Your collateral (covered calls) or cash (puts) sits in an account tied to your one position. Nothing outside that position's own instructions can move it. In a flash exercise, begin moves exactly your locked amount into a temporary account, and an outside swap route may spend it under that exact allowance before finish pays you in full.
  • The maker's side is not set aside per position. A covered-call strike is paid from the maker's shared payment vault at exercise, and a put's asset comes from its shared put asset vault. If the vault is short, the exercise fails and no tokens move. If no exercise succeeds before the window closes, a release can return your locked funds, as long as the token transfers work. Risks covers what that means.

The fee goes to a token account owned by the market's fee_owner. It is a normal token account, not a program address.

Maker accounts

These accounts belong to the maker. They bound what it can open. Exits update the running counters in them, but no exit reads a cap or a mint policy pause. So a maker that pauses or tightens its limits stops new fills, and cannot disable exercise or release. Two maker settings do reach other paths. Flash exercise reads the maker's flash policy; if that is off, the maker can still exercise the normal way. And the nonce floor in Maker cancels early-close and sale quotes signed below it, and must be above a settled position's nonce before that position's account can be closed.

Maker

The maker's identity. One per quote key.

Seeds"maker", quote key (20 bytes)
Size117 bytes (101 for a maker registered in the original format that has not migrated)
Created byregister_maker_v3
OffsetFieldTypeMeaningChanged by
8authoritykeyThe maker's Solana authority.fixed: no instruction changes it
40eth_address20 bytesThe quote key. Every quote must recover to it.fixed
60bumpu8Address bump.fixed
61operatorkeyOptional second key that may exercise. All zeros means none.configure_maker, by the authority
93min_nonceu64The nonce floor. Quotes with a lower nonce no longer fill.configure_maker, by the authority, upward only
101marker8 bytesASCII CVRFNC01. Present on 117-byte accounts. Marks a maker whose openings follow the current format.set once, by register_maker_v3 or begin_maker_migration
109slotu64The registration or migration slot.set once, with the marker

MakerOriginV1

The maker's registration record. Each fill checks either this record or, for a maker that moved from the original format, its migration record. 179 bytes. Seeds "maker-origin-v1", maker. Never changes.

OffsetFieldTypeMeaning
8versionu8Always 1.
9bumpu8Address bump.
10makerkeyThe Maker account.
42authoritykeyThe maker's authority at registration.
74deployment_id32 bytescovr's deployment ID.
106paymentkeyUSDC.
138payment_programkeySPL Token.
170payment_decimalsu86.
171birth_slotu64Registration slot.

PremiumBudget

An optional lifetime cap on the maker's spending in one payment token. 90 bytes. Seeds "premium-budget", maker, payment mint. Created with the maker payment vault.

OffsetFieldTypeMeaningChanged by
8makerkeyThe Maker account.fixed
40stablekeyThe payment mint.fixed
72limitu64Cap on spent, in payment atoms.set_premium_budget, by the authority
80spentu64Lifetime gross premiums of every fill plus the price of every purchased position. Never goes down.fills and purchases only
88enabledbooltrue: a fill or purchase fails if spent would pass limit.set_premium_budget
89bumpu8Address bump.fixed

Exposure

A cap on the collateral a maker holds in open covered calls on one mint, across all markets. 89 bytes. Seeds "exposure", maker, collateral mint.

OffsetFieldTypeMeaningChanged by
8makerkeyThe Maker account.fixed
40collateralkeyThe collateral mint.fixed
72limitu64Cap on active, in collateral atoms.set_exposure_limit, by the authority
80activeu64Collateral atoms in open positions. Up at fill, down at every exit.fills and exits only
88bumpu8Address bump.fixed

MintPolicyV1 and MintUsageV1

Per maker and collateral mint, for covered calls. The policy holds the maker's caps and the exact market terms it accepts. The usage account holds the running totals the caps are checked against. Policy: 342 bytes, seeds "mint-policy", maker, mint. Usage: 261 bytes, seeds "mint-usage", maker, mint.

OffsetMintPolicyV1 fieldTypeMeaning
8versionu8Always 1.
9bumpu8Address bump.
10makerkeyThe Maker account.
42authoritykeyThe maker's authority.
74collateralkeyCollateral mint.
106collateral_programkeyIts token program.
138collateral_decimalsu8Its decimals.
139paymentkeyUSDC.
171payment_programkeySPL Token.
203payment_decimalsu86.
204generationu64Starts at 1. Each update or pause adds 1.
212watcherkeyOptional key that may only pause. All zeros means none.
244enabledboolfalse: every new fill on this mint fails.
245terms_id32 bytesMust equal the market's terms_id.
277profile_hash32 bytesMust equal the market's profile_hash.
309max_order_atomsu64Largest single fill.
317max_reserved_atomsu64Cap on collateral in open positions.
325max_reserved_strike_usdcu64Cap on the strike owed on open positions.
333lifetime_premium_limit_enabledboolTurns the next cap on.
334lifetime_premium_limit_usdcu64Cap on lifetime gross premium on this mint.
OffsetMintUsageV1 fieldTypeMeaning
8versionu8Always 1.
9bumpu8Address bump.
10makerkeyThe Maker account.
42collateralkeyCollateral mint.
74collateral_programkeyIts token program.
106collateral_decimalsu8Its decimals.
107paymentkeyUSDC.
139payment_programkeySPL Token.
171payment_decimalsu86.
172policykeyThe matching MintPolicyV1.
204bootstrappedboolFills fail until this is true. Set once.
205reserved_atomsu64Collateral in open positions.
213reserved_strike_usdcu64Strike the maker owes if every open position is exercised.
221cumulative_premium_usdcu64Lifetime gross premium. Never goes down.
229open_claimsu64Open positions.
237pending_claimsu64Restricted positions funded and not yet delivered.
245total_fillsu64Lifetime fills.
253total_settledu64Settled positions. Always total_fills - open_claims.

MintPurchasePolicyV1 and MintPurchaseUsageV1

Per maker and collateral mint. They cap what a maker may spend buying covered-call positions from writers with buy_position_v3. Policy: 261 bytes, seeds "mint-purchase-policy", maker, mint. Usage: 221 bytes, seeds "mint-purchase-usage", maker, mint.

OffsetMintPurchasePolicyV1 fieldTypeMeaning
8versionu8Always 1.
9bumpu8Address bump.
10makerkeyThe Maker account.
42authoritykeyThe maker's authority.
74collateralkeyCollateral mint.
106collateral_programkeyIts token program.
138collateral_decimalsu8Its decimals.
139paymentkeyUSDC.
171payment_programkeySPL Token.
203payment_decimalsu86.
204mint_policykeyThe maker's MintPolicyV1 for this mint.
236generationu64Starts at 1. Each update adds 1.
244enabledboolfalse: no purchases.
245max_order_usdcu64Largest single purchase.
253lifetime_purchase_usdcu64Cap on lifetime purchase spending.
OffsetMintPurchaseUsageV1 fieldTypeMeaning
8versionu8Always 1.
9bumpu8Address bump.
10makerkeyThe Maker account.
42collateralkeyCollateral mint.
74collateral_programkeyIts token program.
106collateral_decimalsu8Its decimals.
107paymentkeyUSDC.
139payment_programkeySPL Token.
171payment_decimalsu86.
172purchase_policykeyThe matching purchase policy.
204bootstrappedboolPurchases fail until true.
205cumulative_purchase_usdcu64Lifetime purchase spending. Never goes down.
213total_purchasesu64Lifetime purchases.

FlashExercisePolicyV1

The maker's limits for flash exercise of covered calls, per maker and token pair. 277 bytes. Seeds "flash-policy-v1", maker, collateral mint, payment mint. Only the maker's current authority can write it. It is never closed, so its generation can never be reset.

OffsetFieldTypeMeaning
8versionu8Always 1.
9bumpu8Address bump.
10collateral_decimalsu89 (JitoSOL).
11payment_decimalsu86 (USDC).
12makerkeyThe Maker account.
44ownerkeyThe maker authority that last wrote the policy. Flash exercise fails if it differs from the current authority.
76collateral_mintkeyThe collateral mint.
108collateral_programkeySPL Token.
140payment_mintkeyUSDC.
172payment_programkeySPL Token.
204terms_id32 bytesThe covered-call terms ID.
236generationu64Starts at 1. Each update or disable adds 1. A flash exercise names the generation it expects.
244enabledboolfalse: no flash exercise.
245max_collateral_atomsu64Largest position that may be flash exercised.
253max_strike_atomsu64Largest strike that may be flash exercised.
261min_surplus_atomsu64Minimum payment above the strike, in USDC atoms.
269min_price_atoms_per_collateral_tokenu64Minimum sale price per whole collateral token, in USDC atoms.

Whatever the policy says, a flash exercise pays you exactly the strike, the same as a normal exercise. The policy only limits the maker.

Put accounts

Cash-secured puts use their own maker accounts. Each is keyed by the maker, the asset and the payment token, so caps in one stablecoin never mix with another.

MintPolicyV2 and MintUsageV2

The put twins of MintPolicyV1 and MintUsageV1. Policy: 377 bytes, seeds "mint-policy-v2", maker, asset, payment mint, kind byte (2). Usage: 262 bytes, seeds "mint-usage-v2", same tail. A new policy starts disabled, and only an update can enable it.

OffsetMintPolicyV2 fieldTypeMeaning
8versionu8Always 2.
9bumpu8Address bump.
10kindu82 (put).
11makerkeyThe Maker account.
43authoritykeyThe maker's authority.
75collateralkeyThe asset.
107collateral_programkeyIts token program.
139collateral_decimalsu8Its decimals.
140paymentkeyThe payment mint.
172payment_programkeySPL Token.
204payment_decimalsu86.
205payment_profile_versionu81: a plain SPL Token mint.
206payment_profile_hash32 bytesFingerprint of the payment mint, computed by the program when the maker last approved it. A fill fails if the mint has changed since.
238generationu64Starts at 1. Each update or pause adds 1.
246watcherkeyOptional key that may only pause.
278enabledboolfalse: no new puts.
279terms_id32 bytesThe put terms ID.
311profile_hash32 bytesMust equal the market's profile_hash.
343max_order_atomsu64Largest single put, in asset atoms.
351max_reserved_atomsu64Cap on asset atoms owed on open puts.
359max_reserved_strike_payment_atomsu64Cap on cash locked in open puts.
367lifetime_premium_limit_enabledboolTurns the next cap on.
368lifetime_premium_limit_payment_atomsu64Cap on lifetime gross premium.
376put_backingu8How the maker says it will deliver: 1 from its put asset vault, 2 by flash, 3 either. Checked on every policy write. No fill or exit reads it.
OffsetMintUsageV2 fieldTypeMeaning
8versionu8Always 2.
9bumpu8Address bump.
10kindu82 (put).
11makerkeyThe Maker account.
43collateralkeyThe asset.
75collateral_programkeyIts token program.
107collateral_decimalsu8Its decimals.
108paymentkeyThe payment mint.
140payment_programkeySPL Token.
172payment_decimalsu86.
173policykeyThe matching MintPolicyV2.
205bootstrappedboolAlways true.
206reserved_atomsu64Asset atoms owed on open puts.
214reserved_strike_payment_atomsu64Cash locked in open puts.
222cumulative_premium_payment_atomsu64Lifetime gross premium.
230open_claimsu64Open puts.
238pending_claimsu64Always 0 for puts.
246total_fillsu64Lifetime fills.
254total_settledu64Settled puts.

MintPurchasePolicyV2 and MintPurchaseUsageV2

The put twins of the purchase accounts. They cap what a maker spends buying put positions with buy_put_position_v3. Policy: 262 bytes, seeds "mint-purchase-policy-v2", maker, asset, payment mint, kind byte. Usage: 222 bytes, seeds "mint-purchase-usage-v2", same tail. A new purchase policy starts disabled.

OffsetMintPurchasePolicyV2 fieldTypeMeaning
8versionu8Always 2.
9bumpu8Address bump.
10kindu82 (put).
11makerkeyThe Maker account.
43authoritykeyThe maker's authority.
75collateralkeyThe asset.
107collateral_programkeyIts token program.
139collateral_decimalsu8Its decimals.
140paymentkeyThe payment mint.
172payment_programkeySPL Token.
204payment_decimalsu86.
205mint_policykeyThe matching MintPolicyV2.
237generationu64Starts at 1. Each update adds 1.
245enabledboolfalse: no purchases.
246max_order_payment_atomsu64Largest single purchase.
254lifetime_purchase_payment_atomsu64Cap on lifetime purchase spending.
OffsetMintPurchaseUsageV2 fieldTypeMeaning
8versionu8Always 2.
9bumpu8Address bump.
10kindu82 (put).
11makerkeyThe Maker account.
43collateralkeyThe asset.
75collateral_programkeyIts token program.
107collateral_decimalsu8Its decimals.
108paymentkeyThe payment mint.
140payment_programkeySPL Token.
172payment_decimalsu86.
173purchase_policykeyThe matching purchase policy.
205bootstrappedboolAlways true.
206cumulative_purchase_payment_atomsu64Lifetime purchase spending.
214total_purchasesu64Lifetime purchases.

PaymentSpendLedgerV1

Per maker and payment mint. It splits the maker's PremiumBudget.spent into what was spent before the ledger existed and what was spent since on calls and puts. For any payment token other than USDC, a put fill or purchase fails unless the parts add up exactly to spent. 155 bytes. Seeds "payment-spend-v1", maker, payment mint.

OffsetFieldTypeMeaning
8versionu8Always 1.
9bumpu8Address bump.
10payment_decimalsu86.
11makerkeyThe Maker account.
43paymentkeyThe payment mint.
75payment_programkeySPL Token.
107cutover_slotu64Slot the ledger was created.
115legacy_spentu64PremiumBudget.spent when the ledger was created.
123native_call_premiumu64Call premiums since.
131native_call_purchaseu64Call purchases since.
139native_put_premiumu64Put premiums since. Added at every put fill.
147native_put_purchaseu64Put purchases since. Added at every put purchase.

PutExposureV1

A cap on asset atoms a maker owes on open puts, per maker and asset, across payment tokens. 89 bytes. Seeds "put-exposure-v1", maker, asset.

OffsetFieldTypeMeaningChanged by
8makerkeyThe Maker account.fixed
40collateralkeyThe asset.fixed
72limitu64Cap on active. May be set below active: then new fills fail and exits still work.set_put_exposure_limit_v1, by the authority
80activeu64Asset atoms owed on open puts. Up at fill, down at every exit.put fills and exits only
88bumpu8Address bump.fixed

Put asset vault

The maker's stock of the asset, used to deliver at put exercise. A token account at seeds "put-asset-v1", maker, asset. Its token authority is the Maker account. Only the maker's authority can deposit or withdraw, never its operator. The program does not reserve any of it for a particular position.

FlashPutPolicyV1

The maker's limits for flash exercise of puts. 277 bytes. Seeds "flash-put-policy-v1", maker, asset, payment mint. Admitted pairs: JitoSOL with USDC, and JitoSOL with USDT. It starts disabled, needs the maker's put asset vault to exist, and holds the put terms ID. Otherwise it has the same layout and rules as FlashExercisePolicyV1, except the last two settings:

OffsetFieldTypeMeaning
261min_surplus_asset_atomsu64Minimum asset bought above the quantity owed.
269max_price_atoms_per_collateral_tokenu64Highest price per whole asset token the maker accepts, in payment atoms.

Whatever the policy says, a flash put exercise delivers you exactly quantity_atoms of the asset, the same as a funded put exercise.

Flash exercise accounts

A flash exercise creates three accounts in its begin instruction and closes all three in its finish instruction, in the same transaction. They never outlive it. The signer of the begin instruction pays their rent and gets it back at finish.

AccountSeedsSizeWhat it is
Flash context"flash-context-v1", position464 bytesBinds every account and amount the finish must match.
Flash input"flash-input-v1", position165 bytes (a token account)Holds exactly what the position releases for the swap: quantity_atoms of collateral (calls) or strike_usdc of cash (puts). A temporary delegate may spend up to that amount.
Flash output"flash-output-v1", position165 bytes (a token account)Receives the swap proceeds: payment (calls) or asset (puts).
OffsetFlashExerciseContextV1 field (calls)FlashPutContextV1 field (puts)TypeMeaning
8versionversionu8Always 1.
9bumpbumpu8Context address bump.
10input_bumpinput_bumpu8Input address bump.
11output_bumpoutput_bumpu8Output address bump.
12begin_indexbegin_indexu16Position of the begin instruction in the transaction.
14finish_indexfinish_indexu16Position of the finish instruction. It must be the last one.
16positionpositionkeyThe position being exercised.
48policypolicykeyThe maker's flash policy.
80rent_payerrent_payerkeyThe begin signer. Gets all temporary rent back.
112delegatedelegatekeyThe temporary signer allowed to spend the input.
144writerwriterkeyThe current writer at begin.
176writer_paymentwriter_paymentkeyYour payment token account.
208writer_collateralwriter_collateralkeyYour collateral or asset token account.
240maker_collateralput_asset_vaultkeyWhere the maker's collateral goes (calls), or the maker's put asset vault (puts).
272maker_payment_vaultmaker_payment_vaultkeyThe maker's payment vault.
304inputinputkeyThe flash input account.
336outputoutputkeyThe flash output account.
368position_digestposition_digest32 bytesSHA-256 of the position bytes at begin. Finish fails if any byte changed.
400policy_generationpolicy_generationu64Policy generation at begin.
408quantity_atomsquantity_atomsu64The position's quantity.
416strike_atomsstrike_atomsu64The position's strike amount.
424policy_floor_atomspolicy_floor_atomsu64The minimum the policy allows the swap to return.
432floor_atomsfloor_atomsu64The minimum this attempt requires, at or above the policy floor.
440vault_atoms_at_beginescrow_atoms_at_beginu64The collateral vault (calls) or strike escrow (puts) balance at begin.
448input_baseline_atomsinput_baseline_atomsu64Input balance right after creation.
456output_baseline_atomsoutput_baseline_atomsu64Output balance right after creation.

Receipts

Receipts are permanent. No instruction closes them, so the same signed early-close or sale quote can never run twice.

AccountSeedsSizeCreated by, rent paid by
CloseReceipt"close-receipt", maker, close nonce121 bytesearly_close_v3 or early_close_put_v3, the writer
SaleReceipt"sale-receipt", buying maker, sale nonce153 bytesbuy_position_v3 or buy_put_position_v3, the seller
OffsetCloseReceipt fieldTypeMeaning
8makerkeyThe maker whose quote key signed the close price.
40positionkeyThe position closed.
72ownerkeyThe writer who closed it.
104nonceu64The close nonce.
112amountu64The price paid, in payment atoms.
120bumpu8Address bump.
OffsetSaleReceipt fieldTypeMeaning
8buyer_makerkeyThe maker that bought the position.
40positionkeyThe position sold.
72sellerkeyThe writer who sold it.
104recipientkeyThe new writer: the buying maker's authority.
136nonceu64The sale nonce.
144amountu64The price paid, in payment atoms.
152bumpu8Address bump.

Original-format accounts

Positions opened before October 2026 use a smaller original format. The program still contains it, but covr's app no longer opens positions in it. Positions in this format settle with their own instructions: exercise, release, early_close, transfer_position, buy_position and close_settled_position.

AccountSeedsSize
Market"market", creator, salt171 bytes
Position"position", quote key, nonce130 bytes
Collateral vault"collateral", position165 bytes (SPL Token account)
OffsetPosition fieldTypeMeaning
8marketkeyThe Market.
40makerkeyThe Maker.
72writerkeyThe current writer.
104nonceu64The maker's quote nonce.
112quantityu64JitoSOL atoms locked.
120strike_paymentu64USDC atoms paid at exercise.
128statusu80 open, 1 exercised, 2 released, 3 early closed.
129bumpu8Address bump.
Warning

The status codes differ between the two formats. In a Position, 1 means exercised. In a PositionV3, 1 means pending and 2 means exercised. Read the account size first: 130 bytes is the original format, 652 bytes the current one.

OffsetMarket fieldTypeMeaning
8creatorkeyMarket creator. It alone can pause.
40collateralkeyCollateral mint (9 decimals).
72stablekeyPayment mint (6 decimals).
104fee_ownerkeyOwner of the fee account.
136expiryi64Expiry time.
144windowi64Exercise window in seconds, 60 to 3,600.
152strike_e8u64Strike in USD per whole token, times 10^8.
160max_quantityu64Largest single fill.
168fee_bpsu16Fee in basis points, at most 1,000.
170pausedbooltrue: no new fills.

Address derivation

Every program account and vault above lives at a program-derived address: a hash of its seeds, the bump and the program ID. You can recompute any of them from public data and check that an account is the one the program expects.

AccountSeeds
Maker"maker", quote key (20 bytes)
MakerOriginV1"maker-origin-v1", maker
Maker payment vault"stable", maker, payment mint
PremiumBudget"premium-budget", maker, payment mint
Exposure"exposure", maker, collateral mint
MintPolicyV1"mint-policy", maker, collateral mint
MintUsageV1"mint-usage", maker, collateral mint
MintPurchasePolicyV1"mint-purchase-policy", maker, collateral mint
MintPurchaseUsageV1"mint-purchase-usage", maker, collateral mint
FlashExercisePolicyV1"flash-policy-v1", maker, collateral mint, payment mint
MarketV3"market-v3", creator, salt (u64)
PositionV3"position", quote key (20 bytes), nonce (u64)
Collateral vault"collateral", position
Strike escrow"strike-escrow-v3", position
Flash context"flash-context-v1", position
Flash input"flash-input-v1", position
Flash output"flash-output-v1", position
CloseReceipt"close-receipt", maker, close nonce (u64)
SaleReceipt"sale-receipt", buying maker, sale nonce (u64)
MintPolicyV2"mint-policy-v2", maker, asset, payment mint, kind (1 byte)
MintUsageV2"mint-usage-v2", maker, asset, payment mint, kind
MintPurchasePolicyV2"mint-purchase-policy-v2", maker, asset, payment mint, kind
MintPurchaseUsageV2"mint-purchase-usage-v2", maker, asset, payment mint, kind
PaymentSpendLedgerV1"payment-spend-v1", maker, payment mint
PutExposureV1"put-exposure-v1", maker, asset
Put asset vault"put-asset-v1", maker, asset
FlashPutPolicyV1"flash-put-policy-v1", maker, asset, payment mint
Market (original)"market", creator, salt (u64)
Position (original)"position", quote key (20 bytes), nonce (u64)
Event authority"__event_authority" (signs the flash exercise receipt event; holds no data)

Two sets of accounts share address layouts on purpose:

  • Positions. The original and current position formats share the "position" seeds. A maker's quote nonce therefore opens at most one position of any kind, on any market.
  • Flash exercise accounts. A covered-call flash exercise and a put flash exercise use the same "flash-context-v1", "flash-input-v1" and "flash-output-v1" seeds with the position's address. FlashExerciseContextV1 and FlashPutContextV1 have different discriminators, and a position is either a call or a put. So a position only ever uses one of them, and only inside one transaction.

The remaining reviewed layouts are distinct. Each starts with its own ASCII label. Two layouts could only produce the same seed bytes if they had the same total length and one label were a prefix of the other. The program's seed layouts, 39 including the maker-migration records not listed here, were checked against this rule. Apart from the shared layouts above, none collide.

Sizes and discriminators

AccountSize (bytes)Discriminator (hex)
MarketV3376f78670c82d5f1b88
PositionV3652c2f7ab366adb6033
Maker117 (101 unmigrated)1fffe83d261cbd93
MakerOriginV11793f4f3531be414e4d
PremiumBudget90681596bdc5d2df64
Exposure89f84bcc155cfbc593
MintPolicyV1342e4f567e0036bef4a
MintUsageV12615cc6e5df9cc060ed
MintPurchasePolicyV1261ae1aaa0c3989268e
MintPurchaseUsageV12211349d8a2760cb83a
FlashExercisePolicyV12774b99abbfa05c8012
FlashExerciseContextV1464c6187712e99982c0
MintPolicyV2377a15dfa85318ef176
MintUsageV226288008abeff1a7500
MintPurchasePolicyV2262997fc53a1e4fae2a
MintPurchaseUsageV2222b86eef93185e9bf2
PaymentSpendLedgerV11551777932a655e3778
PutExposureV18939008cd2ea62cf7e
FlashPutPolicyV1277dbaa439982543a47
FlashPutContextV14642ff2bebbc850d16e
CloseReceipt1213326fa8a2f0632ff
SaleReceipt153724fecd8d4755015
Market (original)171dbbed53700e3c69a
Position (original)130aabc8fe47a40f7d0
Vaults, escrows, flash input and output165 for an SPL Token account. A Token-2022 vault takes the size its mint requires.none: owned by a token program

Read accounts at finalized commitment, and check that each one is owned by the covr program (or, for a vault, by a token program) before you trust its bytes.