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

FieldTypeNotes
marketpubkey
asset_mintpubkey
asset_sideu8
from_slotu64
to_slotu64
borrow_index_before_nadu128
borrow_index_after_nadu128
credit_interestu128
margin_interestu128
hlp_interestu128

BorrowInterestPaid

A borrower paid accrued interest, including the amount distributed to recipients.

Discriminator adb5dbaa2058e0e0

FieldTypeNotes
marketpubkey
asset_mintpubkey
asset_sideu8
sourceDebtSource
positionOption<pubkey>None for aggregate hLP funding debt; `asset_side` identifies its vault.
interest_paidu64Gross interest collected, including any terminal hLP caller bounty.
interest_vault_creditu64Net tokens credited to the interest vault after transfer fees/bounty.
protocol_interest_revenueu64Protocol allocation from vault credit, before the referral allocation.
referral_amountu64
caller_bountyu64Gross terminal hLP caller bounty; zero for ordinary payments.
slotu64
DebtSource
VariantFields
Creditunit
Marginunit
Hlpunit

BorrowPositionLiquidated

Legacy event retained in the interface schema; the current liquidation flow does not emit it.

Discriminator 6ba71a1921c56abc

FieldTypeNotes
marketpubkey
borrow_positionpubkey
borrowerpubkey
liquidatorpubkey
debt_asset_sideu8`0` for base debt and `1` for quote debt. The collateral is the other side.
repaid_amountu64
collateral_seizedu64
collateral_to_liquidatoru64Gross collateral debited for the liquidator's transfer. Token-2022 may reduce the liquidator's net account credit.
collateral_creditu64Net collateral credited to the liquidator after any transfer fee.
socialized_lossu64
remaining_debtu128
base_collateralu64The position's state after the liquidation.
quote_collateralu64
fixed_base_sharesu128
fixed_quote_sharesu128
global_health_base_contribution_for_quote_debtu64
global_health_quote_contribution_for_base_debtu64
base_liquidation_cf_bpsu16
quote_liquidation_cf_bpsu16
auction_debt_assetu8`255` once the auction is cleared.
closedboolThe liquidation emptied the position and closed its account.

DebtFreePositionClosed

A fully repaid borrow or leverage position returned its remaining collateral and closed.

Discriminator dcc6e096cc41b81f

FieldTypeNotes
marketpubkey
positionpubkey
ownerpubkey
leveragebool
base_receivedu64
quote_receivedu64
metadataMarketEventMetadata
MarketEventMetadata
FieldTypeNotes
signerpubkey
marketpubkey
slotu64

EmergencyLiquidationSettled

An internal EMA-and-smoothed-depth liquidation fallback completed and recorded its recovery waterfall.

Discriminator f3e68254b87112ac

FieldTypeNotes
marketpubkey
positionpubkey
ownerpubkey
callerpubkey
leveragebool
debt_assetu8
quoteEmergencyLiquidationQuote
remaining_collateralu64
remaining_debtu64
position_stateLiquidationPositionStateComplete post-settlement position state for event-only indexers.
EmergencyLiquidationQuote
FieldTypeNotes
reference_price_nadu64Symmetric collateral-price EMA (debt per collateral, NAD), not live spot.
reference_depth_nadu128Smoothed total active curve depth used only for settlement sizing.
fullbool
collateral_debitu64
collateral_creditu64
swap_outputu64
repaymentu64
shares_to_burnu128
reward_creditu64
reward_debitu64
feeLiquidationFeeAllocation
junior_fee_debitu64
revenue_fee_debitu64
owner_debitu64
owner_creditu64
lossLiquidationLossAllocation
health_beforeLiquidationHealth
health_afterLiquidationHealth
ratesLiquidationRates
LiquidationFeeAllocation
FieldTypeNotes
totalu64
protocolu64
junioru64
LiquidationLossAllocation
FieldTypeNotes
principal_repaidu64
interest_paidu64
principal_written_offu64
interest_canceledu64
surplusu64
LiquidationHealth
FieldTypeNotes
collateral_valueu64
debtu64
maintenance_bpsu16
LiquidationRates
FieldTypeNotes
buyer_discount_bpsu16
emergency_reward_bpsu16
LiquidationPositionState
FieldTypeNotes
ownerpubkey
base_collateralu64
quote_collateralu64
fixed_base_sharesu128
fixed_quote_sharesu128
global_health_base_contribution_for_quote_debtu64
global_health_quote_contribution_for_base_debtu64
base_liquidation_cf_bpsu16
quote_liquidation_cf_bpsu16
leverage_collateral_amountu64
leverage_debt_sharesu128
closedbool

FlashLiquidationBegun

