Events
Every event the Dusk program emits.
Updated Sep 25, 2026
Events are emitted by self-CPI, including for executions nested under the leverage delegate, and are identified by transaction signature, invocation path and event ordinal. Events and accounting says which event is canonical for which number; the fields below are the IDL's.
BorrowInterestAccrued
Interest accrued on borrow debt when the market was checkpointed.
Discriminator 483c7df9e55c71fa
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| asset_mint | pubkey | |
| asset_side | u8 | |
| from_slot | u64 | |
| to_slot | u64 | |
| borrow_index_before_nad | u128 | |
| borrow_index_after_nad | u128 | |
| credit_interest | u128 | |
| margin_interest | u128 | |
| hlp_interest | u128 |
BorrowInterestPaid
A borrower paid accrued interest, including the amount distributed to recipients.
Discriminator adb5dbaa2058e0e0
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| asset_mint | pubkey | |
| asset_side | u8 | |
| source | DebtSource | |
| position | Option<pubkey> | None for aggregate hLP funding debt; `asset_side` identifies its vault. |
| interest_paid | u64 | Gross interest collected, including any terminal hLP caller bounty. |
| interest_vault_credit | u64 | Net tokens credited to the interest vault after transfer fees/bounty. |
| protocol_interest_revenue | u64 | Protocol allocation from vault credit, before the referral allocation. |
| referral_amount | u64 | |
| caller_bounty | u64 | Gross terminal hLP caller bounty; zero for ordinary payments. |
| slot | u64 |
DebtSource
| Variant | Fields |
|---|---|
| Credit | unit |
| Margin | unit |
| Hlp | unit |
BorrowPositionLiquidated
Legacy event retained in the interface schema; the current liquidation flow does not emit it.
Discriminator 6ba71a1921c56abc
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| borrow_position | pubkey | |
| borrower | pubkey | |
| liquidator | pubkey | |
| debt_asset_side | u8 | `0` for base debt and `1` for quote debt. The collateral is the other side. |
| repaid_amount | u64 | |
| collateral_seized | u64 | |
| collateral_to_liquidator | u64 | Gross collateral debited for the liquidator's transfer. Token-2022 may reduce the liquidator's net account credit. |
| collateral_credit | u64 | Net collateral credited to the liquidator after any transfer fee. |
| socialized_loss | u64 | |
| remaining_debt | u128 | |
| base_collateral | u64 | The position's state after the liquidation. |
| quote_collateral | u64 | |
| fixed_base_shares | u128 | |
| fixed_quote_shares | u128 | |
| 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 | |
| auction_debt_asset | u8 | `255` once the auction is cleared. |
| closed | bool | The liquidation emptied the position and closed its account. |
DebtFreePositionClosed
A fully repaid borrow or leverage position returned its remaining collateral and closed.
Discriminator dcc6e096cc41b81f
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| position | pubkey | |
| owner | pubkey | |
| leverage | bool | |
| base_received | u64 | |
| quote_received | u64 | |
| metadata | MarketEventMetadata |
MarketEventMetadata
| Field | Type | Notes |
|---|---|---|
| signer | pubkey | |
| market | pubkey | |
| slot | u64 |
EmergencyLiquidationSettled
An internal EMA-and-smoothed-depth liquidation fallback completed and recorded its recovery waterfall.
Discriminator f3e68254b87112ac
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| position | pubkey | |
| owner | pubkey | |
| caller | pubkey | |
| leverage | bool | |
| debt_asset | u8 | |
| quote | EmergencyLiquidationQuote | |
| remaining_collateral | u64 | |
| remaining_debt | u64 | |
| position_state | LiquidationPositionState | Complete post-settlement position state for event-only indexers. |
EmergencyLiquidationQuote
| Field | Type | Notes |
|---|---|---|
| reference_price_nad | u64 | Symmetric collateral-price EMA (debt per collateral, NAD), not live spot. |
| reference_depth_nad | u128 | Smoothed total active curve depth used only for settlement sizing. |
| full | bool | |
| collateral_debit | u64 | |
| collateral_credit | u64 | |
| swap_output | u64 | |
| repayment | u64 | |
| shares_to_burn | u128 | |
| reward_credit | u64 | |
| reward_debit | u64 | |
| fee | LiquidationFeeAllocation | |
| junior_fee_debit | u64 | |
| revenue_fee_debit | u64 | |
| owner_debit | u64 | |
| owner_credit | u64 | |
| loss | LiquidationLossAllocation | |
| health_before | LiquidationHealth | |
| health_after | LiquidationHealth | |
| rates | LiquidationRates |
LiquidationFeeAllocation
| Field | Type | Notes |
|---|---|---|
| total | u64 | |
| protocol | u64 | |
| junior | u64 |
LiquidationLossAllocation
| Field | Type | Notes |
|---|---|---|
| principal_repaid | u64 | |
| interest_paid | u64 | |
| principal_written_off | u64 | |
| interest_canceled | u64 | |
| surplus | 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 |
LiquidationPositionState
| Field | Type | Notes |
|---|---|---|
| owner | pubkey | |
| base_collateral | u64 | |
| quote_collateral | u64 | |
| fixed_base_shares | u128 | |
| fixed_quote_shares | u128 | |
| 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 | |
| leverage_collateral_amount | u64 | |
| leverage_debt_shares | u128 | |
| closed | bool |
FlashLiquidationBegun
Collateral was released into an atomic borrow or leverage liquidation session with a fixed payment obligation.
Discriminator c6fa75b84a303097
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| position | pubkey | |
| session | pubkey | |
| buyer | pubkey | |
| debt_asset | u8 | |
| quote | FlashLiquidationQuote |
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 |
FlashLiquidationSettled
An atomic borrow or leverage liquidation payment was verified and applied.
Discriminator cfcb8963ebedcf26
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| position | pubkey | |
| buyer | pubkey | |
| leverage | bool | |
| debt_asset | u8 | |
| collateral_debit | u64 | |
| debt_repaid | u64 | |
| owner_surplus | u64 | |
| fee | LiquidationFeeAllocation | |
| loss | LiquidationLossAllocation | |
| remaining_collateral | u64 | |
| remaining_debt | u64 | |
| position_state | LiquidationPositionState | Complete post-settlement position state for event-only indexers. |
LiquidationFeeAllocation
| Field | Type | Notes |
|---|---|---|
| total | u64 | |
| protocol | u64 | |
| junior | u64 |
LiquidationLossAllocation
| Field | Type | Notes |
|---|---|---|
| principal_repaid | u64 | |
| interest_paid | u64 | |
| principal_written_off | u64 | |
| interest_canceled | u64 | |
| surplus | u64 |
LiquidationPositionState
| Field | Type | Notes |
|---|---|---|
| owner | pubkey | |
| base_collateral | u64 | |
| quote_collateral | u64 | |
| fixed_base_shares | u128 | |
| fixed_quote_shares | u128 | |
| 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 | |
| leverage_collateral_amount | u64 | |
| leverage_debt_shares | u128 | |
| closed | bool |
HlpClosed
hLP shares were burned; records the net owner credit.
Discriminator 577e98a4a2cb6feb
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| owner | pubkey | |
| asset_side | u8 | `0` for base hLP and `1` for quote hLP. |
| hlp_amount | u64 | |
| srlp_amount | u64 | |
| amount_out | u64 | Amount credited to the owner after any output transfer fee. |
| debt_repaid | u64 | |
| interest_paid | u64 | |
| srlp_supply | u64 | |
| hlp_supply | u64 | |
| base_live_reserve | u128 | |
| quote_live_reserve | u128 |
HlpCohortRotated
A terminal hLP receipt mint was retired and a fresh deposit cohort became active.
Discriminator 2e860d39752ce251
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| target_asset | u8 | |
| retired_mint | pubkey | |
| new_mint | pubkey | |
| retired_supply | u64 |
HlpFlashSettled
An atomic hLP recovery payment was verified and its hedge change applied.
Discriminator ffc1398a30408a25
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| buyer | pubkey | |
| quote | HlpFlashQuote | |
| base_hlp_srlp_minted | u64 | Internal srLP changes made by this flash recovery. They are not user liquidity deposits or exits and are included here to avoid a second event CPI on the compute-constrained atomic settlement path. |
| base_hlp_srlp_burned | u64 | |
| quote_hlp_srlp_minted | u64 | |
| quote_hlp_srlp_burned | u64 | |
| funding_interest_paid | [u64; 2] | |
| loss | LiquidationLossAllocation | |
| surplus_credit | u64 |
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 |
LiquidationLossAllocation
| Field | Type | Notes |
|---|---|---|
| principal_repaid | u64 | |
| interest_paid | u64 | |
| principal_written_off | u64 | |
| interest_canceled | u64 | |
| surplus | u64 |
HlpFlashStarted
Target collateral was released into an atomic hLP recovery session with a fixed payment obligation.
Discriminator cb61f9bbe2778d47
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| buyer | pubkey | |
| quote | HlpFlashQuote |
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 |
HlpInterestAllocated
Funded interest first covered an hLP funding gap and published the remaining holder yield.
Discriminator 0cae1073f3858331
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| published | [[u64; 2]; 2] | [hLP target side][income asset]. Historical holder growth is unchanged. |
| capital_debit | [[u64; 2]; 2] | |
| capital_credit | [[u64; 2]; 2] |
HlpOpened
hLP shares were minted; records the net reserve credit.
Discriminator bce7f4340597ec54
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| owner | pubkey | |
| asset_side | u8 | `0` for base hLP and `1` for quote hLP. |
| deposit_amount | u64 | Net reserve-vault credit after any input transfer fee. |
| borrowed_amount | u64 | |
| srlp_amount | u64 | |
| hlp_amount | u64 | |
| srlp_supply | u64 | |
| hlp_supply | u64 | |
| base_live_reserve | u128 | |
| quote_live_reserve | u128 |
HlpRebalanced
A vault-wide hedge adjustment changed the hLP vault's srLP shares and funding debt.
Discriminator 30ed76b130a86806
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| slot | u64 | |
| base_hlp_srlp_minted | u64 | |
| base_hlp_srlp_burned | u64 | |
| quote_hlp_srlp_minted | u64 | |
| quote_hlp_srlp_burned | u64 | |
| base_hlp_srlp_shares_after | u64 | |
| quote_hlp_srlp_shares_after | u64 | |
| srlp_supply_after | u64 | |
| base_hlp_debt_increase | u64 | Quote-token debt of the base-target hLP. |
| base_hlp_debt_decrease | u64 | |
| base_hlp_debt_after | u64 | |
| quote_hlp_debt_increase | u64 | Base-token debt of the quote-target hLP. |
| quote_hlp_debt_decrease | u64 | |
| quote_hlp_debt_after | u64 | |
| base_hlp_funding_interest_paid | u64 | Gross quote tokens paid from reserve cash to the interest vault. |
| quote_hlp_funding_interest_paid | u64 | Gross base tokens paid from reserve cash to the interest vault. |
HlpRetiredReceiptBurned
A holder burned receipts from a retired hLP cohort after its yield checkpoint.
Discriminator 1ffc03cda6d70e31
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| owner | pubkey | |
| mint | pubkey | |
| amount | u64 | |
| remaining_supply | u64 |
HlpTerminalLiquidated
A vault exhausted by funding interest was closed out, with junior/senior loss socialization and caller bounty.
Discriminator 50baedd44bb72bad
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| caller | pubkey | |
| target_asset | u8 | |
| debt_closed | u64 | |
| srlp_burned | u64 | |
| interest_paid | u64 | Borrowed-asset funding interest credited to srLP after caller bounty and transfer fees. |
| caller_bounty | u64 | Borrowed-asset amount credited to the caller after transfer fees. |
| socialized_loss | u64 | Residual funded principal loss. Unpaid interest is reported separately. |
| interest_canceled | u64 | |
| remaining_hlp_supply | u64 | Existing holder tokens remain burnable for zero principal while their already-checkpointed fee claims remain independently claimable. |
JuniorCohortInitialized
A new active jrLP mint and cohort were initialized for a market generation.
Discriminator 126d55c8413ae4f3
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| mint | pubkey | |
| generation | u64 | |
| previous_mint | pubkey |
JuniorSeedCompounded
The permanent junior seed compounded earned income into its first-loss claim.
Discriminator fde97cb24362e057
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| base_amount | u64 | |
| quote_amount | u64 | |
| reserve_shares | u64 |
JuniorSeedFunded
The permanent junior seed's collected interest moved into reserve fee custody, ready to compound.
Discriminator 7b691220095c78b8
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| asset | pubkey | |
| interest_debit | u64 | |
| reserve_credit | u64 |
LeverageDelegationUpdated
A delegation was created, updated or closed.
Discriminator 7629eb5f5b18bf11
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| delegation | pubkey | |
| position | pubkey | |
| owner | pubkey | |
| delegated_program | pubkey | |
| approved_actions | u32 | |
| metadata | MarketEventMetadata |
MarketEventMetadata
| Field | Type | Notes |
|---|---|---|
| signer | pubkey | |
| market | pubkey | |
| slot | u64 |
LeveragePositionClosed
A position was fully closed by its owner or through a delegated order.
Discriminator 84097c6706fcb1ee
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| position | pubkey | |
| owner | pubkey | |
| debt_asset_mint | pubkey | |
| collateral_asset_mint | pubkey | |
| debt_repaid | u64 | |
| interest_paid | u64 | |
| collateral_sold | u64 | |
| closeout_value | u64 | |
| residual | u64 | |
| swap | LeverageSwapReceipt | |
| metadata | MarketEventMetadata |
LeverageSwapReceipt
| Field | Type | Notes |
|---|---|---|
| asset_in_side | u8 | |
| fee_asset_side | u8 | |
| amount_in | u64 | |
| amount_out | u64 | |
| gross_amount_out | u64 | |
| amount_in_after_fee | u64 | |
| base_fee | u64 | |
| divergence_fee | u64 | |
| volatility_fee | u64 | |
| retained_fee | u64 | |
| compounded_fee | u64 | |
| claimable_fee_credit | u64 | Actual reserve-vault credit after any Token-2022 transfer fee. |
| base_live_reserve | u128 | Final executable reserves after retention and inline hLP correction. |
| quote_live_reserve | u128 |
MarketEventMetadata
| Field | Type | Notes |
|---|---|---|
| signer | pubkey | |
| market | pubkey | |
| slot | u64 |
LeveragePositionLiquidated
A position below maintenance was liquidated; the loss fields record the junior-first then senior waterfall, even when no collateral swap was possible.
Discriminator 3b12b9f778b810e1
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| position | pubkey | |
| owner | pubkey | |
| liquidator | pubkey | |
| debt_asset_mint | pubkey | |
| collateral_asset_mint | pubkey | |
| debt_repaid | u64 | |
| socialized_loss | u64 | |
| interest_paid | u64 | |
| principal_written_off | u64 | |
| collateral_sold | u64 | |
| closeout_value | u64 | |
| liquidator_amount | u64 | |
| owner_residual | u64 | |
| swap | LeverageSwapReceipt | |
| metadata | MarketEventMetadata |
LeverageSwapReceipt
| Field | Type | Notes |
|---|---|---|
| asset_in_side | u8 | |
| fee_asset_side | u8 | |
| amount_in | u64 | |
| amount_out | u64 | |
| gross_amount_out | u64 | |
| amount_in_after_fee | u64 | |
| base_fee | u64 | |
| divergence_fee | u64 | |
| volatility_fee | u64 | |
| retained_fee | u64 | |
| compounded_fee | u64 | |
| claimable_fee_credit | u64 | Actual reserve-vault credit after any Token-2022 transfer fee. |
| base_live_reserve | u128 | Final executable reserves after retention and inline hLP correction. |
| quote_live_reserve | u128 |
MarketEventMetadata
| Field | Type | Notes |
|---|---|---|
| signer | pubkey | |
| market | pubkey | |
| slot | u64 |
LeveragePositionOpened
A position was opened; the embedded swap receipt repeats SwapExecuted for context.
Discriminator c6e3366336f9361d
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| position | pubkey | |
| owner | pubkey | |
| debt_asset_mint | pubkey | |
| collateral_asset_mint | pubkey | |
| margin_amount | u64 | |
| borrowed_amount | u64 | |
| debt_amount | u64 | |
| debt_shares | u128 | |
| collateral_amount | u64 | |
| margin_terms | LeverageMarginTerms | |
| closeout_value | u64 | |
| equity | u64 | |
| multiplier_bps | u64 | |
| swap | LeverageSwapReceipt | |
| metadata | MarketEventMetadata |
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. |
LeverageSwapReceipt
| Field | Type | Notes |
|---|---|---|
| asset_in_side | u8 | |
| fee_asset_side | u8 | |
| amount_in | u64 | |
| amount_out | u64 | |
| gross_amount_out | u64 | |
| amount_in_after_fee | u64 | |
| base_fee | u64 | |
| divergence_fee | u64 | |
| volatility_fee | u64 | |
| retained_fee | u64 | |
| compounded_fee | u64 | |
| claimable_fee_credit | u64 | Actual reserve-vault credit after any Token-2022 transfer fee. |
| base_live_reserve | u128 | Final executable reserves after retention and inline hLP correction. |
| quote_live_reserve | u128 |
MarketEventMetadata
| Field | Type | Notes |
|---|---|---|
| signer | pubkey | |
| market | pubkey | |
| slot | u64 |
LeveragePositionUpdated
Exposure or margin changed; includes interest_paid for decreases, partial closes and margin repayments.
Discriminator c3abf52b20a32caa
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| position | pubkey | |
| owner | pubkey | |
| debt_asset_mint | pubkey | |
| collateral_asset_mint | pubkey | |
| owner_debit | u64 | Gross debt-token payment from the wallet, including any transfer fee. |
| borrowed_amount | u64 | |
| debt_delta | i128 | |
| collateral_delta | i128 | |
| debt_amount | u64 | |
| debt_shares | u128 | |
| collateral_amount | u64 | |
| margin_terms | LeverageMarginTerms | |
| closeout_value | u64 | Executable closeout quote, or zero when unquoted by repayment or an operation leaving debt-free collateral. Zero is not a collateral valuation. |
| owner_credit | u64 | Net tokens paid to the owner by this update, if any. |
| interest_paid | u64 | Interest actually repaid by this action, in debt-token atoms. |
| swap | Option<LeverageSwapReceipt> | |
| metadata | MarketEventMetadata |
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. |
LeverageSwapReceipt
| Field | Type | Notes |
|---|---|---|
| asset_in_side | u8 | |
| fee_asset_side | u8 | |
| amount_in | u64 | |
| amount_out | u64 | |
| gross_amount_out | u64 | |
| amount_in_after_fee | u64 | |
| base_fee | u64 | |
| divergence_fee | u64 | |
| volatility_fee | u64 | |
| retained_fee | u64 | |
| compounded_fee | u64 | |
| claimable_fee_credit | u64 | Actual reserve-vault credit after any Token-2022 transfer fee. |
| base_live_reserve | u128 | Final executable reserves after retention and inline hLP correction. |
| quote_live_reserve | u128 |
MarketEventMetadata
| Field | Type | Notes |
|---|---|---|
| signer | pubkey | |
| market | pubkey | |
| slot | u64 |
LiquidationAuctionCancelled
Legacy event retained in the interface schema; the current devnet liquidation flow does not start lending auctions.
Discriminator 7a67aee17895ba9b
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| position | pubkey | |
| owner | pubkey | |
| debt_asset_side | u8 | Debt side of the cancelled auction: `0` for base and `1` for quote. |
LiquidationAuctionStarted
Legacy event retained in the interface schema; the current liquidation flow uses current health and atomic settlement.
Discriminator 8997e75c6c0dd73b
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| position | pubkey | |
| owner | pubkey | |
| auction_debt_asset | u8 | `0` for base debt and `1` for quote debt. |
| auction_start_time | i64 | |
| auction_start_price_nad | u64 | |
| auction_floor_price_nad | u64 |
LiquidityAdded
srLP was minted against a two-sided deposit.
Discriminator 9a1add6cee40d9a1
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| owner | pubkey | |
| base_reserve_credit | u64 | |
| quote_reserve_credit | u64 | |
| srlp_amount | u64 | |
| srlp_supply | u64 | |
| base_live_reserve | u128 | |
| quote_live_reserve | u128 | |
| metadata | MarketEventMetadata |
MarketEventMetadata
| Field | Type | Notes |
|---|---|---|
| signer | pubkey | |
| market | pubkey | |
| slot | u64 |
LiquidityRemoved
srLP was burned for both assets.
Discriminator e169d8277c74a9bd
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| owner | pubkey | |
| srlp_amount | u64 | |
| base_reserve_debit | u64 | Gross amounts debited from the reserve vaults. |
| quote_reserve_debit | u64 | |
| base_owner_credit | u64 | Net amounts credited to the owner after any Token-2022 transfer fee. |
| quote_owner_credit | u64 | |
| srlp_supply | u64 | |
| base_live_reserve | u128 | |
| quote_live_reserve | u128 | |
| metadata | MarketEventMetadata |
MarketEventMetadata
| Field | Type | Notes |
|---|---|---|
| signer | pubkey | |
| market | pubkey | |
| slot | u64 |
LpTransferred
srLP changed owner through its transfer hook.
Discriminator f4045db97d9f4b37
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| lp_mint | pubkey | |
| token_kind | u8 | `0` for srLP and `1` for hLP. |
| source_owner | pubkey | |
| destination_owner | pubkey | |
| amount | u64 |
ManagerChanged
The market’s optional parameter manager changed; removal is immediate.
Discriminator 8e61afdc491bfc38
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| manager | pubkey |
MarketCollateralDeposited
Collateral entered a borrow position.
Discriminator 29359dacf99f3f3c
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| owner | pubkey | |
| asset_mint | pubkey | |
| collateral_credit | u64 | |
| 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 | |
| metadata | MarketEventMetadata | |
| position | pubkey | Borrow position written by this deposit; the first deposit creates it. |
| position_id | pubkey | |
| auction_debt_asset | u8 | Post-deposit auction side, `255` when none is active. A deposit that restores health cancels an active auction. |
MarketEventMetadata
| Field | Type | Notes |
|---|---|---|
| signer | pubkey | |
| market | pubkey | |
| slot | u64 |
MarketCollateralWithdrawn
Collateral left a borrow position.
Discriminator 44d0a2842797ddf5
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| owner | pubkey | |
| asset_mint | pubkey | |
| collateral_debit | u64 | |
| asset_credit | u64 | |
| 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 | |
| metadata | MarketEventMetadata | |
| position | pubkey | |
| closed | bool | The withdrawal emptied the position and closed its account. |
MarketEventMetadata
| Field | Type | Notes |
|---|---|---|
| signer | pubkey | |
| market | pubkey | |
| slot | u64 |
MarketCreated
A market was initialized with its configuration.
Discriminator 58b882e7e254063a
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| base_mint | pubkey | |
| quote_mint | pubkey | |
| srlp_mint | pubkey | |
| base_collateral_vault | pubkey | |
| quote_collateral_vault | pubkey | |
| base_hlp_mint | pubkey | |
| quote_hlp_mint | pubkey | |
| target_hlp_leverage_bps | u16 | |
| swap_fee_bps | u16 | |
| config | MarketConfig | |
| operator | pubkey | |
| operator_revenue_recipient | pubkey | |
| operator_interest_share_bps | u16 | |
| protocol_interest_markup_bps | u16 | |
| oracle | OraclePolicy | Initial policy; an empty policy identifies an oracleless launch. |
| params_hash | [u8; 32] | |
| initial_liquidity_authority | pubkey | |
| launch_reference_price_nad | u64 | |
| launch_fee_progress_offset | u16 | |
| version | u8 | |
| metadata | MarketEventMetadata | |
| base_decimals | u8 | Asset mint decimals, which scale every price and amount of the market. |
| quote_decimals | u8 |
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 |
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 |
MarketEventMetadata
| Field | Type | Notes |
|---|---|---|
| signer | pubkey | |
| market | pubkey | |
| slot | u64 |
MarketDebtUpdated
Public debt changed; cash_debit on borrow is principal leaving the pool, the canonical credit-origination number.
Discriminator 87966da5ae23a397
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| position | pubkey | |
| owner | pubkey | |
| debt_asset_mint | pubkey | |
| debt_delta | i128 | |
| cash_debit | u64 | Gross source-account debit and net destination-account credit. |
| cash_credit | u64 | |
| interest_paid | u64 | |
| fixed_base_debt | u128 | Market-wide fixed debt after the update, not this position's debt. |
| fixed_quote_debt | u128 | |
| 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_debt_health_bps | u64 | |
| quote_debt_health_bps | u64 | |
| metadata | MarketEventMetadata | |
| fixed_base_shares | u128 | The position's fixed debt shares after the update. |
| fixed_quote_shares | u128 | |
| auction_debt_asset | u8 | Post-update auction side, `255` when none is active. A repayment that restores health cancels an active auction. |
MarketEventMetadata
| Field | Type | Notes |
|---|---|---|
| signer | pubkey | |
| market | pubkey | |
| slot | u64 |
MarketHealthUpdated
The market's health measure was recomputed, for example after a borrow, a repayment or a collateral withdrawal.
Discriminator 630ce62b85c2bce1
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| global_health_base_contribution_for_quote_debt | u64 | |
| global_health_quote_contribution_for_base_debt | u64 | |
| effective_base_debt_nad | u128 | |
| effective_quote_debt_nad | u128 | |
| base_debt_health_bps | u64 | |
| quote_debt_health_bps | u64 | |
| metadata | MarketEventMetadata |
MarketEventMetadata
| Field | Type | Notes |
|---|---|---|
| signer | pubkey | |
| market | pubkey | |
| slot | u64 |
MarketReduceOnlyUpdated
A market entered or left reduce-only mode.
Discriminator 570c688f71791f5e
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| reduce_only | bool | |
| metadata | MarketEventMetadata |
MarketEventMetadata
| Field | Type | Notes |
|---|---|---|
| signer | pubkey | |
| market | pubkey | |
| slot | u64 |
OperatorChangeAnnounced
A committed operator bundle received its full notice and execution window.
Discriminator 89e7474f7f3adde0
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| proposal | pubkey | |
| operator | pubkey | |
| nonce | u64 | |
| digest | [u8; 32] | |
| execute_after_slot | u64 | |
| deadline_slot | u64 | |
| epoch | u64 | |
| policy_version | u64 | |
| updates | Vec<MarketParameterUpdate> | |
| next_operator | Option<pubkey> | |
| next_manager | Option<pubkey> | |
| revenue_recipient | Option<pubkey> | |
| interest_share_bps | Option<u16> | |
| metadata | ProposalMetadataV1 | |
| family_revisions | [u64; 7] |
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 |
OperatorChanged
Market ownership, revenue terms or operator settings changed after full notice.
Discriminator e74f3ee2be8bb033
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| operator | pubkey | |
| epoch | u64 |
OperatorChangeResolved
An operator bundle was cancelled or closed and its recorded rent payer refunded.
Discriminator 93c8fd03e4c475c9
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| proposal | pubkey | |
| executed | bool |
OperatorRevenueClaimed
Collected operator interest was paid to its recorded current or historical recipient.
Discriminator bbb1c7c7dc57594a
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| recipient | pubkey | |
| revenue_epoch | u64 | |
| asset_mint | pubkey | |
| gross_debit | u64 | |
| net_credit | u64 |
ProtocolAuctionConfigUpdated
Protocol auction parameters changed.
Discriminator b2a9d745aa3b50a0
| Field | Type | Notes |
|---|---|---|
| authority | pubkey | |
| lane | u8 | |
| accepted_mint | pubkey | |
| start_multiplier_bps | u16 | |
| floor_multiplier_bps | u16 | |
| duration_slots | u64 | |
| max_reference_age_slots | u64 | |
| signer | pubkey |
ProtocolAuctionRecipientsUpdated
Protocol auction proceeds recipients changed.
Discriminator aeb237789bf10578
| Field | Type | Notes |
|---|---|---|
| authority | pubkey | |
| lane | u8 | |
| treasury | pubkey | |
| staking_vault | pubkey | |
| treasury_bps | u16 | |
| staking_vault_bps | u16 | |
| signer | pubkey |
ProtocolAuctionRouteUpdated
A market's protocol auction route changed.
Discriminator 92885e572493ddc0
| Field | Type | Notes |
|---|---|---|
| authority | pubkey | |
| market | pubkey | |
| lane | u8 | |
| side | u8 | |
| sold_mint | pubkey | |
| accepted_mint | pubkey | |
| reference_market | pubkey | `Pubkey::default()` restores the direct-market-only policy. |
| signer | pubkey |
ProtocolAuctionSettled
Protocol revenue was sold from one lane and source; not a second collection of borrower interest.
Discriminator 0be6c7f51c856b03
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| reference_market | pubkey | |
| lane | u8 | |
| source | u8 | |
| side | u8 | |
| bidder | pubkey | |
| sold_mint | pubkey | |
| accepted_mint | pubkey | |
| sold_amount | u64 | |
| payment_amount | u64 | |
| treasury_amount | u64 | |
| staking_vault_amount | u64 | |
| reference_price_nad | u64 | |
| auction_price_nad | u64 | |
| remaining_fee_liability | u64 | |
| remaining_buyback_liability | u64 | |
| metadata | MarketEventMetadata |
MarketEventMetadata
| Field | Type | Notes |
|---|---|---|
| signer | pubkey | |
| market | pubkey | |
| slot | u64 |
ProtocolAuctionSplitUpdated
The split of auction proceeds between recipients changed.
Discriminator 11ff4ef27f6eeaf9
| Field | Type | Notes |
|---|---|---|
| authority | pubkey | |
| fee_auction_bps | u16 | |
| buyback_auction_bps | u16 | |
| signer | pubkey |
ProtocolInterestMarkupCheckpointed
A market checkpoint activated the current global protocol interest markup for future accrual.
Discriminator a484b117ba2bc827
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| previous_bps | u16 | |
| markup_bps | u16 | |
| slot | u64 |
PublicInterestFunded
Available market cash funded previously accrued public LP interest without changing swap reserves.
Discriminator 223752e02a079a9c
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| caller | pubkey | |
| receipt | FundInterestReceipt |
FundInterestReceipt
| Field | Type | Notes |
|---|---|---|
| gross_funded | [u64; 2] | |
| lp_custody_credit | [u64; 2] | |
| hlp_yield_published | [[u64; 2]; 2] | [hLP target side][income side], after covering the funding gap. |
| hlp_capital_gross | [[u64; 2]; 2] | |
| hlp_capital_credit | [[u64; 2]; 2] |
ReferralBound
A referral partner was bound to a new debt side or leverage position.
Discriminator 0c1c989437d266be
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| position | pubkey | |
| owner | pubkey | |
| referrer | pubkey | |
| referral_partner | pubkey | |
| asset_mint | pubkey | |
| interest_share_bps | u16 | |
| metadata | MarketEventMetadata |
MarketEventMetadata
| Field | Type | Notes |
|---|---|---|
| signer | pubkey | |
| market | pubkey | |
| slot | u64 |
ReferralInterestAccrued
A referral entitlement from an interest payment; context only, never new borrower interest.
Discriminator 50e90b7b76da719a
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| position | pubkey | |
| owner | pubkey | |
| referrer | pubkey | |
| referral_partner | pubkey | |
| referral_accrual | pubkey | |
| asset_mint | pubkey | |
| interest_paid | u64 | |
| interest_vault_credit | u64 | |
| protocol_interest_revenue | u64 | |
| interest_share_bps | u16 | |
| accrued_amount | u64 | |
| metadata | MarketEventMetadata |
MarketEventMetadata
| Field | Type | Notes |
|---|---|---|
| signer | pubkey | |
| market | pubkey | |
| slot | u64 |
ReferralInterestClaimed
A partner claimed accrued interest to its recipient.
Discriminator 674f13c784de9cbe
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| referral_partner | pubkey | |
| referral_accrual | pubkey | |
| authority | pubkey | |
| recipient | pubkey | |
| asset_mint | pubkey | |
| vault_debit | u64 | |
| recipient_credit | u64 | |
| remaining_accrual | u64 | |
| metadata | MarketEventMetadata |
MarketEventMetadata
| Field | Type | Notes |
|---|---|---|
| signer | pubkey | |
| market | pubkey | |
| slot | u64 |
ReferralPartnerConfigured
A partner was listed, updated or deactivated.
Discriminator 3ce6f6e8431ed9df
| Field | Type | Notes |
|---|---|---|
| referral_partner | pubkey | |
| authority | pubkey | |
| recipient | pubkey | |
| interest_share_bps | u16 | |
| active | bool | |
| signer | pubkey |
ReferralRecipientUpdated
A partner changed its recipient wallet.
Discriminator 3304ddaf8608ebde
| Field | Type | Notes |
|---|---|---|
| referral_partner | pubkey | |
| authority | pubkey | |
| recipient | pubkey |
RetiredJuniorBurned
A holder burned jrLP from a retired cohort after preserving its historical income entitlement.
Discriminator 1d389e8961c1e65d
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| owner | pubkey | |
| mint | pubkey | |
| wallet_amount | u64 | |
| escrow_amount | u64 |
SwapExecuted
The canonical record of every AMM execution, with origin, trader, actor, amounts and fee components.
Discriminator 96a61ae11c59264f
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| trader | pubkey | Beneficial owner of the trade, including delegated leverage actions. |
| actor | pubkey | |
| position | Option<pubkey> | |
| origin | SwapOrigin | |
| slot | u64 | |
| asset_in_side | u8 | `0` for base input and `1` for quote input. |
| amount_in | u64 | AMM input before trading fees, after any input transfer fee. Includes internally borrowed principal; this is not the owner's wallet debit. |
| amount_out | u64 | AMM output after trading fees, before any output transfer fee. |
| gross_amount_out | u64 | Curve output before an output-denominated fee and transfer fee. |
| fee_asset_side | u8 | `0` for Base and `1` for Quote. |
| amount_in_after_fee | u64 | Input applied to the invariant after all swap fees. |
| base_fee | u64 | |
| divergence_fee | u64 | |
| volatility_fee | u64 | |
| retained_fee | u64 | Dynamic surcharge retained outside executable/srLP inventory until an admitted center move deploys it. |
| compounded_fee | u64 | LP-owned fee compounded into reserve principal. |
| hlp_recovery_target_asset | u8 | Extra output funded by deleveraging the stressed hLP. |
| hlp_recovery_funding_gap | u64 | |
| hlp_recovery_matched_input | u64 | |
| hlp_recovery_bonus_output | u64 | |
| hlp_recovery_discount_bps | u16 | |
| hlp_recovery_critical | bool | |
| base_live_reserve | u128 | Final executable reserves after retention and inline hLP correction. |
| quote_live_reserve | u128 | |
| srlp_supply | u64 | Internal srLP share supply after the swap. |
| start_price_nad | u64 | Base price used to quote this execution, after any deferred controller step. |
| base | MarketSideSnapshot | Each side's price, price EMA, and srLP growth indexes after the swap. |
| quote | MarketSideSnapshot |
SwapOrigin
| Variant | Fields |
|---|---|
| Spot | unit |
| LeverageOpen | unit |
| LeverageIncrease | unit |
| LeverageDecrease | unit |
| LeverageClose | unit |
| LeverageLiquidation | unit |
| CreditLiquidation | unit |
MarketSideSnapshot
| Field | Type | Notes |
|---|---|---|
| spot_price_nad | u64 | Marginal price at this post-swap state. A later controller step or market update can change it before another trade is quoted. |
| price_ema_nad | u64 | Symmetric risk EMA of the spot price. |
| swap_fee_growth_index_q64 | u128 | Per-srLP-share swap-fee growth, scaled by 2^64. |
| interest_growth_index_q64 | u128 | Per-srLP-share interest growth, scaled by 2^64. |
TrancheConverted
A holder entered junior, requested or exercised a noticed exit, or cancelled an exit back into jrLP.
Discriminator f979581b27b5f4c7
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| owner | pubkey | |
| action | u8 | |
| senior_amount | u64 | |
| junior_amount | u64 | |
| junior_fee | u64 | |
| ready_at | u64 | |
| expires_at | u64 |
YieldClaimed
A yield account paid its claimable balance; carries gross sources and net recipient credit.
Discriminator b1c95e4413c8e31b
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| owner | pubkey | |
| lp_mint | pubkey | |
| asset_mint | pubkey | |
| token_kind | u8 | |
| recipient | pubkey | |
| swap_fee_amount | u64 | |
| interest_amount | u64 | |
| recipient_credit | u64 | Total amount credited to the recipient after transfer fees. |
| metadata | MarketEventMetadata |
MarketEventMetadata
| Field | Type | Notes |
|---|---|---|
| signer | pubkey | |
| market | pubkey | |
| slot | u64 |
YieldRecipientUpdated
A yield account's recipient changed.
Discriminator 9a71194a0b6b72aa
| Field | Type | Notes |
|---|---|---|
| market | pubkey | |
| owner | pubkey | |
| lp_mint | pubkey | |
| asset_mint | pubkey | |
| token_kind | u8 | |
| recipient | pubkey | |
| metadata | MarketEventMetadata |
MarketEventMetadata
| Field | Type | Notes |
|---|---|---|
| signer | pubkey | |
| market | pubkey | |
| slot | u64 |