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.
u8andbooltake 1 byte,u162,u64andi648. 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
u64in 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.
| Account | One per | Holds | Created by |
|---|---|---|---|
Market (MarketV3) | creator and salt | One 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 nonce | One filled quote: your claim, its amounts, its state and its current writer. | fill_v3, fill_restricted_v3, fill_put_v3 |
| Collateral vault | position | Your locked collateral (covered calls). | fill_v3, fill_restricted_v3 |
| Strike escrow | position | Your locked cash (puts), or the maker's funded strike (restricted calls). | fill_put_v3, fund_restricted_exercise_v3 |
| Maker payment vault | maker and payment mint | The maker's cash: pays premiums, strikes and buybacks. | initialize_vault |
| Put asset vault | maker and asset | The maker's asset stock for put deliveries. | init_put_asset_vault_v1 |
| Maker and its limit accounts | maker | The maker's identity, nonce floor and the caps on what it can open. | maker setup instructions |
| Flash context and its two token accounts | position | Exist only inside one flash exercise transaction. | begin_flash_exercise_v3, begin_flash_put_v3 |
| Close and sale receipts | maker and nonce | Make 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 |
| Size | 376 bytes |
| Owner | the covr program |
| Rent paid by | the creator |
| Offset | Field | Type | Meaning |
|---|---|---|---|
| 8 | version | u8 | Always 3. |
| 9 | bump | u8 | Address bump. |
| 10 | settlement_mode | u8 | 0 covered call, settled in one step. 1 restricted covered call, settled in two steps (fund, then deliver). 2 cash-secured put. |
| 11 | collateral_decimals | u8 | Decimals of the collateral mint (for puts, the asset). |
| 12 | payment_decimals | u8 | Always 6. |
| 13 | creator | key | The wallet that created the market. It alone can pause it. |
| 45 | collateral | key | Covered calls: the token you lock. Puts: the asset the maker delivers if it exercises. |
| 77 | collateral_program | key | Token program of that mint: SPL Token or Token-2022. |
| 109 | payment | key | Covered calls: always USDC. Puts: the market's payment token, a plain 6-decimal SPL Token mint. |
| 141 | payment_program | key | Always SPL Token. |
| 173 | fee_owner | key | Owner of the token account that receives the fee. Never zero. |
| 205 | genesis_hash | 32 bytes | Solana mainnet genesis hash. |
| 237 | deployment_id | 32 bytes | covr's deployment ID. |
| 269 | terms_id | 32 bytes | Names the settlement rules. See Terms IDs. |
| 301 | profile_hash | 32 bytes | Fingerprint of the collateral mint when the market was created. |
| 333 | salt | u64 | The creator's salt. Part of the address. |
| 341 | expiry | i64 | Expiry time. |
| 349 | window | u64 | Exercise window after expiry, in seconds. 60 to 3,600. |
| 357 | strike_e8 | u64 | Strike per whole collateral token, in payment-token units, times 10^8. |
| 365 | max_quantity_atoms | u64 | Largest single fill, in collateral atoms. Not a cap on the market's total. |
| 373 | fee_bps | u16 | Fee taken from the gross premium, in basis points. At most 1,000. |
| 375 | paused | bool | true: 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 kind | settlement_mode | terms_id |
|---|---|---|
| Covered call | 0 | 0xddae69a8d6ba258eb6501331627a583ee6951df68af6a50760d0a038c0a8379d, the SHA-256 of COVR:ORDINARY-ATOMIC:1 plus a zero byte |
| Restricted covered call | 1 | 0xeedfb6068a9b748d45b3341000c743a4b758460d05a852c8473e9fa0469bd7e1, 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 put | 2 | 0xd474a4f04d59f2d78a41ed2e5a392671a4f07c46c03c5457eda24d3b6842da78, 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 |
| Size | 652 bytes |
| Owner | the covr program |
| Rent paid by | you, 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.
| Offset | Field | Type | Meaning | Changed by |
|---|---|---|---|---|
| 8 | version | u8 | Always 3. | fixed |
| 9 | bump | u8 | Address bump. | fixed |
| 10 | collateral_vault_bump | u8 | Bump of the collateral vault address. | fixed |
| 11 | strike_escrow_bump | u8 | Bump of the strike escrow address. | fixed |
| 12 | state | u8 | Lifecycle state. See States. | the lifecycle instructions on Position lifecycle |
| 13 | timeout_anchor | u8 | Position kind. 0 covered call. 1 restricted covered call. 2 cash-secured put. | fixed |
| 14 | collateral_decimals | u8 | Decimals of the collateral (puts: the asset). | fixed |
| 15 | payment_decimals | u8 | Always 6. | fixed |
| 16 | maker | 32 bytes | The maker's Maker account, on the other side of your position. | fixed, also after a transfer or sale |
| 48 | maker_authority | 32 bytes | The maker's Solana authority at fill. Exercised collateral and refunds to the maker go to accounts it owns. | fixed |
| 80 | maker_eth_address | 20 bytes | The maker's quote key. Part of the address. | fixed |
| 100 | writer | 32 bytes | The 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 |
| 132 | terms_account | 32 bytes | The market's address. | fixed |
| 164 | terms_id | 32 bytes | Copied from the market. | fixed |
| 196 | profile_hash | 32 bytes | Copied from the market. | fixed |
| 228 | genesis_hash | 32 bytes | Solana mainnet genesis hash. | fixed |
| 260 | deployment_id | 32 bytes | covr's deployment ID. | fixed |
| 292 | collateral_mint | 32 bytes | Covered calls: the collateral you locked. Puts: the asset you receive if the maker exercises. | fixed |
| 324 | collateral_program | 32 bytes | SPL Token or Token-2022. | fixed |
| 356 | payment_mint | 32 bytes | Covered calls: USDC. Puts: the market's payment token. | fixed |
| 388 | payment_program | 32 bytes | SPL Token. | fixed |
| 420 | policy | 32 bytes | The maker's mint policy for this asset (MintPolicyV1 for calls, MintPolicyV2 for puts). | fixed |
| 452 | usage | 32 bytes | The maker's usage counters for this asset (MintUsageV1 or MintUsageV2). | fixed |
| 484 | collateral_vault | 32 bytes | Address of the collateral vault. Covered calls: holds your collateral. Puts: derived but never created. | fixed |
| 516 | strike_escrow | 32 bytes | Address of the strike escrow. Puts: holds your cash from fill. Restricted calls: holds the maker's strike once funded. Covered calls: unused. | fixed |
| 548 | nonce | u64 | The maker's quote nonce. Part of the address. | fixed |
| 556 | admission_generation | u64 | The generation of the maker's mint policy when the fill ran. | fixed |
| 564 | quantity_atoms | u64 | Covered calls: collateral locked. Puts: asset atoms the maker delivers at exercise. | fixed |
| 572 | gross_premium_usdc | u64 | Premium the maker paid at fill, fee included, in payment atoms. You received this minus the fee. | fixed |
| 580 | strike_usdc | u64 | Covered 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 |
| 588 | opened_at | i64 | Fill time. | fixed |
| 596 | expiry | i64 | The market's expiry. | fixed |
| 604 | exercise_window_seconds | u64 | The market's exercise window. | fixed |
| 612 | cancellation_timeout_seconds | u64 | 0 for covered calls and puts. 604,800 (7 days) for restricted calls. | fixed |
| 620 | intent_generation | u64 | Restricted only. 0, then 1 once the maker funds the strike. | fund_restricted_exercise_v3, once |
| 628 | funded_at | i64 | Restricted only. When the strike was funded. 0 before. | fund_restricted_exercise_v3, once |
| 636 | cancel_eligible_at | i64 | Restricted only. funded_at + cancellation_timeout_seconds. 0 before funding. | fund_restricted_exercise_v3, once |
| 644 | funded_strike_usdc | u64 | Restricted 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
| Code | State | Meaning | Used by |
|---|---|---|---|
| 0 | open | Filled and not settled. | all kinds |
| 1 | pending | The maker funded the strike in escrow and delivery has not completed. | restricted calls |
| 2 | exercised | The maker exercised. | all kinds |
| 3 | released | The window closed without an exercise and the locked funds went back to the writer. | all kinds |
| 4 | early closed | The writer closed the position before expiry at a price the maker signed. | covered calls, puts |
| 5 | canceled by both | Maker and writer both signed to undo a funded restricted exercise. | restricted calls |
| 6 | flash | A 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.
| Account | Seeds | Token program | Mint | Token authority | Holds |
|---|---|---|---|---|---|
| Collateral vault | "collateral", position | the collateral's | collateral | the position account | Your locked collateral (covered calls). |
| Strike escrow | "strike-escrow-v3", position | SPL Token | payment mint | the position account | Puts: your locked cash. Restricted calls: the maker's funded strike. |
| Maker payment vault | "stable", maker, payment mint | SPL Token | payment mint | the Maker account | The maker's cash. |
| Put asset vault | "put-asset-v1", maker, asset | the asset's | asset | the Maker account | The maker's asset stock for put exercises. |
| Account | Created by, rent paid by | Tokens in | Tokens out | Closed by, rent to |
|---|---|---|---|---|
| Collateral vault | fill_v3 or fill_restricted_v3, you | your collateral at fill | exactly 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 cancellation | the same exit, to the writer's collateral token account |
| Strike escrow (put) | fill_put_v3, you | exactly strike_usdc from you at fill | to the maker's vault at exercise; back to the writer at release; split at early close; to the flash input at flash exercise | the same exit, to the writer's payment token account |
| Strike escrow (restricted call) | fund_restricted_exercise_v3, the maker's signer | exactly strike_usdc from the maker's vault | all to the writer at delivery, or all back to the maker at cancellation | the same exit, to the maker's authority |
| Maker payment vault | initialize_vault, the maker | deposit; early-close payments; put strikes at exercise; flash proceeds above what the writer is owed | premiums and fees at fill; call strikes at exercise; sale prices; restricted strike funding; withdraw | never closed |
| Put asset vault | init_put_asset_vault_v1, the maker | deposit_put_asset_v1; extra asset from a flash put | asset to the writer at put exercise; withdraw_put_asset_v1 | never 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) |
| Size | 117 bytes (101 for a maker registered in the original format that has not migrated) |
| Created by | register_maker_v3 |
| Offset | Field | Type | Meaning | Changed by |
|---|---|---|---|---|
| 8 | authority | key | The maker's Solana authority. | fixed: no instruction changes it |
| 40 | eth_address | 20 bytes | The quote key. Every quote must recover to it. | fixed |
| 60 | bump | u8 | Address bump. | fixed |
| 61 | operator | key | Optional second key that may exercise. All zeros means none. | configure_maker, by the authority |
| 93 | min_nonce | u64 | The nonce floor. Quotes with a lower nonce no longer fill. | configure_maker, by the authority, upward only |
| 101 | marker | 8 bytes | ASCII 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 |
| 109 | slot | u64 | The 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.
| Offset | Field | Type | Meaning |
|---|---|---|---|
| 8 | version | u8 | Always 1. |
| 9 | bump | u8 | Address bump. |
| 10 | maker | key | The Maker account. |
| 42 | authority | key | The maker's authority at registration. |
| 74 | deployment_id | 32 bytes | covr's deployment ID. |
| 106 | payment | key | USDC. |
| 138 | payment_program | key | SPL Token. |
| 170 | payment_decimals | u8 | 6. |
| 171 | birth_slot | u64 | Registration 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.
| Offset | Field | Type | Meaning | Changed by |
|---|---|---|---|---|
| 8 | maker | key | The Maker account. | fixed |
| 40 | stable | key | The payment mint. | fixed |
| 72 | limit | u64 | Cap on spent, in payment atoms. | set_premium_budget, by the authority |
| 80 | spent | u64 | Lifetime gross premiums of every fill plus the price of every purchased position. Never goes down. | fills and purchases only |
| 88 | enabled | bool | true: a fill or purchase fails if spent would pass limit. | set_premium_budget |
| 89 | bump | u8 | Address 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.
| Offset | Field | Type | Meaning | Changed by |
|---|---|---|---|---|
| 8 | maker | key | The Maker account. | fixed |
| 40 | collateral | key | The collateral mint. | fixed |
| 72 | limit | u64 | Cap on active, in collateral atoms. | set_exposure_limit, by the authority |
| 80 | active | u64 | Collateral atoms in open positions. Up at fill, down at every exit. | fills and exits only |
| 88 | bump | u8 | Address 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.
| Offset | MintPolicyV1 field | Type | Meaning |
|---|---|---|---|
| 8 | version | u8 | Always 1. |
| 9 | bump | u8 | Address bump. |
| 10 | maker | key | The Maker account. |
| 42 | authority | key | The maker's authority. |
| 74 | collateral | key | Collateral mint. |
| 106 | collateral_program | key | Its token program. |
| 138 | collateral_decimals | u8 | Its decimals. |
| 139 | payment | key | USDC. |
| 171 | payment_program | key | SPL Token. |
| 203 | payment_decimals | u8 | 6. |
| 204 | generation | u64 | Starts at 1. Each update or pause adds 1. |
| 212 | watcher | key | Optional key that may only pause. All zeros means none. |
| 244 | enabled | bool | false: every new fill on this mint fails. |
| 245 | terms_id | 32 bytes | Must equal the market's terms_id. |
| 277 | profile_hash | 32 bytes | Must equal the market's profile_hash. |
| 309 | max_order_atoms | u64 | Largest single fill. |
| 317 | max_reserved_atoms | u64 | Cap on collateral in open positions. |
| 325 | max_reserved_strike_usdc | u64 | Cap on the strike owed on open positions. |
| 333 | lifetime_premium_limit_enabled | bool | Turns the next cap on. |
| 334 | lifetime_premium_limit_usdc | u64 | Cap on lifetime gross premium on this mint. |
| Offset | MintUsageV1 field | Type | Meaning |
|---|---|---|---|
| 8 | version | u8 | Always 1. |
| 9 | bump | u8 | Address bump. |
| 10 | maker | key | The Maker account. |
| 42 | collateral | key | Collateral mint. |
| 74 | collateral_program | key | Its token program. |
| 106 | collateral_decimals | u8 | Its decimals. |
| 107 | payment | key | USDC. |
| 139 | payment_program | key | SPL Token. |
| 171 | payment_decimals | u8 | 6. |
| 172 | policy | key | The matching MintPolicyV1. |
| 204 | bootstrapped | bool | Fills fail until this is true. Set once. |
| 205 | reserved_atoms | u64 | Collateral in open positions. |
| 213 | reserved_strike_usdc | u64 | Strike the maker owes if every open position is exercised. |
| 221 | cumulative_premium_usdc | u64 | Lifetime gross premium. Never goes down. |
| 229 | open_claims | u64 | Open positions. |
| 237 | pending_claims | u64 | Restricted positions funded and not yet delivered. |
| 245 | total_fills | u64 | Lifetime fills. |
| 253 | total_settled | u64 | Settled 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.
| Offset | MintPurchasePolicyV1 field | Type | Meaning |
|---|---|---|---|
| 8 | version | u8 | Always 1. |
| 9 | bump | u8 | Address bump. |
| 10 | maker | key | The Maker account. |
| 42 | authority | key | The maker's authority. |
| 74 | collateral | key | Collateral mint. |
| 106 | collateral_program | key | Its token program. |
| 138 | collateral_decimals | u8 | Its decimals. |
| 139 | payment | key | USDC. |
| 171 | payment_program | key | SPL Token. |
| 203 | payment_decimals | u8 | 6. |
| 204 | mint_policy | key | The maker's MintPolicyV1 for this mint. |
| 236 | generation | u64 | Starts at 1. Each update adds 1. |
| 244 | enabled | bool | false: no purchases. |
| 245 | max_order_usdc | u64 | Largest single purchase. |
| 253 | lifetime_purchase_usdc | u64 | Cap on lifetime purchase spending. |
| Offset | MintPurchaseUsageV1 field | Type | Meaning |
|---|---|---|---|
| 8 | version | u8 | Always 1. |
| 9 | bump | u8 | Address bump. |
| 10 | maker | key | The Maker account. |
| 42 | collateral | key | Collateral mint. |
| 74 | collateral_program | key | Its token program. |
| 106 | collateral_decimals | u8 | Its decimals. |
| 107 | payment | key | USDC. |
| 139 | payment_program | key | SPL Token. |
| 171 | payment_decimals | u8 | 6. |
| 172 | purchase_policy | key | The matching purchase policy. |
| 204 | bootstrapped | bool | Purchases fail until true. |
| 205 | cumulative_purchase_usdc | u64 | Lifetime purchase spending. Never goes down. |
| 213 | total_purchases | u64 | Lifetime 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.
| Offset | Field | Type | Meaning |
|---|---|---|---|
| 8 | version | u8 | Always 1. |
| 9 | bump | u8 | Address bump. |
| 10 | collateral_decimals | u8 | 9 (JitoSOL). |
| 11 | payment_decimals | u8 | 6 (USDC). |
| 12 | maker | key | The Maker account. |
| 44 | owner | key | The maker authority that last wrote the policy. Flash exercise fails if it differs from the current authority. |
| 76 | collateral_mint | key | The collateral mint. |
| 108 | collateral_program | key | SPL Token. |
| 140 | payment_mint | key | USDC. |
| 172 | payment_program | key | SPL Token. |
| 204 | terms_id | 32 bytes | The covered-call terms ID. |
| 236 | generation | u64 | Starts at 1. Each update or disable adds 1. A flash exercise names the generation it expects. |
| 244 | enabled | bool | false: no flash exercise. |
| 245 | max_collateral_atoms | u64 | Largest position that may be flash exercised. |
| 253 | max_strike_atoms | u64 | Largest strike that may be flash exercised. |
| 261 | min_surplus_atoms | u64 | Minimum payment above the strike, in USDC atoms. |
| 269 | min_price_atoms_per_collateral_token | u64 | Minimum 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.
| Offset | MintPolicyV2 field | Type | Meaning |
|---|---|---|---|
| 8 | version | u8 | Always 2. |
| 9 | bump | u8 | Address bump. |
| 10 | kind | u8 | 2 (put). |
| 11 | maker | key | The Maker account. |
| 43 | authority | key | The maker's authority. |
| 75 | collateral | key | The asset. |
| 107 | collateral_program | key | Its token program. |
| 139 | collateral_decimals | u8 | Its decimals. |
| 140 | payment | key | The payment mint. |
| 172 | payment_program | key | SPL Token. |
| 204 | payment_decimals | u8 | 6. |
| 205 | payment_profile_version | u8 | 1: a plain SPL Token mint. |
| 206 | payment_profile_hash | 32 bytes | Fingerprint of the payment mint, computed by the program when the maker last approved it. A fill fails if the mint has changed since. |
| 238 | generation | u64 | Starts at 1. Each update or pause adds 1. |
| 246 | watcher | key | Optional key that may only pause. |
| 278 | enabled | bool | false: no new puts. |
| 279 | terms_id | 32 bytes | The put terms ID. |
| 311 | profile_hash | 32 bytes | Must equal the market's profile_hash. |
| 343 | max_order_atoms | u64 | Largest single put, in asset atoms. |
| 351 | max_reserved_atoms | u64 | Cap on asset atoms owed on open puts. |
| 359 | max_reserved_strike_payment_atoms | u64 | Cap on cash locked in open puts. |
| 367 | lifetime_premium_limit_enabled | bool | Turns the next cap on. |
| 368 | lifetime_premium_limit_payment_atoms | u64 | Cap on lifetime gross premium. |
| 376 | put_backing | u8 | How 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. |
| Offset | MintUsageV2 field | Type | Meaning |
|---|---|---|---|
| 8 | version | u8 | Always 2. |
| 9 | bump | u8 | Address bump. |
| 10 | kind | u8 | 2 (put). |
| 11 | maker | key | The Maker account. |
| 43 | collateral | key | The asset. |
| 75 | collateral_program | key | Its token program. |
| 107 | collateral_decimals | u8 | Its decimals. |
| 108 | payment | key | The payment mint. |
| 140 | payment_program | key | SPL Token. |
| 172 | payment_decimals | u8 | 6. |
| 173 | policy | key | The matching MintPolicyV2. |
| 205 | bootstrapped | bool | Always true. |
| 206 | reserved_atoms | u64 | Asset atoms owed on open puts. |
| 214 | reserved_strike_payment_atoms | u64 | Cash locked in open puts. |
| 222 | cumulative_premium_payment_atoms | u64 | Lifetime gross premium. |
| 230 | open_claims | u64 | Open puts. |
| 238 | pending_claims | u64 | Always 0 for puts. |
| 246 | total_fills | u64 | Lifetime fills. |
| 254 | total_settled | u64 | Settled 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.
| Offset | MintPurchasePolicyV2 field | Type | Meaning |
|---|---|---|---|
| 8 | version | u8 | Always 2. |
| 9 | bump | u8 | Address bump. |
| 10 | kind | u8 | 2 (put). |
| 11 | maker | key | The Maker account. |
| 43 | authority | key | The maker's authority. |
| 75 | collateral | key | The asset. |
| 107 | collateral_program | key | Its token program. |
| 139 | collateral_decimals | u8 | Its decimals. |
| 140 | payment | key | The payment mint. |
| 172 | payment_program | key | SPL Token. |
| 204 | payment_decimals | u8 | 6. |
| 205 | mint_policy | key | The matching MintPolicyV2. |
| 237 | generation | u64 | Starts at 1. Each update adds 1. |
| 245 | enabled | bool | false: no purchases. |
| 246 | max_order_payment_atoms | u64 | Largest single purchase. |
| 254 | lifetime_purchase_payment_atoms | u64 | Cap on lifetime purchase spending. |
| Offset | MintPurchaseUsageV2 field | Type | Meaning |
|---|---|---|---|
| 8 | version | u8 | Always 2. |
| 9 | bump | u8 | Address bump. |
| 10 | kind | u8 | 2 (put). |
| 11 | maker | key | The Maker account. |
| 43 | collateral | key | The asset. |
| 75 | collateral_program | key | Its token program. |
| 107 | collateral_decimals | u8 | Its decimals. |
| 108 | payment | key | The payment mint. |
| 140 | payment_program | key | SPL Token. |
| 172 | payment_decimals | u8 | 6. |
| 173 | purchase_policy | key | The matching purchase policy. |
| 205 | bootstrapped | bool | Always true. |
| 206 | cumulative_purchase_payment_atoms | u64 | Lifetime purchase spending. |
| 214 | total_purchases | u64 | Lifetime 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.
| Offset | Field | Type | Meaning |
|---|---|---|---|
| 8 | version | u8 | Always 1. |
| 9 | bump | u8 | Address bump. |
| 10 | payment_decimals | u8 | 6. |
| 11 | maker | key | The Maker account. |
| 43 | payment | key | The payment mint. |
| 75 | payment_program | key | SPL Token. |
| 107 | cutover_slot | u64 | Slot the ledger was created. |
| 115 | legacy_spent | u64 | PremiumBudget.spent when the ledger was created. |
| 123 | native_call_premium | u64 | Call premiums since. |
| 131 | native_call_purchase | u64 | Call purchases since. |
| 139 | native_put_premium | u64 | Put premiums since. Added at every put fill. |
| 147 | native_put_purchase | u64 | Put 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.
| Offset | Field | Type | Meaning | Changed by |
|---|---|---|---|---|
| 8 | maker | key | The Maker account. | fixed |
| 40 | collateral | key | The asset. | fixed |
| 72 | limit | u64 | Cap on active. May be set below active: then new fills fail and exits still work. | set_put_exposure_limit_v1, by the authority |
| 80 | active | u64 | Asset atoms owed on open puts. Up at fill, down at every exit. | put fills and exits only |
| 88 | bump | u8 | Address 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:
| Offset | Field | Type | Meaning |
|---|---|---|---|
| 261 | min_surplus_asset_atoms | u64 | Minimum asset bought above the quantity owed. |
| 269 | max_price_atoms_per_collateral_token | u64 | Highest 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.
| Account | Seeds | Size | What it is |
|---|---|---|---|
| Flash context | "flash-context-v1", position | 464 bytes | Binds every account and amount the finish must match. |
| Flash input | "flash-input-v1", position | 165 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", position | 165 bytes (a token account) | Receives the swap proceeds: payment (calls) or asset (puts). |
| Offset | FlashExerciseContextV1 field (calls) | FlashPutContextV1 field (puts) | Type | Meaning |
|---|---|---|---|---|
| 8 | version | version | u8 | Always 1. |
| 9 | bump | bump | u8 | Context address bump. |
| 10 | input_bump | input_bump | u8 | Input address bump. |
| 11 | output_bump | output_bump | u8 | Output address bump. |
| 12 | begin_index | begin_index | u16 | Position of the begin instruction in the transaction. |
| 14 | finish_index | finish_index | u16 | Position of the finish instruction. It must be the last one. |
| 16 | position | position | key | The position being exercised. |
| 48 | policy | policy | key | The maker's flash policy. |
| 80 | rent_payer | rent_payer | key | The begin signer. Gets all temporary rent back. |
| 112 | delegate | delegate | key | The temporary signer allowed to spend the input. |
| 144 | writer | writer | key | The current writer at begin. |
| 176 | writer_payment | writer_payment | key | Your payment token account. |
| 208 | writer_collateral | writer_collateral | key | Your collateral or asset token account. |
| 240 | maker_collateral | put_asset_vault | key | Where the maker's collateral goes (calls), or the maker's put asset vault (puts). |
| 272 | maker_payment_vault | maker_payment_vault | key | The maker's payment vault. |
| 304 | input | input | key | The flash input account. |
| 336 | output | output | key | The flash output account. |
| 368 | position_digest | position_digest | 32 bytes | SHA-256 of the position bytes at begin. Finish fails if any byte changed. |
| 400 | policy_generation | policy_generation | u64 | Policy generation at begin. |
| 408 | quantity_atoms | quantity_atoms | u64 | The position's quantity. |
| 416 | strike_atoms | strike_atoms | u64 | The position's strike amount. |
| 424 | policy_floor_atoms | policy_floor_atoms | u64 | The minimum the policy allows the swap to return. |
| 432 | floor_atoms | floor_atoms | u64 | The minimum this attempt requires, at or above the policy floor. |
| 440 | vault_atoms_at_begin | escrow_atoms_at_begin | u64 | The collateral vault (calls) or strike escrow (puts) balance at begin. |
| 448 | input_baseline_atoms | input_baseline_atoms | u64 | Input balance right after creation. |
| 456 | output_baseline_atoms | output_baseline_atoms | u64 | Output 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.
| Account | Seeds | Size | Created by, rent paid by |
|---|---|---|---|
CloseReceipt | "close-receipt", maker, close nonce | 121 bytes | early_close_v3 or early_close_put_v3, the writer |
SaleReceipt | "sale-receipt", buying maker, sale nonce | 153 bytes | buy_position_v3 or buy_put_position_v3, the seller |
| Offset | CloseReceipt field | Type | Meaning |
|---|---|---|---|
| 8 | maker | key | The maker whose quote key signed the close price. |
| 40 | position | key | The position closed. |
| 72 | owner | key | The writer who closed it. |
| 104 | nonce | u64 | The close nonce. |
| 112 | amount | u64 | The price paid, in payment atoms. |
| 120 | bump | u8 | Address bump. |
| Offset | SaleReceipt field | Type | Meaning |
|---|---|---|---|
| 8 | buyer_maker | key | The maker that bought the position. |
| 40 | position | key | The position sold. |
| 72 | seller | key | The writer who sold it. |
| 104 | recipient | key | The new writer: the buying maker's authority. |
| 136 | nonce | u64 | The sale nonce. |
| 144 | amount | u64 | The price paid, in payment atoms. |
| 152 | bump | u8 | Address 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.
| Account | Seeds | Size |
|---|---|---|
Market | "market", creator, salt | 171 bytes |
Position | "position", quote key, nonce | 130 bytes |
| Collateral vault | "collateral", position | 165 bytes (SPL Token account) |
| Offset | Position field | Type | Meaning |
|---|---|---|---|
| 8 | market | key | The Market. |
| 40 | maker | key | The Maker. |
| 72 | writer | key | The current writer. |
| 104 | nonce | u64 | The maker's quote nonce. |
| 112 | quantity | u64 | JitoSOL atoms locked. |
| 120 | strike_payment | u64 | USDC atoms paid at exercise. |
| 128 | status | u8 | 0 open, 1 exercised, 2 released, 3 early closed. |
| 129 | bump | u8 | Address bump. |
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.
| Offset | Market field | Type | Meaning |
|---|---|---|---|
| 8 | creator | key | Market creator. It alone can pause. |
| 40 | collateral | key | Collateral mint (9 decimals). |
| 72 | stable | key | Payment mint (6 decimals). |
| 104 | fee_owner | key | Owner of the fee account. |
| 136 | expiry | i64 | Expiry time. |
| 144 | window | i64 | Exercise window in seconds, 60 to 3,600. |
| 152 | strike_e8 | u64 | Strike in USD per whole token, times 10^8. |
| 160 | max_quantity | u64 | Largest single fill. |
| 168 | fee_bps | u16 | Fee in basis points, at most 1,000. |
| 170 | paused | bool | true: 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.
| Account | Seeds |
|---|---|
| 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.FlashExerciseContextV1andFlashPutContextV1have 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
| Account | Size (bytes) | Discriminator (hex) |
|---|---|---|
MarketV3 | 376 | f78670c82d5f1b88 |
PositionV3 | 652 | c2f7ab366adb6033 |
Maker | 117 (101 unmigrated) | 1fffe83d261cbd93 |
MakerOriginV1 | 179 | 3f4f3531be414e4d |
PremiumBudget | 90 | 681596bdc5d2df64 |
Exposure | 89 | f84bcc155cfbc593 |
MintPolicyV1 | 342 | e4f567e0036bef4a |
MintUsageV1 | 261 | 5cc6e5df9cc060ed |
MintPurchasePolicyV1 | 261 | ae1aaa0c3989268e |
MintPurchaseUsageV1 | 221 | 1349d8a2760cb83a |
FlashExercisePolicyV1 | 277 | 4b99abbfa05c8012 |
FlashExerciseContextV1 | 464 | c6187712e99982c0 |
MintPolicyV2 | 377 | a15dfa85318ef176 |
MintUsageV2 | 262 | 88008abeff1a7500 |
MintPurchasePolicyV2 | 262 | 997fc53a1e4fae2a |
MintPurchaseUsageV2 | 222 | b86eef93185e9bf2 |
PaymentSpendLedgerV1 | 155 | 1777932a655e3778 |
PutExposureV1 | 89 | 39008cd2ea62cf7e |
FlashPutPolicyV1 | 277 | dbaa439982543a47 |
FlashPutContextV1 | 464 | 2ff2bebbc850d16e |
CloseReceipt | 121 | 3326fa8a2f0632ff |
SaleReceipt | 153 | 724fecd8d4755015 |
Market (original) | 171 | dbbed53700e3c69a |
Position (original) | 130 | aabc8fe47a40f7d0 |
| Vaults, escrows, flash input and output | 165 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.