Collateral was released into an atomic borrow or leverage liquidation session with a fixed payment obligation.

Discriminator c6fa75b84a303097

FieldTypeNotes
marketpubkey
positionpubkey
sessionpubkey
buyerpubkey
debt_assetu8
quoteFlashLiquidationQuote
FlashLiquidationQuote
FieldTypeNotes
fullbool
collateral_debitu64
collateral_creditu64
paymentu64Bound net spendable payment before distribution, including repayment, liquidation fee and any full-purchase proceeds belonging to the owner.
repaymentu64
owner_surplusu64
feeLiquidationFeeAllocation
debt_shares_to_burnu128
health_beforeLiquidationHealth
health_afterLiquidationHealth
ratesLiquidationRates
LiquidationFeeAllocation
FieldTypeNotes
totalu64
protocolu64
junioru64
LiquidationHealth
FieldTypeNotes
collateral_valueu64
debtu64
maintenance_bpsu16
LiquidationRates
FieldTypeNotes
buyer_discount_bpsu16
emergency_reward_bpsu16

FlashLiquidationSettled

An atomic borrow or leverage liquidation payment was verified and applied.

Discriminator cfcb8963ebedcf26

FieldTypeNotes
marketpubkey
positionpubkey
buyerpubkey
leveragebool
debt_assetu8
collateral_debitu64
debt_repaidu64
owner_surplusu64
feeLiquidationFeeAllocation
lossLiquidationLossAllocation
remaining_collateralu64
remaining_debtu64
position_stateLiquidationPositionStateComplete post-settlement position state for event-only indexers.
LiquidationFeeAllocation
FieldTypeNotes
totalu64
protocolu64
junioru64
LiquidationLossAllocation
FieldTypeNotes
principal_repaidu64
interest_paidu64
principal_written_offu64
interest_canceledu64
surplusu64
LiquidationPositionState
FieldTypeNotes
ownerpubkey
base_collateralu64
quote_collateralu64
fixed_base_sharesu128
fixed_quote_sharesu128
global_health_base_contribution_for_quote_debtu64
global_health_quote_contribution_for_base_debtu64
base_liquidation_cf_bpsu16
quote_liquidation_cf_bpsu16
leverage_collateral_amountu64
leverage_debt_sharesu128
closedbool

HarvestAuthorityUpdated

A harvest authority was set, rotated or revoked on a yield account.

Discriminator e8121509e5e6ad56

FieldTypeNotes
marketpubkey
ownerpubkey
lp_mintpubkey
asset_mintpubkey
token_kindu8
harvest_authorityOption<pubkey>
metadataMarketEventMetadata
MarketEventMetadata
FieldTypeNotes
signerpubkey
marketpubkey
slotu64

HlpClosed

hLP shares were burned; records the net owner credit.

Discriminator 577e98a4a2cb6feb

FieldTypeNotes
marketpubkey
ownerpubkey
asset_sideu8`0` for base hLP and `1` for quote hLP.
hlp_amountu64
srlp_amountu64
amount_outu64Amount credited to the owner after any output transfer fee.
debt_repaidu64
interest_paidu64
srlp_supplyu64
hlp_supplyu64
base_live_reserveu128
quote_live_reserveu128

HlpCohortRotated

A terminal hLP receipt mint was retired and a fresh deposit cohort became active.

Discriminator 2e860d39752ce251

FieldTypeNotes
marketpubkey
target_assetu8
retired_mintpubkey
new_mintpubkey
retired_supplyu64

HlpFlashSettled

An atomic hLP recovery payment was verified and its hedge change applied.

Discriminator ffc1398a30408a25

FieldTypeNotes
marketpubkey
buyerpubkey
quoteHlpFlashQuote
base_hlp_srlp_mintedu64Internal 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_burnedu64
quote_hlp_srlp_mintedu64
quote_hlp_srlp_burnedu64
funding_interest_paid[u64; 2]
lossLiquidationLossAllocation
surplus_creditu64
HlpFlashQuote
FieldTypeNotes
target_assetu8
collateral_debitu64
collateral_creditu64
borrowed_claimu64Borrowed-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.
paymentu64Spendable atoms required in the session's payment vault; includes the transfer fee from that vault to the market reserve.
reserve_creditu64
discount_bpsu16
fullbool
LiquidationLossAllocation
FieldTypeNotes
principal_repaidu64
interest_paidu64
principal_written_offu64
interest_canceledu64
surplusu64

HlpFlashStarted

Target collateral was released into an atomic hLP recovery session with a fixed payment obligation.

Discriminator cb61f9bbe2778d47

