Every account is a program-derived address. The seeds listed with each account are the ones the SDK's SEEDS constants and derive…Address helpers use; nested structs expand in place.
A public credit position: collateral on both sides, fixed debt shares per side, stored liquidation factors, referral bindings and fields left from the retired liquidation auction.
- PDA seeds
- "borrow_position_v2", market, position id
- SDK helper
- deriveBorrowPositionAddress
- Discriminator
- f38c148b20f37237
| Field | Type | Notes |
|---|
| owner | pubkey | |
| market | pubkey | |
| position_id | pubkey | |
| base_collateral | u64 | |
| quote_collateral | u64 | |
| global_health_base_contribution_for_quote_debt | u64 | |
| global_health_quote_contribution_for_base_debt | u64 | |
| base_liquidation_cf_bps | u16 | |
| quote_liquidation_cf_bps | u16 | |
| base_referral_partner | pubkey | |
| quote_referral_partner | pubkey | |
| base_referral_interest_share_bps | u16 | |
| quote_referral_interest_share_bps | u16 | |
| fixed_base_shares | u128 | |
| fixed_quote_shares | u128 | |
| fixed_base_principal | u64 | Original base borrowed by this position that has not been repaid or written off. |
| fixed_quote_principal | u64 | Original quote borrowed by this position that has not been repaid or written off. |
| active_liquidation_session | pubkey | |
| auction_debt_asset | u8 | |
| auction_start_time | i64 | |
| auction_start_price_nad | u64 | |
| auction_floor_price_nad | u64 | |
| bump | u8 | |
The protocol-level authority: revenue shares, recipients, referral share cap, auction configuration and the global reduce-only flag.
- PDA seeds
- "futarchy_authority"
- SDK helper
- deriveFutarchyAuthorityAddress
- Discriminator
- aff7a0b68c80d3e2
| Field | Type | Notes |
|---|
| version | u8 | |
| authority | pubkey | |
| recipients | RevenueRecipients | |
| revenue_share | RevenueShare | |
| max_referral_interest_share_bps | u16 | |
| revenue_distribution | RevenueDistribution | |
| protocol_auction_split | ProtocolAuctionSplit | |
| fee_auction | ProtocolAuctionConfig | |
| buyback_auction | ProtocolAuctionConfig | |
| global_reduce_only | bool | |
| bump | u8 | |
RevenueRecipients
| Field | Type | Notes |
|---|
| futarchy_treasury | pubkey | |
| buybacks_vault | pubkey | |
| team_treasury | pubkey | |
RevenueShare
| Field | Type | Notes |
|---|
| swap_bps | u16 | |
| interest_bps | u16 | Global markup added to base borrowing interest. Each market closes elapsed interest at its previous value before binding a changed markup. |
RevenueDistribution
| Field | Type | Notes |
|---|
| futarchy_treasury_bps | u16 | |
| buybacks_vault_bps | u16 | |
| team_treasury_bps | u16 | |
ProtocolAuctionSplit
| Field | Type | Notes |
|---|
| fee_auction_bps | u16 | |
| buyback_auction_bps | u16 | |
ProtocolAuctionConfig
| Field | Type | Notes |
|---|
| accepted_mint | pubkey | |
| recipients | ProtocolAuctionRecipients | |
| params | ProtocolAuctionParams | |
ProtocolAuctionRecipients
| Field | Type | Notes |
|---|
| treasury | pubkey | |
| staking_vault | pubkey | |
| treasury_bps | u16 | |
| staking_vault_bps | u16 | |
ProtocolAuctionParams
| Field | Type | Notes |
|---|
| start_multiplier_bps | u16 | |
| floor_multiplier_bps | u16 | |
| duration_slots | u64 | |
| max_reference_age_slots | u64 | |
A retired hLP receipt cohort whose remaining tokens retain funded yield rights but no new principal backing.
- PDA seeds
- "hlp_cohort", market, retired hLP mint
- Discriminator
- e059c75a7e652bd7
| Field | Type | Notes |
|---|
| market | pubkey | |
| mint | pubkey | |
| target_asset | u8 | |
| retired | bool | |
| final_vault | HlpVault | |
| bump | u8 | |
HlpVault
| Field | Type | Notes |
|---|
| flash_collateral_debit | u64 | Collateral committed to one atomic flash recovery. Receipt supply is fixed until settlement; retail operations on other positions may run. |
| srlp_vault | pubkey | |
| srlp_shares | u64 | |
| base_hlp_live_reserve | u64 | hLP-owned live reserve depth that is not backed by reserve cash or normal cash-backed debt. This is the explicit synthetic live component in `r_virtual = r_cash + r_cash_backed_debt + r_hlp_live`. |
| quote_hlp_live_reserve | u64 | |
| debt_shares | u128 | Funding debt used by the hLP vault. It accrues interest and counts toward utilization, but is not same-side cash-backed reserve debt. |
| debt_principal | u64 | Raw borrowed token atoms; products and indexed shares stay `u128`. |
| hlp_supply | u64 | |
| residual_exposure | i128 | |
| base_swap_fee_growth_index_q64 | u128 | |
| base_interest_growth_index_q64 | u128 | |
| quote_swap_fee_growth_index_q64 | u128 | |
| quote_interest_growth_index_q64 | u128 | |
| base_swap_fee_checkpoint_q64 | u128 | |
| base_interest_checkpoint_q64 | u128 | |
| quote_swap_fee_checkpoint_q64 | u128 | |
| quote_interest_checkpoint_q64 | u128 | |
| base_swap_fee_remainder_q64 | u64 | Aggregate sub-atom srLP entitlement carried across hLP checkpoints. These are distinct from each holder YieldAccount remainder: this layer converts vault-owned srLP growth into hLP growth without double-flooring. |
| base_interest_remainder_q64 | u64 | |
| quote_swap_fee_remainder_q64 | u64 | |
| quote_interest_remainder_q64 | u64 | |
| base_swap_fee_growth_remainder_scaled | u64 | Sub-index distribution carry for the second, srLP-to-hLP allocation layer. Whole-token backing represented here has already left the corresponding `unallocated_*` bucket. |
| base_interest_growth_remainder_scaled | u64 | |
| quote_swap_fee_growth_remainder_scaled | u64 | |
| quote_interest_growth_remainder_scaled | u64 | |
| unallocated_base_swap_fee_amount | u64 | |
| unallocated_base_interest_amount | u64 | |
| unallocated_quote_swap_fee_amount | u64 | |
| unallocated_quote_interest_amount | u64 | |
| last_nav_nad | u128 | |
| cached_settlement_price_nad | u128 | Base quoted in quote NAD units for either target asset; zero means unset. |
| funding_apr_ema_nad | u128 | Smoothed APR of the opposite asset borrowed by this target-asset hLP. The fixed twelve-hour half-life gives Stop Rate orders stable semantics. |
| funding_apr_ema_last_slot | u64 | |
A transaction-scoped hLP flash-recovery obligation, including released target collateral and fixed borrowed-token payment.
- Discriminator
- d4d8a18af174a67e
| Field | Type | Notes |
|---|
| market | pubkey | |
| buyer | pubkey | |
| quote | HlpFlashQuote | |
| max_socialized_loss | u64 | |
| payment_balance_before | u64 | |
| hlp_supply | u64 | |
| begin_index | u16 | |
| settle_index | u16 | |
| slot | u64 | |
| bump | u8 | |
HlpFlashQuote
| Field | Type | Notes |
|---|
| target_asset | u8 | |
| collateral_debit | u64 | |
| collateral_credit | u64 | |
| borrowed_claim | u64 | Borrowed-token srLP claim frozen when the quote is created. A full terminal session uses this value even if an interleaved Dusk swap moves the live pro-rata srLP reserve ratio before settlement. |
| payment | u64 | Spendable atoms required in the session's payment vault; includes the transfer fee from that vault to the market reserve. |
| reserve_credit | u64 | |
| discount_bps | u16 | |
| full | bool | |
An immutable closing snapshot for one unpaid-income book, used to preserve holder claims across accounting epochs.
- PDA seeds
- "income_epoch", market, book index, epoch
- SDK helper
- deriveIncomeEpochAddress
- Discriminator
- b4f8545763103ef6
| Field | Type | Notes |
|---|
| market | pubkey | |
| book_index | u8 | |
| book | IncomeReceivableBook | |
| bump | u8 | |
IncomeReceivableBook
| Field | Type | Notes |
|---|
| epoch | u64 | |
| unpaid | u64 | |
| units | u64 | |
| paid_per_unit_q64 | u128 | |
| paid_remainder | u64 | |
| growth | [ReceivableGrowth; 4] | Ordinary senior, junior, base hLP, quote hLP. |
ReceivableGrowth
| Field | Type | Notes |
|---|
| units_q64 | u128 | |
| weighted_paid_q128 | [u64; 4] | |
One jrLP mint generation, including its retired state and frozen income ledgers after rotation.
- PDA seeds
- "junior_cohort", market, jrLP mint
- SDK helper
- deriveJuniorCohortAddress
- Discriminator
- 42ff0e5b9eb31709
| Field | Type | Notes |
|---|
| income_end | [IncomeExposureEnd; 4] | |
| market | pubkey | |
| mint | pubkey | |
| generation | u64 | |
| retired | bool | |
| final_income | [TrancheIncome; 2] | |
| bump | u8 | |
IncomeExposureEnd
| Field | Type | Notes |
|---|
| ended | bool | |
| epoch | u64 | |
| growth | ReceivableGrowth | |
ReceivableGrowth
| Field | Type | Notes |
|---|
| units_q64 | u128 | |
| weighted_paid_q128 | [u64; 4] | |
TrancheIncome
| Field | Type | Notes |
|---|
| initialized | bool | |
| income_share_bps | u16 | |
| reserve_shares | u64 | |
| receipt_supply | u64 | |
| swap_growth_q64 | u128 | |
| interest_growth_q64 | u128 | |
| swap_remainder | u64 | |
| interest_remainder | u64 | |
| seed_swap_amount | u64 | |
| seed_interest_amount | u64 | |
| seed_swap_checkpoint | u128 | |
| seed_interest_checkpoint | u128 | |
| seed_swap_remainder | u64 | |
| seed_interest_remainder | u64 | |
| carry | TrancheRevenueCarry | |
TrancheRevenueCarry
| Field | Type | Notes |
|---|
| interest_remainder_bps | u16 | |
| swap_remainder_bps | u16 | |
One holder's burned jrLP exit claim, notice time and exercise window for a specific junior cohort.
- PDA seeds
- "junior_exit", market, owner, jrLP mint
- SDK helper
- deriveJuniorExitAddress
- Discriminator
- ba9ed0fa07db0d1a
| Field | Type | Notes |
|---|
| market | pubkey | |
| owner | pubkey | |
| mint | pubkey | |
| ticket | JuniorExitTicket | |
| bump | u8 | |
JuniorExitTicket
| Field | Type | Notes |
|---|
| generation | u64 | |
| receipts | u64 | |
| ready_at | u64 | |
| expires_at | u64 | Exclusive end before adding verified blocked time after ready_at. |
The delegate program allowed to act on a leverage position and the actions it may take.
- PDA seeds
- "leverage_delegation_v2", position
- SDK helper
- deriveLeverageDelegationAddress
- Discriminator
- 313c1d17f3db10d6
| Field | Type | Notes |
|---|
| owner | pubkey | |
| market | pubkey | |
| position | pubkey | |
| debt_asset | u8 | |
| delegated_program | pubkey | |
| approved_actions | u32 | |
| open_curve_revision | u64 | |
| bump | u8 | |
An isolated leverage position: debt asset, collateral, margin, notional, debt shares, multiplier and timestamps.
- PDA seeds
- "leverage_position_v2", market, position id
- SDK helper
- deriveLeveragePositionAddress
- Discriminator
- 584e7c44e48122fb
| Field | Type | Notes |
|---|
| owner | pubkey | |
| market | pubkey | |
| namespace_authority | pubkey | Funding signer that established this position. Ordinary opens use the owner; sponsored entry orders use their owner-created order PDA. |
| position_id | pubkey | |
| referral_partner | pubkey | |
| referral_interest_share_bps | u16 | |
| debt_asset | u8 | |
| collateral_amount | u64 | |
| margin_terms | LeverageMarginTerms | |
| margin_amount | u64 | Entry equity valued in debt-token atoms. |
| open_notional | u64 | |
| debt_principal | u128 | |
| debt_shares | u128 | |
| multiplier_bps | u64 | |
| opened_at | i64 | |
| opened_slot | u64 | |
| open_curve_revision | u64 | Market curve revision committed by this opening. A recreated PDA gets a new revision even if it reopens in the same slot. |
| active_liquidation_session | pubkey | |
| close_approval | CloseApprovalQuote | |
| bump | u8 | |
LeverageMarginTerms
| Field | Type | Notes |
|---|
| reference_collateral | u64 | |
| maintenance_boundaries_bps | [u16; 2] | |
| maintenance_rates_bps | [u16; 3] | |
| entry_buffer_bps | u16 | |
| admission_equity_collateral_nad | u128 | Collateral atoms times NAD, not a fixed debt-token or dollar amount. Retained on equity extraction; released proportionally on size reduction. |
CloseApprovalQuote
| Field | Type | Notes |
|---|
| slot | u64 | |
| close_bps | u16 | |
| collateral_credit | u64 | |
| selected_output | u64 | |
| full_output | u64 | |
A transaction-scoped borrow or leverage flash-liquidation obligation, including released collateral and the fixed repayment due.
- Discriminator
- c6134c3a66a686a4
| Field | Type | Notes |
|---|
| market | pubkey | |
| position | pubkey | |
| owner | pubkey | |
| buyer | pubkey | |
| collateral_mint | pubkey | |
| debt_mint | pubkey | |
| collateral_vault | pubkey | |
| buyer_collateral_account | pubkey | |
| repayment_vault | pubkey | |
| buyer_refund_account | pubkey | |
| owner_debt_account | pubkey | |
| original_collateral | u64 | |
| original_debt_shares | u128 | |
| original_principal | u128 | |
| borrow_index | u128 | |
| payment_balance_before | u64 | |
| min_buyer_credit | u64 | Minimum final debt-token credit when the paired Dusk AMM funds settle. External settlement routes bind their own output and leave this zero. |
| quote | FlashLiquidationQuote | |
| debt_asset | u8 | |
| leverage | bool | |
| begin_index | u16 | |
| settle_index | u16 | |
| slot | u64 | |
| bump | u8 | |
FlashLiquidationQuote
| Field | Type | Notes |
|---|
| full | bool | |
| collateral_debit | u64 | |
| collateral_credit | u64 | |
| payment | u64 | Bound net spendable payment before distribution, including repayment, liquidation fee and any full-purchase proceeds belonging to the owner. |
| repayment | u64 | |
| owner_surplus | u64 | |
| fee | LiquidationFeeAllocation | |
| debt_shares_to_burn | u128 | |
| health_before | LiquidationHealth | |
| health_after | LiquidationHealth | |
| rates | LiquidationRates | |
LiquidationFeeAllocation
| Field | Type | Notes |
|---|
| total | u64 | |
| protocol | u64 | |
| junior | u64 | |
LiquidationHealth
| Field | Type | Notes |
|---|
| collateral_value | u64 | |
| debt | u64 | |
| maintenance_bps | u16 | |
LiquidationRates
| Field | Type | Notes |
|---|
| buyer_discount_bps | u16 | |
| emergency_reward_bps | u16 | |
One market: configuration, curve state, both sides' reserves and fee liabilities, debt indexes, the two hLP vaults, risk observations, oracle policy, tranche capital and policy, the active jrLP mint, the income books, operator/manager authority and parameter revisions and the reduce-only flag.
- PDA seeds
- "market_v2", base mint, quote mint, params hash
- SDK helper
- deriveMarketAddress
- Discriminator
- dbbed53700e3c69a
| Field | Type | Notes |
|---|
| oracle | OracleState | |
| version | u8 | |
| srlp_mint | pubkey | |
| base_side | MarketSide | |
| quote_side | MarketSide | |
| config | MarketConfig | |
| amm | AmmState | |
| debt | Debt | |
| tranches | TrancheCapital | One shared junior capital budget across both reserve/debt books. |
| income | MarketIncomeBooks | |
| junior_exit_config | JuniorExitConfig | |
| tranche_policy | TranchePolicy | |
| junior_mint | pubkey | |
| base_hlp_vault | HlpVault | |
| quote_hlp_vault | HlpVault | |
| risk | Risk | |
| params_hash | [u8; 32] | |
| initial_liquidity_authority | pubkey | One-shot signer allowed to provide the first fully-backed Base/Quote seed. It is cleared permanently once srLP supply becomes nonzero. |
| operator | OperatorState | Sole per-market authority; token ownership carries no configuration rights. |
| protocol_interest_markup_bps | u16 | Internal mirror of the global FutarchyAuthority markup, never an operator parameter. |
| parameter_revisions | [u64; 7] | Independent monotone revisions for fee, concentration, IRM, EMA, daily-borrow-limit, center-controller, and tranche parameter families. |
| last_marginal_observation_nad | u64 | Latest trader-visible marginal price committed by a curve mutation. |
| curve_revision | u64 | Monotone revision for executable-curve mutations. |
| risk_revision | u64 | Curve revision represented by the materialized lending-risk snapshot. |
| last_update_slot | u64 | |
| reduce_only | bool | |
| bump | u8 | |
OracleState
| Field | Type | Notes |
|---|
| policy | OraclePolicy | |
| last_observation | OracleObservation | |
| revision | u64 | |
| recognized_tail_liquidity | u128 | Recognized native-tail depth cannot grow merely because an OP trade moves to a different native invariant. Real ordinary LP capital scales the ceiling through its share supply; losses reduce it immediately. |
| recognized_ordinary_supply | u64 | |
| runtime | RuntimePricing | |
OraclePolicy
| Field | Type | Notes |
|---|
| format | u8 | |
| provider | pubkey | |
| base_account | pubkey | |
| quote_account | pubkey | |
| base_feed_id | [u8; 32] | |
| quote_feed_id | [u8; 32] | |
| lambda_bps | u16 | |
| adjustment_cap_nad | u64 | |
| max_age_seconds | u32 | |
| max_age_slots | u64 | |
| max_confidence_bps | u16 | |
| max_publish_skew_seconds | u32 | |
OracleObservation
| Field | Type | Notes |
|---|
| price_nad | u64 | |
| confidence_nad | u64 | |
| publish_time | i64 | |
| posted_slot | u64 | |
| sequence | u64 | |
| hash | [u8; 32] | |
| source_times | [i64; 2] | |
| source_slots | [u64; 2] | |
| source_sequences | [u64; 2] | Independent counters retain replay protection when only one leg updates. |
| source_hashes | [[u8; 32]; 2] | Each normalized report is immutable at an already observed counter. |
RuntimePricing
MarketSide
| Field | Type | Notes |
|---|
| asset_mint | pubkey | |
| asset_decimals | u8 | |
| hlp_mint | pubkey | |
| reserve_vault | pubkey | |
| collateral_vault | pubkey | |
| interest_vault | pubkey | |
| reserves | Reserves | |
| shares | ReserveShares | |
| fees | Fees | |
| daily_borrow_bucket | DailyBorrowBucket | |
Reserves
| Field | Type | Notes |
|---|
| flash_receivable | u64 | Same-transaction collateral receivable. Included in backing, excluded from cash available to swaps, loans and withdrawals. |
| live_reserve | u128 | Wider than SPL custody: includes cash, indexed public debt and synthetic hLP backing. Unpaid interest never becomes executable curve inventory. |
| cash_reserve | u64 | |
| base_hlp_backing_inventory | u64 | Physical reserve-vault atoms removed from executable AMM inventory by base-hLP deleveraging. They are conservation-only bookkeeping, excluded from hLP NAV and exit output, and return to executable cash pro rata as base hLP exits. |
| quote_hlp_backing_inventory | u64 | Quote-hLP counterpart of `base_hlp_backing_inventory`; never a second hLP NAV or withdrawal claim. |
| protected_recenter_reserve | u64 | Physical reserve-vault atoms retained from toxicity surcharge for a future protected recenter. They are custody-backed but excluded from executable cash/live reserves, srLP NAV, and every withdrawal claim. |
ReserveShares
| Field | Type | Notes |
|---|
| srlp_supply | u64 | |
Fees
| Field | Type | Notes |
|---|
| junior | TrancheIncome | |
| public_interest_advance | PublicInterestAdvance | |
| swap_fee_growth_index_q64 | u128 | |
| interest_growth_index_q64 | u128 | |
| swap_fee_growth_remainder_scaled | u64 | Scaled fee entitlement not yet representable by the integer growth index. The corresponding whole-token backing already sits in `swap_fee_liability`; it must never be redistributed as unallocated revenue. |
| interest_growth_remainder_scaled | u64 | Interest counterpart of `swap_fee_growth_remainder_scaled`. |
| hlp_funding_interest_growth_remainder_scaled | u64 | Source-scoped Q64 carry for interest paid by hLP funding debt. Funding uses a non-hLP denominator, while public interest uses total srLP supply; sharing one carry across those denominators would eventually leak rounding entitlement between the two populations. |
| swap_fee_custody_balance | u64 | Claimable swap fees physically held in the reserve vault but excluded from executable cash and live reserves. |
| interest_vault_balance | u64 | |
| swap_fee_liability | u64 | |
| interest_liability | u64 | |
| unallocated_swap_fee_liability | u64 | |
| unallocated_interest_liability | u64 | |
| swap_protocol_fee_liability | u64 | |
| swap_buyback_fee_liability | u64 | |
| interest_protocol_fee_liability | u64 | |
| interest_buyback_fee_liability | u64 | |
| referral_interest_liability | u64 | |
| revenue_interest_liability | u64 | Shared custody for operator claims and protocol fractional carry. |
| fee_auction_reference_market | pubkey | Governance-approved reference market for fee-lane auctions. A default key permits only the sold market itself when it directly pairs the sold and accepted mints. |
| buyback_auction_reference_market | pubkey | Governance-approved reference market for buyback-lane auctions. A default key has the same direct-market-only meaning as above. |
| fee_swap_auction_epoch | ProtocolAuctionEpoch | |
| fee_interest_auction_epoch | ProtocolAuctionEpoch | |
| buyback_swap_auction_epoch | ProtocolAuctionEpoch | |
| buyback_interest_auction_epoch | ProtocolAuctionEpoch | |
DailyBorrowBucket
| Field | Type | Notes |
|---|
| borrowed_bucket | u64 | Gross principal lent out through the public borrow path. Internal hLP funding and isolated leverage do not consume this capacity. This is a 24-hour leaky/token bucket, not an exact trailing-window sum: it permits a full burst after idle and then refills at the configured daily rate. |
| last_decay_slot | u64 | |
| decay_remainder_ms | u64 | Numerator remainder from `limit * elapsed_ms / MS_PER_DAY`. For a fixed absolute limit, carrying it makes refill independent of how often the bucket is checkpointed. The bps-derived absolute limit can still move when conservative market depth changes. |
MarketConfig
| Field | Type | Notes |
|---|
| swap_fee_bps | u16 | |
| divergence_fee_share_cap_bps | u16 | |
| volatility_fee_share_cap_bps | u16 | |
| target_hlp_leverage_bps | u16 | |
| settlement_divergence_bps | u16 | |
| ema_half_life_ms | u64 | |
| directional_ema_half_life_ms | u64 | |
| curve_depth_ema_half_life_ms | u64 | |
| max_daily_borrow_bps | u16 | |
| global_health_contribution_cap_bps | u16 | |
| borrow_market_health_floor_bps | u16 | |
| amm | AmmConfig | |
| irm | RiskRateConfig | |
| start_time | i64 | |
AmmConfig
| Field | Type | Notes |
|---|
| peak_amplification_nad | u64 | |
| core_half_width_bps | u16 | |
| fade_width_bps | u16 | |
| center_ema_half_life_ms | u64 | |
| volatility_half_life_ms | u64 | |
| adjustment_step_nad | u64 | |
| volatility_shock_cap_nad | u64 | |
| volatility_cap_nad | u64 | |
| divergence_fee_coefficient_nad | u64 | |
| volatility_fee_coefficient_nad | u64 | |
| swap_fee_collect_mode | u8 | Asset in which swap, toxicity, volatility, and retained-recenter fees are denominated. Lending and hLP funding interest remain in the borrowed asset and are not affected by this setting. |
| compounding_fee_bps | u16 | Share of the LP-owned swap fee which becomes ordinary reserve principal instead of a claimable fee liability. Zero disables native compounding; `BPS_DENOMINATOR` compounds the complete LP share. |
| launch_fee_start_bps | u16 | Optional launch-only base fee. The premium above `swap_fee_bps` decays from `start_time` and is zero after the configured duration. |
| launch_fee_duration_seconds | u64 | |
| launch_fee_decay_mode | u8 | |
| launch_market_price_step_bps | u16 | When all three values are zero, the launch fee follows the time schedule above. A fully nonzero tuple selects a price-milestone scheduler whose reference price is bound by the first liquidity seed. |
| launch_market_number_of_periods | u16 | |
| launch_market_reduction_factor_bps | u16 | |
| launch_rate_limit_asset | u8 | Optional launch buy-size limiter. The configured asset is the asset being bought, not the input asset. Each full/partial reference amount after the first adds `launch_rate_limit_increment_bps`, capped by `launch_rate_limit_max_fee_bps`. |
| launch_rate_limit_reference_nad | u64 | |
| launch_rate_limit_increment_bps | u16 | |
| launch_rate_limit_max_fee_bps | u16 | |
| launch_rate_limit_duration_seconds | u64 | |
| reserved | [u8; 0] | |
RiskRateConfig
| Field | Type | Notes |
|---|
| lower_signal_nad | u64 | |
| upper_signal_nad | u64 | |
| lower_utilization_bps | u16 | |
| upper_utilization_bps | u16 | |
| half_life_ms | u64 | |
| initial_apr_nad | u64 | |
AmmState
| Field | Type | Notes |
|---|
| initialized | bool | |
| concentration_ramp | ConcentrationRamp | |
| concentrated_curve_cache | ConcentratedCurveCache | Concentrated CPMM-tail/band geometry. CPMM is represented by zero concentrated liquidity in this same cache. |
| center_price_nad | u64 | |
| price_ema_nad | u64 | |
| last_trade_price_nad | u64 | |
| last_observation_slot | u64 | |
| last_adjustment_slot | u64 | |
| launch_reference_price_nad | u64 | Immutable launch price reference bound by the first fully-backed liquidity seed. Zero is allowed only before that seed. |
| launch_fee_progress_offset | u16 | Fee-schedule progress already completed by a bootstrap adapter before the market graduates into GAMM. |
| volatility_accumulator_nad | u64 | |
| curve_depth_per_share_nad | u128 | |
| protected_floor_per_share_nad | u128 | srLP principal floor protected from funded recenter/ramp impairment. |
| retention_required_nad | u128 | Fresh protected-profit target that arms retained surcharge routing. This is a principal-budget target, never a cap on trader fees. |
| retention_stop_nad | u128 | Hysteresis threshold below which retention remains armed. |
| retention_hard_cap_nad | u128 | Maximum protected principal one controller target may request/spend. It does not clip divergence or volatility surcharge amounts. |
| retain_dynamic_surcharge | bool | When true, dynamic surcharge is locked in the non-quoteable protected recenter bucket; when false, the identical trader charge is routed to claimable srLP fee accounting. |
| retention_target_saturated | bool | The requested protection target exceeded its principal-budget cap. |
| retention_target_stale | bool | The protected bucket changed after the last exact forward-target solve. While stale, retention stays on until a decision point refreshes the target or executes a funded recenter. |
| deferred_controller_target | DeferredControllerTarget | Exact unfunded controller target retried by later real operations. |
| frozen_hlp_mask | u8 | A distressed hLP cannot be reconstructed as positive one-sided equity. Each bit freezes only that vault's share/debt hedge during swaps. |
| frozen_base_vault_base_offset_nad | i128 | Fixed virtual-coordinate adjustment captured when the vault freezes. It preserves the pre-freeze executable price without treating the vault's negative equity as spendable token inventory. |
| frozen_base_vault_quote_offset_nad | i128 | |
| frozen_quote_vault_base_offset_nad | i128 | |
| frozen_quote_vault_quote_offset_nad | i128 | |
| _reserved | [u8; 0] | |
ConcentrationRamp
| Field | Type | Notes |
|---|
| active | bool | |
| start | ConcentratedCurveParameters | |
| target | ConcentratedCurveParameters | |
| start_slot | u64 | |
| end_slot | u64 | |
| last_attempt_slot | u64 | Successful or rejected steps are attempted at most once per slot. |
ConcentratedCurveCache
| Field | Type | Notes |
|---|
| math_revision | u8 | |
| peak_amplification_nad | u64 | |
| core_half_width_bps | u16 | |
| fade_width_bps | u16 | |
| tail_liquidity | u128 | |
| concentrated_liquidity | u128 | |
| core_lower_sqrt_price_nad | u128 | |
| core_upper_sqrt_price_nad | u128 | |
| outer_lower_sqrt_price_nad | u128 | |
| outer_upper_sqrt_price_nad | u128 | |
DeferredControllerTarget
| Field | Type | Notes |
|---|
| kind | u8 | 0 = none, 2 = center move. |
| center_price_nad | u64 | |
| required_nad | u128 | |
| evaluated_base_reserve_nad | u128 | |
| evaluated_quote_reserve_nad | u128 | |
| created_slot | u64 | |
| saturated | bool | |
Debt
| Field | Type | Notes |
|---|
| fixed_base_shares | u128 | |
| fixed_quote_shares | u128 | |
| base_borrow_index_nad | u128 | |
| quote_borrow_index_nad | u128 | |
| base_borrow_index_remainder | u128 | Fractional index growth carried across checkpoints. Denominator is `NAD * MS_PER_YEAR`, so frequent checkpoints cannot discard interest. |
| quote_borrow_index_remainder | u128 | |
| base_borrow_apr_nad | u128 | |
| quote_borrow_apr_nad | u128 | |
| base_borrow_apr_fraction_e18 | u64 | Fractional NAD APR carried by the exponential controller (scale 1e9). |
| quote_borrow_apr_fraction_e18 | u64 | |
| global_health_base_contribution_for_quote_debt | u64 | |
| global_health_quote_contribution_for_base_debt | u64 | |
| base_last_accrual_slot | u64 | |
| quote_last_accrual_slot | u64 | |
| fixed_base_principal | u64 | Aggregate outstanding *principal* (borrowed token amount, excluding accrued interest) backing fixed margin debt on each side. Accrued interest is `fixed_*_debt - fixed_*_principal`; tracked so interest can be routed to the interest vault (non-compounding) instead of compounding into reserves. Principal is a raw token-atom balance and is therefore bounded by the corresponding `u64` reserve custody domain. |
| fixed_quote_principal | u64 | |
| isolated_base_shares | u128 | Aggregate isolated leverage debt. This debt contributes to utilization and interest, but is intentionally not utilized as normal margin debt. Shares remain `u128`; raw principal remains in the token account's `u64` amount domain. |
| isolated_quote_shares | u128 | |
| isolated_base_principal | u64 | |
| isolated_quote_principal | u64 | |
| leverage_base_collateral | u64 | Gross collateral atoms in debt-bearing leverage positions. Counts all owners and namespaces; custody donations cannot create exposure credit. |
| leverage_quote_collateral | u64 | |
TrancheCapital
| Field | Type | Notes |
|---|
| junior_reserve_shares | u64 | |
| junior_receipt_supply | u64 | |
| permanent_receipts | u64 | Funded, nonredeemable protocol receipts; included in junior supply. |
| queued_receipts | u64 | Escrow remains junior until a successful conversion or cancellation. |
| generation | u64 | |
MarketIncomeBooks
| Field | Type | Notes |
|---|
| books | [IncomeReceivableBook; 4] | base public, quote public, base hLP funding, quote hLP funding. |
| revenue | [InterestRevenueBook; 4] | |
| pending | [u64; 4] | Gross settlement budget awaiting measured net custody credit. |
| seed | [IncomeReceivableClaim; 4] | |
| hlp | [[IncomeReceivableClaim; 2]; 2] | [hLP target][income asset], owned by the vault rather than its holders. |
| junior_end | [IncomeExposureEnd; 4] | |
| split_carry_bps | [u16; 4] | |
IncomeReceivableBook
| Field | Type | Notes |
|---|
| epoch | u64 | |
| unpaid | u64 | |
| units | u64 | |
| paid_per_unit_q64 | u128 | |
| paid_remainder | u64 | |
| growth | [ReceivableGrowth; 4] | Ordinary senior, junior, base hLP, quote hLP. |
InterestRevenueBook
| Field | Type | Notes |
|---|
| gross_unpaid | u64 | |
| protocol_unpaid | u64 | |
| operator_unpaid | u64 | |
| pending_gross | u64 | |
| pending_protocol_gross | u64 | |
| operator_claimable | u64 | |
| protocol_fraction_q64 | u64 | |
| operator_fraction_q64 | u64 | |
| protocol_cash_fraction_q64 | u64 | |
IncomeReceivableClaim
| Field | Type | Notes |
|---|
| epoch | u64 | |
| units_q64 | u128 | |
| paid_checkpoint_q64 | u128 | |
| growth_checkpoint | ReceivableGrowth | |
| paid_fraction_q128 | u128 | |
| claimable | u64 | |
IncomeExposureEnd
| Field | Type | Notes |
|---|
| ended | bool | |
| epoch | u64 | |
| growth | ReceivableGrowth | |
JuniorExitConfig
| Field | Type | Notes |
|---|
| minimum_notice_slots | u64 | |
| maximum_notice_slots | u64 | |
| exercise_window_slots | u64 | |
TranchePolicy
| Field | Type | Notes |
|---|
| junior_income_share_bps | u16 | |
HlpVault
| Field | Type | Notes |
|---|
| flash_collateral_debit | u64 | Collateral committed to one atomic flash recovery. Receipt supply is fixed until settlement; retail operations on other positions may run. |
| srlp_vault | pubkey | |
| srlp_shares | u64 | |
| base_hlp_live_reserve | u64 | hLP-owned live reserve depth that is not backed by reserve cash or normal cash-backed debt. This is the explicit synthetic live component in `r_virtual = r_cash + r_cash_backed_debt + r_hlp_live`. |
| quote_hlp_live_reserve | u64 | |
| debt_shares | u128 | Funding debt used by the hLP vault. It accrues interest and counts toward utilization, but is not same-side cash-backed reserve debt. |
| debt_principal | u64 | Raw borrowed token atoms; products and indexed shares stay `u128`. |
| hlp_supply | u64 | |
| residual_exposure | i128 | |
| base_swap_fee_growth_index_q64 | u128 | |
| base_interest_growth_index_q64 | u128 | |
| quote_swap_fee_growth_index_q64 | u128 | |
| quote_interest_growth_index_q64 | u128 | |
| base_swap_fee_checkpoint_q64 | u128 | |
| base_interest_checkpoint_q64 | u128 | |
| quote_swap_fee_checkpoint_q64 | u128 | |
| quote_interest_checkpoint_q64 | u128 | |
| base_swap_fee_remainder_q64 | u64 | Aggregate sub-atom srLP entitlement carried across hLP checkpoints. These are distinct from each holder YieldAccount remainder: this layer converts vault-owned srLP growth into hLP growth without double-flooring. |
| base_interest_remainder_q64 | u64 | |
| quote_swap_fee_remainder_q64 | u64 | |
| quote_interest_remainder_q64 | u64 | |
| base_swap_fee_growth_remainder_scaled | u64 | Sub-index distribution carry for the second, srLP-to-hLP allocation layer. Whole-token backing represented here has already left the corresponding `unallocated_*` bucket. |
| base_interest_growth_remainder_scaled | u64 | |
| quote_swap_fee_growth_remainder_scaled | u64 | |
| quote_interest_growth_remainder_scaled | u64 | |
| unallocated_base_swap_fee_amount | u64 | |
| unallocated_base_interest_amount | u64 | |
| unallocated_quote_swap_fee_amount | u64 | |
| unallocated_quote_interest_amount | u64 | |
| last_nav_nad | u128 | |
| cached_settlement_price_nad | u128 | Base quoted in quote NAD units for either target asset; zero means unset. |
| funding_apr_ema_nad | u128 | Smoothed APR of the opposite asset borrowed by this target-asset hLP. The fixed twelve-hour half-life gives Stop Rate orders stable semantics. |
| funding_apr_ema_last_slot | u64 | |
Risk
| Field | Type | Notes |
|---|
| base_price_ema_nad | u64 | |
| quote_price_ema_nad | u64 | |
| directional_base_price_ema_nad | u64 | |
| directional_quote_price_ema_nad | u64 | |
| cached_spot_base_price_nad | u64 | |
| cached_spot_quote_price_nad | u64 | |
| observed_curve_depth_nad | u128 | Last observed total active curve depth in market amount units (see Market). |
| curve_depth_ema_nad | u128 | EMA of total active curve depth in market amount units (see Market). |
| last_snapshot_slot | u64 | |
OperatorState
| Field | Type | Notes |
|---|
| authority | pubkey | |
| manager | pubkey | Optional parameter delegate; operator ownership and revenue stay with authority. |
| epoch | u64 | |
| revenue_epoch | u64 | |
| next_nonce | u64 | Monotone across authority transfers; a closed proposal PDA cannot be reused. |
| pending | pubkey | |
| pending_author | pubkey | Prevents a manager from replacing an operator-authored bundle. |
| revenue_recipient | pubkey | |
| interest_share_bps | u16 | |
One committed atomic settings/authority bundle, its author, exact targets, revisions, digest, full notice, deadline and rent recipient.
- PDA seeds
- "operator_proposal", market, nonce (u64 little-endian)
- SDK helper
- deriveOperatorProposalAddress
- Discriminator
- 37ae4e7021209fa9
| Field | Type | Notes |
|---|
| market | pubkey | |
| operator | pubkey | |
| epoch | u64 | |
| nonce | u64 | |
| policy_version | u64 | |
| updates | Vec<MarketParameterUpdate> | |
| next_operator | Option<pubkey> | |
| next_manager | Option<pubkey> | Some(zero) clears the manager; None leaves it unchanged. |
| revenue_recipient | Option<pubkey> | |
| interest_share_bps | Option<u16> | |
| metadata | ProposalMetadataV1 | |
| family_revisions | [u64; 7] | |
| announced_at_slot | u64 | |
| execute_after_slot | u64 | |
| deadline_slot | u64 | |
| rent_refund | pubkey | |
| digest | [u8; 32] | |
| executed | bool | |
| bump | u8 | |
MarketParameterUpdate
| Variant | Fields |
|---|
| Fee | FeeProfile |
| Concentration | peak_amplification_nad: u64, core_half_width_bps: u16, fade_width_bps: u16, ramp_duration_slots: u64 |
| Irm | RiskRateUpdate |
| EmaHalfLives | price_ms: u64, directional_price_ms: u64, curve_depth_ms: u64, center_price_ms: u64 |
| DailyBorrowLimit | max_daily_borrow_bps: u16 |
| CenterController | adjustment_step_nad: u64 |
| Tranche | junior_income_share_bps: u16 |
ProposalMetadataV1
| Field | Type | Notes |
|---|
| version | u8 | |
| title | string | |
| description_uri | string | |
| description_sha256 | [u8; 32] | |
| description_len | u32 | |
A recipient’s collected operator interest from a revenue epoch, preserved across recipient and ownership handoffs.
- Discriminator
- 8967e29b9962e341
| Field | Type | Notes |
|---|
| market | pubkey | |
| recipient | pubkey | |
| revenue_epoch | u64 | |
| claimable | [u64; 4] | |
| sealed | bool | |
| bump | u8 | |
A partner's claimable interest for one market and asset mint.
- PDA seeds
- "referral_accrual", partner, market, asset mint
- SDK helper
- deriveReferralAccrualAddress
- Discriminator
- 23f61942aea03027
| Field | Type | Notes |
|---|
| referral_partner | pubkey | |
| market | pubkey | |
| asset_mint | pubkey | |
| amount | u64 | |
| bump | u8 | |
A listed referrer: its authority, recipient, interest share and active flag.
- PDA seeds
- "referral_partner", authority
- SDK helper
- deriveReferralPartnerAddress
- Discriminator
- ea36a99d8ebbe1d6
| Field | Type | Notes |
|---|
| authority | pubkey | |
| recipient | pubkey | |
| interest_share_bps | u16 | |
| active | bool | |
| bump | u8 | |
Per owner, market, LP mint, asset and kind: checkpoints against the growth indexes and income books, accrued amounts, jrLP held in an exit request, the recipient and an optional harvest authority.
- PDA seeds
- "yield", market, owner, LP mint, asset mint, kind
- SDK helper
- deriveYieldAccountAddress
- Discriminator
- e9f17706020e6a9c
| Field | Type | Notes |
|---|
| owner | pubkey | |
| market | pubkey | |
| lp_mint | pubkey | LP mint whose balance earns this account's revenue stream. This keeps base-hLP, quote-hLP, and srLP entitlements in disjoint PDA namespaces. |
| asset_mint | pubkey | |
| token_kind | u8 | |
| recipient | pubkey | |
| swap_fee_checkpoint_q64 | u128 | |
| interest_checkpoint_q64 | u128 | |
| accrued_swap_fee_amount | u64 | |
| accrued_interest_amount | u64 | |
| swap_fee_remainder_q64 | u64 | Sub-token fixed-point entitlement carried across checkpoints. Keeping this remainder prevents transfer/checkpoint frequency from destroying holder yield through repeated flooring. |
| interest_remainder_q64 | u64 | |
| bump | u8 | |
| harvest_authority | Option<pubkey> | Optional caller allowed to harvest to the recipient without controlling the LP or changing either yield permission. Only the owner may set it. |
| income_initialized | bool | |
| income | [IncomeReceivableClaim; 2] | |
| escrow_balance | u64 | Owner's junior exit escrow receipts. Historical unpaid-income ownership is checkpointed here alongside the liquid balance. |
IncomeReceivableClaim
| Field | Type | Notes |
|---|
| epoch | u64 | |
| units_q64 | u128 | |
| paid_checkpoint_q64 | u128 | |
| growth_checkpoint | ReceivableGrowth | |
| paid_fraction_q128 | u128 | |
| claimable | u64 | |
ReceivableGrowth
| Field | Type | Notes |
|---|
| units_q64 | u128 | |
| weighted_paid_q128 | [u64; 4] | |