FieldTypeNotes
marketpubkey
buyerpubkey
quoteHlpFlashQuote
HlpFlashQuote
FieldTypeNotes
target_assetu8
collateral_debitu64
collateral_creditu64
borrowed_claimu64Borrowed-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.
paymentu64Spendable atoms required in the session's payment vault; includes the transfer fee from that vault to the market reserve.
reserve_creditu64
discount_bpsu16
fullbool

HlpInterestAllocated

Funded interest first covered an hLP funding gap and published the remaining holder yield.

Discriminator 0cae1073f3858331

FieldTypeNotes
marketpubkey
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

FieldTypeNotes
marketpubkey
ownerpubkey
asset_sideu8`0` for base hLP and `1` for quote hLP.
deposit_amountu64Net reserve-vault credit after any input transfer fee.
borrowed_amountu64
srlp_amountu64
hlp_amountu64
srlp_supplyu64
hlp_supplyu64
base_live_reserveu128
quote_live_reserveu128

HlpRebalanced

A vault-wide hedge adjustment changed the hLP vault's srLP shares and funding debt.

Discriminator 30ed76b130a86806

FieldTypeNotes
marketpubkey
slotu64
base_hlp_srlp_mintedu64
base_hlp_srlp_burnedu64
quote_hlp_srlp_mintedu64
quote_hlp_srlp_burnedu64
base_hlp_srlp_shares_afteru64
quote_hlp_srlp_shares_afteru64
srlp_supply_afteru64
base_hlp_debt_increaseu64Quote-token debt of the base-target hLP.
base_hlp_debt_decreaseu64
base_hlp_debt_afteru64
quote_hlp_debt_increaseu64Base-token debt of the quote-target hLP.
quote_hlp_debt_decreaseu64
quote_hlp_debt_afteru64
base_hlp_funding_interest_paidu64Gross quote tokens paid from reserve cash to the interest vault.
quote_hlp_funding_interest_paidu64Gross 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

FieldTypeNotes
marketpubkey
ownerpubkey
mintpubkey
amountu64
remaining_supplyu64

HlpTerminalLiquidated

A vault exhausted by funding interest was closed out, with junior/senior loss socialization and caller bounty.

Discriminator 50baedd44bb72bad

FieldTypeNotes
marketpubkey
callerpubkey
target_assetu8
debt_closedu64
srlp_burnedu64
interest_paidu64Borrowed-asset funding interest credited to srLP after caller bounty and transfer fees.
caller_bountyu64Borrowed-asset amount credited to the caller after transfer fees.
socialized_lossu64Residual funded principal loss. Unpaid interest is reported separately.
interest_canceledu64
remaining_hlp_supplyu64Existing 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

FieldTypeNotes
marketpubkey
mintpubkey
generationu64
previous_mintpubkey

JuniorSeedCompounded

The permanent junior seed compounded earned income into its first-loss claim.

Discriminator fde97cb24362e057

FieldTypeNotes
marketpubkey
base_amountu64
quote_amountu64
reserve_sharesu64

JuniorSeedFunded

The permanent junior seed's collected interest moved into reserve fee custody, ready to compound.

Discriminator 7b691220095c78b8

FieldTypeNotes
marketpubkey
assetpubkey
interest_debitu64
reserve_creditu64

LeverageDelegationUpdated

A delegation was created, updated or closed.

Discriminator 7629eb5f5b18bf11

FieldTypeNotes
marketpubkey
delegationpubkey
positionpubkey
ownerpubkey
delegated_programpubkey
approved_actionsu32
metadataMarketEventMetadata
MarketEventMetadata
FieldTypeNotes
signerpubkey
marketpubkey
slotu64

LeveragePositionClosed

A position was fully closed by its owner or through a delegated order.

Discriminator 84097c6706fcb1ee

FieldTypeNotes
marketpubkey
positionpubkey
ownerpubkey
debt_asset_mintpubkey
collateral_asset_mintpubkey
debt_repaidu64
interest_paidu64
collateral_soldu64
closeout_valueu64
residualu64
swapLeverageSwapReceipt
metadataMarketEventMetadata
LeverageSwapReceipt
FieldTypeNotes
asset_in_sideu8
fee_asset_sideu8
amount_inu64
amount_outu64
gross_amount_outu64
amount_in_after_feeu64
base_feeu64
divergence_feeu64
volatility_feeu64
retained_feeu64
compounded_feeu64
claimable_fee_creditu64Actual reserve-vault credit after any Token-2022 transfer fee.
base_live_reserveu128Final executable reserves after retention and inline hLP correction.
quote_live_reserveu128
MarketEventMetadata
FieldTypeNotes
signerpubkey
marketpubkey
slotu64

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

FieldTypeNotes
marketpubkey
positionpubkey
ownerpubkey
liquidatorpubkey
debt_asset_mintpubkey
collateral_asset_mintpubkey
debt_repaidu64
socialized_lossu64
interest_paidu64
principal_written_offu64
collateral_soldu64
closeout_valueu64
liquidator_amountu64
owner_residualu64
swapLeverageSwapReceipt
metadataMarketEventMetadata
LeverageSwapReceipt
FieldTypeNotes
asset_in_sideu8
fee_asset_sideu8
amount_inu64
amount_outu64
gross_amount_outu64
amount_in_after_feeu64
base_feeu64
divergence_feeu64
volatility_feeu64
retained_feeu64
compounded_feeu64
claimable_fee_creditu64Actual reserve-vault credit after any Token-2022 transfer fee.
base_live_reserveu128Final executable reserves after retention and inline hLP correction.
quote_live_reserveu128
MarketEventMetadata
FieldTypeNotes
signerpubkey
marketpubkey
slotu64

LeveragePositionOpened

A position was opened; the embedded swap receipt repeats SwapExecuted for context.

Discriminator c6e3366336f9361d

FieldTypeNotes
marketpubkey
positionpubkey
ownerpubkey
debt_asset_mintpubkey
collateral_asset_mintpubkey
margin_amountu64
borrowed_amountu64
debt_amountu64
debt_sharesu128
collateral_amountu64
margin_termsLeverageMarginTerms
closeout_valueu64
equityu64
multiplier_bpsu64
swapLeverageSwapReceipt
metadataMarketEventMetadata
LeverageMarginTerms
FieldTypeNotes
reference_collateralu64
maintenance_boundaries_bps[u16; 2]
maintenance_rates_bps[u16; 3]
entry_buffer_bpsu16
admission_equity_collateral_nadu128Collateral atoms times NAD, not a fixed debt-token or dollar amount. Retained on equity extraction; released proportionally on size reduction.
LeverageSwapReceipt
FieldTypeNotes
asset_in_sideu8
fee_asset_sideu8
amount_inu64
amount_outu64
gross_amount_outu64
amount_in_after_feeu64
base_feeu64
divergence_feeu64
volatility_feeu64
retained_feeu64
compounded_feeu64
claimable_fee_creditu64Actual reserve-vault credit after any Token-2022 transfer fee.
base_live_reserveu128Final executable reserves after retention and inline hLP correction.
quote_live_reserveu128
MarketEventMetadata
FieldTypeNotes
signerpubkey
marketpubkey
slotu64

LeveragePositionUpdated

Exposure or margin changed; includes interest_paid for decreases, partial closes and margin repayments.

Discriminator c3abf52b20a32caa

FieldTypeNotes
marketpubkey
positionpubkey
ownerpubkey
debt_asset_mintpubkey
collateral_asset_mintpubkey
owner_debitu64Gross debt-token payment from the wallet, including any transfer fee.
borrowed_amountu64
debt_deltai128
collateral_deltai128
debt_amountu64
debt_sharesu128
collateral_amountu64
margin_termsLeverageMarginTerms
closeout_valueu64Executable closeout quote, or zero when unquoted by repayment or an operation leaving debt-free collateral. Zero is not a collateral valuation.
owner_creditu64Net tokens paid to the owner by this update, if any.
interest_paidu64Interest actually repaid by this action, in debt-token atoms.
swapOption<LeverageSwapReceipt>
metadataMarketEventMetadata
LeverageMarginTerms
FieldTypeNotes
reference_collateralu64
maintenance_boundaries_bps[u16; 2]
maintenance_rates_bps[u16; 3]
entry_buffer_bpsu16
admission_equity_collateral_nadu128Collateral atoms times NAD, not a fixed debt-token or dollar amount. Retained on equity extraction; released proportionally on size reduction.
LeverageSwapReceipt
FieldTypeNotes
asset_in_sideu8
fee_asset_sideu8
amount_inu64
amount_outu64
gross_amount_outu64
amount_in_after_feeu64
base_feeu64
divergence_feeu64
volatility_feeu64
retained_feeu64
compounded_feeu64
claimable_fee_creditu64Actual reserve-vault credit after any Token-2022 transfer fee.
base_live_reserveu128Final executable reserves after retention and inline hLP correction.
quote_live_reserveu128
MarketEventMetadata
FieldTypeNotes
signerpubkey
marketpubkey
slotu64

LiquidationAuctionCancelled

Legacy event retained in the interface schema; the current devnet liquidation flow does not start lending auctions.

Discriminator 7a67aee17895ba9b

FieldTypeNotes
marketpubkey
positionpubkey
ownerpubkey
debt_asset_sideu8Debt 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

FieldTypeNotes
marketpubkey
positionpubkey
ownerpubkey
auction_debt_assetu8`0` for base debt and `1` for quote debt.
auction_start_timei64
auction_start_price_nadu64
auction_floor_price_nadu64

LiquidityAdded

srLP was minted against a two-sided deposit.

Discriminator 9a1add6cee40d9a1

FieldTypeNotes
marketpubkey
ownerpubkey
base_reserve_creditu64
quote_reserve_creditu64
srlp_amountu64
srlp_supplyu64
base_live_reserveu128
quote_live_reserveu128
metadataMarketEventMetadata
MarketEventMetadata
FieldTypeNotes
signerpubkey
marketpubkey
slotu64

LiquidityRemoved

srLP was burned for both assets.

Discriminator e169d8277c74a9bd

FieldTypeNotes
marketpubkey
ownerpubkey
srlp_amountu64
base_reserve_debitu64Gross amounts debited from the reserve vaults.
quote_reserve_debitu64
base_owner_creditu64Net amounts credited to the owner after any Token-2022 transfer fee.
quote_owner_creditu64
srlp_supplyu64
base_live_reserveu128
quote_live_reserveu128
metadataMarketEventMetadata
MarketEventMetadata
FieldTypeNotes
signerpubkey
marketpubkey
slotu64

LpTransferred

srLP changed owner through its transfer hook.

Discriminator f4045db97d9f4b37

FieldTypeNotes
marketpubkey
lp_mintpubkey
token_kindu8`0` for srLP and `1` for hLP.
source_ownerpubkey
destination_ownerpubkey
amountu64

ManagerChanged

The market’s optional parameter manager changed; removal is immediate.

Discriminator 8e61afdc491bfc38

FieldTypeNotes
marketpubkey
managerpubkey

MarketCollateralDeposited

Collateral entered a borrow position.

Discriminator 29359dacf99f3f3c

FieldTypeNotes
marketpubkey
ownerpubkey
asset_mintpubkey
collateral_creditu64
base_collateralu64
quote_collateralu64
global_health_base_contribution_for_quote_debtu64
global_health_quote_contribution_for_base_debtu64
base_liquidation_cf_bpsu16
quote_liquidation_cf_bpsu16
metadataMarketEventMetadata
positionpubkeyBorrow position written by this deposit; the first deposit creates it.
position_idpubkey
auction_debt_assetu8Post-deposit auction side, `255` when none is active. A deposit that restores health cancels an active auction.
MarketEventMetadata
FieldTypeNotes
signerpubkey
marketpubkey
slotu64

MarketCollateralWithdrawn

Collateral left a borrow position.

Discriminator 44d0a2842797ddf5

FieldTypeNotes
marketpubkey
ownerpubkey
asset_mintpubkey
collateral_debitu64
asset_creditu64
base_collateralu64
quote_collateralu64
global_health_base_contribution_for_quote_debtu64
global_health_quote_contribution_for_base_debtu64
base_liquidation_cf_bpsu16
quote_liquidation_cf_bpsu16
metadataMarketEventMetadata
positionpubkey
closedboolThe withdrawal emptied the position and closed its account.
MarketEventMetadata
FieldTypeNotes
signerpubkey
marketpubkey
slotu64

MarketCreated

A market was initialized with its configuration.

Discriminator 58b882e7e254063a

FieldTypeNotes
marketpubkey
base_mintpubkey
quote_mintpubkey
srlp_mintpubkey
base_collateral_vaultpubkey
quote_collateral_vaultpubkey
base_hlp_mintpubkey
quote_hlp_mintpubkey
target_hlp_leverage_bpsu16
swap_fee_bpsu16
configMarketConfig
operatorpubkey
operator_revenue_recipientpubkey
operator_interest_share_bpsu16
protocol_interest_markup_bpsu16
oracleOraclePolicyInitial policy; an empty policy identifies an oracleless launch.
params_hash[u8; 32]
initial_liquidity_authoritypubkey
launch_reference_price_nadu64
launch_fee_progress_offsetu16
versionu8
metadataMarketEventMetadata
base_decimalsu8Asset mint decimals, which scale every price and amount of the market.
quote_decimalsu8
MarketConfig
FieldTypeNotes
swap_fee_bpsu16
divergence_fee_share_cap_bpsu16
volatility_fee_share_cap_bpsu16
target_hlp_leverage_bpsu16
settlement_divergence_bpsu16
ema_half_life_msu64
directional_ema_half_life_msu64
curve_depth_ema_half_life_msu64
max_daily_borrow_bpsu16
global_health_contribution_cap_bpsu16
borrow_market_health_floor_bpsu16
ammAmmConfig
irmRiskRateConfig
start_timei64
AmmConfig
FieldTypeNotes
peak_amplification_nadu64
core_half_width_bpsu16
fade_width_bpsu16
center_ema_half_life_msu64
volatility_half_life_msu64
adjustment_step_nadu64
volatility_shock_cap_nadu64
volatility_cap_nadu64
divergence_fee_coefficient_nadu64
volatility_fee_coefficient_nadu64
swap_fee_collect_modeu8Asset 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_bpsu16Share 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_bpsu16Optional launch-only base fee. The premium above `swap_fee_bps` decays from `start_time` and is zero after the configured duration.
launch_fee_duration_secondsu64
launch_fee_decay_modeu8
launch_market_price_step_bpsu16When 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_periodsu16
launch_market_reduction_factor_bpsu16
launch_rate_limit_assetu8Optional 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_nadu64
launch_rate_limit_increment_bpsu16
launch_rate_limit_max_fee_bpsu16
launch_rate_limit_duration_secondsu64
reserved[u8; 0]
RiskRateConfig
FieldTypeNotes
lower_signal_nadu64
upper_signal_nadu64
lower_utilization_bpsu16
upper_utilization_bpsu16
half_life_msu64
initial_apr_nadu64
OraclePolicy
FieldTypeNotes
formatu8
providerpubkey
base_accountpubkey
quote_accountpubkey
base_feed_id[u8; 32]
quote_feed_id[u8; 32]
lambda_bpsu16
adjustment_cap_nadu64
max_age_secondsu32
max_age_slotsu64
max_confidence_bpsu16
max_publish_skew_secondsu32
MarketEventMetadata
FieldTypeNotes
signerpubkey
marketpubkey
slotu64

MarketDebtUpdated

Public debt changed; cash_debit on borrow is principal leaving the pool, the canonical credit-origination number.

Discriminator 87966da5ae23a397

FieldTypeNotes
marketpubkey
positionpubkey
ownerpubkey
debt_asset_mintpubkey
debt_deltai128
cash_debitu64Gross source-account debit and net destination-account credit.
cash_creditu64
interest_paidu64
fixed_base_debtu128Market-wide fixed debt after the update, not this position's debt.
fixed_quote_debtu128
global_health_base_contribution_for_quote_debtu64
global_health_quote_contribution_for_base_debtu64
base_liquidation_cf_bpsu16
quote_liquidation_cf_bpsu16
base_debt_health_bpsu64
quote_debt_health_bpsu64
metadataMarketEventMetadata
fixed_base_sharesu128The position's fixed debt shares after the update.
fixed_quote_sharesu128
auction_debt_assetu8Post-update auction side, `255` when none is active. A repayment that restores health cancels an active auction.
MarketEventMetadata
FieldTypeNotes
signerpubkey
marketpubkey
slotu64

MarketHealthUpdated

The market's health measure was recomputed, for example after a borrow, a repayment or a collateral withdrawal.

Discriminator 630ce62b85c2bce1

FieldTypeNotes
marketpubkey
global_health_base_contribution_for_quote_debtu64
global_health_quote_contribution_for_base_debtu64
effective_base_debt_nadu128
effective_quote_debt_nadu128
base_debt_health_bpsu64
quote_debt_health_bpsu64
metadataMarketEventMetadata
MarketEventMetadata
FieldTypeNotes
signerpubkey
marketpubkey
slotu64

MarketReduceOnlyUpdated

A market entered or left reduce-only mode.

Discriminator 570c688f71791f5e

FieldTypeNotes
marketpubkey
reduce_onlybool
metadataMarketEventMetadata
MarketEventMetadata
FieldTypeNotes
signerpubkey
marketpubkey
slotu64

OperatorChangeAnnounced

A committed operator bundle received its full notice and execution window.

Discriminator 89e7474f7f3adde0

FieldTypeNotes
marketpubkey
proposalpubkey
operatorpubkey
nonceu64
digest[u8; 32]
execute_after_slotu64
deadline_slotu64
epochu64
policy_versionu64
updatesVec<MarketParameterUpdate>
next_operatorOption<pubkey>
next_managerOption<pubkey>
revenue_recipientOption<pubkey>
interest_share_bpsOption<u16>
metadataProposalMetadataV1
family_revisions[u64; 7]
MarketParameterUpdate
VariantFields
FeeFeeProfile
Concentrationpeak_amplification_nad: u64, core_half_width_bps: u16, fade_width_bps: u16, ramp_duration_slots: u64
IrmRiskRateUpdate
EmaHalfLivesprice_ms: u64, directional_price_ms: u64, curve_depth_ms: u64, center_price_ms: u64
DailyBorrowLimitmax_daily_borrow_bps: u16
CenterControlleradjustment_step_nad: u64
Tranchejunior_income_share_bps: u16
ProposalMetadataV1
FieldTypeNotes
versionu8
titlestring
description_uristring
description_sha256[u8; 32]
description_lenu32

OperatorChanged

Market ownership, revenue terms or operator settings changed after full notice.

Discriminator e74f3ee2be8bb033

FieldTypeNotes
marketpubkey
operatorpubkey
epochu64

OperatorChangeResolved

An operator bundle was cancelled or closed and its recorded rent payer refunded.

Discriminator 93c8fd03e4c475c9

FieldTypeNotes
marketpubkey
proposalpubkey
executedbool

OperatorRevenueClaimed

Collected operator interest was paid to its recorded current or historical recipient.

Discriminator bbb1c7c7dc57594a

FieldTypeNotes
marketpubkey
recipientpubkey
revenue_epochu64
asset_mintpubkey
gross_debitu64
net_creditu64

ProtocolAuctionConfigUpdated

Protocol auction parameters changed.

Discriminator b2a9d745aa3b50a0

FieldTypeNotes
authoritypubkey
laneu8
accepted_mintpubkey
start_multiplier_bpsu16
floor_multiplier_bpsu16
duration_slotsu64
max_reference_age_slotsu64
signerpubkey

ProtocolAuctionRecipientsUpdated

Protocol auction proceeds recipients changed.

Discriminator aeb237789bf10578

FieldTypeNotes
authoritypubkey
laneu8
treasurypubkey
staking_vaultpubkey
treasury_bpsu16
staking_vault_bpsu16
signerpubkey

ProtocolAuctionRouteUpdated

A market's protocol auction route changed.

Discriminator 92885e572493ddc0

FieldTypeNotes
authoritypubkey
marketpubkey
laneu8
sideu8
sold_mintpubkey
accepted_mintpubkey
reference_marketpubkey`Pubkey::default()` restores the direct-market-only policy.
signerpubkey

ProtocolAuctionSettled

Protocol revenue was sold from one lane and source; not a second collection of borrower interest.

Discriminator 0be6c7f51c856b03

FieldTypeNotes
marketpubkey
reference_marketpubkey
laneu8
sourceu8
sideu8
bidderpubkey
sold_mintpubkey
accepted_mintpubkey
sold_amountu64
payment_amountu64
treasury_amountu64
staking_vault_amountu64
reference_price_nadu64
auction_price_nadu64
remaining_fee_liabilityu64
remaining_buyback_liabilityu64
metadataMarketEventMetadata
MarketEventMetadata
FieldTypeNotes
signerpubkey
marketpubkey
slotu64

ProtocolAuctionSplitUpdated

The split of auction proceeds between recipients changed.

Discriminator 11ff4ef27f6eeaf9

FieldTypeNotes
authoritypubkey
fee_auction_bpsu16
buyback_auction_bpsu16
signerpubkey

ProtocolInterestMarkupCheckpointed

A market checkpoint activated the current global protocol interest markup for future accrual.

Discriminator a484b117ba2bc827

FieldTypeNotes
marketpubkey
previous_bpsu16
markup_bpsu16
slotu64

PublicInterestFunded

Available market cash funded previously accrued public LP interest without changing swap reserves.

Discriminator 223752e02a079a9c

FieldTypeNotes
marketpubkey
callerpubkey
receiptFundInterestReceipt
FundInterestReceipt
FieldTypeNotes
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

FieldTypeNotes
marketpubkey
positionpubkey
ownerpubkey
referrerpubkey
referral_partnerpubkey
asset_mintpubkey
interest_share_bpsu16
metadataMarketEventMetadata
MarketEventMetadata
FieldTypeNotes
signerpubkey
marketpubkey
slotu64

ReferralInterestAccrued

A referral entitlement from an interest payment; context only, never new borrower interest.

Discriminator 50e90b7b76da719a

FieldTypeNotes
marketpubkey
positionpubkey
ownerpubkey
referrerpubkey
referral_partnerpubkey
referral_accrualpubkey
asset_mintpubkey
interest_paidu64
interest_vault_creditu64
protocol_interest_revenueu64
interest_share_bpsu16
accrued_amountu64
metadataMarketEventMetadata
MarketEventMetadata
FieldTypeNotes
signerpubkey
marketpubkey
slotu64

ReferralInterestClaimed

A partner claimed accrued interest to its recipient.

Discriminator 674f13c784de9cbe

FieldTypeNotes
marketpubkey
referral_partnerpubkey
referral_accrualpubkey
authoritypubkey
recipientpubkey
asset_mintpubkey
vault_debitu64
recipient_creditu64
remaining_accrualu64
metadataMarketEventMetadata
MarketEventMetadata
FieldTypeNotes
signerpubkey
marketpubkey
slotu64

ReferralInterestShareCapUpdated

The maximum referral share changed.

Discriminator 678b70f5d4355b71

FieldTypeNotes
authoritypubkey
max_referral_interest_share_bpsu16
signerpubkey

ReferralPartnerConfigured

A partner was listed, updated or deactivated.

Discriminator 3ce6f6e8431ed9df

FieldTypeNotes
referral_partnerpubkey
authoritypubkey
recipientpubkey
interest_share_bpsu16
activebool
signerpubkey

ReferralRecipientUpdated

A partner changed its recipient wallet.

Discriminator 3304ddaf8608ebde

FieldTypeNotes
referral_partnerpubkey
authoritypubkey
recipientpubkey

RetiredJuniorBurned

A holder burned jrLP from a retired cohort after preserving its historical income entitlement.

Discriminator 1d389e8961c1e65d

FieldTypeNotes
marketpubkey
ownerpubkey
mintpubkey
wallet_amountu64
escrow_amountu64

SwapExecuted

The canonical record of every AMM execution, with origin, trader, actor, amounts and fee components.

Discriminator 96a61ae11c59264f

FieldTypeNotes
marketpubkey
traderpubkeyBeneficial owner of the trade, including delegated leverage actions.
actorpubkey
positionOption<pubkey>
originSwapOrigin
slotu64
asset_in_sideu8`0` for base input and `1` for quote input.
amount_inu64AMM input before trading fees, after any input transfer fee. Includes internally borrowed principal; this is not the owner's wallet debit.
amount_outu64AMM output after trading fees, before any output transfer fee.
gross_amount_outu64Curve output before an output-denominated fee and transfer fee.
fee_asset_sideu8`0` for Base and `1` for Quote.
amount_in_after_feeu64Input applied to the invariant after all swap fees.
base_feeu64
divergence_feeu64
volatility_feeu64
retained_feeu64Dynamic surcharge retained outside executable/srLP inventory until an admitted center move deploys it.
compounded_feeu64LP-owned fee compounded into reserve principal.
hlp_recovery_target_assetu8Extra output funded by deleveraging the stressed hLP.
hlp_recovery_funding_gapu64
hlp_recovery_matched_inputu64
hlp_recovery_bonus_outputu64
hlp_recovery_discount_bpsu16
hlp_recovery_criticalbool
base_live_reserveu128Final executable reserves after retention and inline hLP correction.
quote_live_reserveu128
srlp_supplyu64Internal srLP share supply after the swap.
start_price_nadu64Base price used to quote this execution, after any deferred controller step.
baseMarketSideSnapshotEach side's price, price EMA, and srLP growth indexes after the swap.
quoteMarketSideSnapshot
SwapOrigin
VariantFields
Spotunit
LeverageOpenunit
LeverageIncreaseunit
LeverageDecreaseunit
LeverageCloseunit
LeverageLiquidationunit
CreditLiquidationunit
MarketSideSnapshot
FieldTypeNotes
spot_price_nadu64Marginal price at this post-swap state. A later controller step or market update can change it before another trade is quoted.
price_ema_nadu64Symmetric risk EMA of the spot price.
swap_fee_growth_index_q64u128Per-srLP-share swap-fee growth, scaled by 2^64.
interest_growth_index_q64u128Per-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

FieldTypeNotes
marketpubkey
ownerpubkey
actionu8
senior_amountu64
junior_amountu64
junior_feeu64
ready_atu64
expires_atu64

YieldClaimed

A yield account paid its claimable balance; carries gross sources and net recipient credit.

Discriminator b1c95e4413c8e31b

FieldTypeNotes
marketpubkey
ownerpubkey
lp_mintpubkey
asset_mintpubkey
token_kindu8
recipientpubkey
swap_fee_amountu64
interest_amountu64
recipient_creditu64Total amount credited to the recipient after transfer fees.
metadataMarketEventMetadata
MarketEventMetadata
FieldTypeNotes
signerpubkey
marketpubkey
slotu64

YieldRecipientUpdated

A yield account's recipient changed.

Discriminator 9a71194a0b6b72aa

FieldTypeNotes
marketpubkey
ownerpubkey
lp_mintpubkey
asset_mintpubkey
token_kindu8
recipientpubkey
metadataMarketEventMetadata
MarketEventMetadata
FieldTypeNotes
signerpubkey
marketpubkey
slotu64