Program overview

The Dusk program at a glance: program ID, IDL version, protocol constants and the instruction index.

Updated Sep 25, 2026

Everything on the reference pages is rendered from the IDL inside the pinned @omnipair/dusk-sdk package, with hand-written notes layered on. When the SDK is bumped the tables follow; a test fails the build if an instruction, account or event appears without a note.

Instructions

Instruction names are the program's snake_case names; the SDK exposes them in camelCase (addLiquidity for add_liquidity). Most instructions take a single args struct, expanded on each page.

Accounts marked PDA are derived from the listed seeds; accounts with a fixed address are the token programs. Every instruction that emits an event also takes the event authority and the program itself so it can emit by self-CPI.

Read-only previews (preview_*) are instructions too: simulate them and decode the typed return data with the SDK's decodePreview…ReturnData helpers or dusk.get.preview….

Constants

ConstantValueNotes
BORROW_POSITION_SEED_PREFIX"borrow_position_v2"
BPS_DENOMINATOR10000Basis points in one; 10,000 is 100%.
DEFAULT_JUNIOR_INCOME_SHARE_BPS5000
DEFAULT_PROTOCOL_REVENUE_SHARE_BPS2000
FUTARCHY_AUTHORITY_SEED_PREFIX"futarchy_authority"
HLP_SRLP_VAULT_SEED_PREFIX"hlp_ylp_vault"
HLP_TERMINAL_CALLER_BPS50The caller bounty on a terminal hLP closeout.
JUNIOR_EXIT_FEE_BPS50
JUNIOR_MAX_NOTICE_SLOTS4320000
LEVERAGE_COLLATERAL_VAULT_SEED_PREFIX"leverage_collateral"
LEVERAGE_DELEGATION_SEED_PREFIX"leverage_delegation_v2"
LEVERAGE_MAX_MULTIPLIER_BPS200000The maximum notional over margin.
LEVERAGE_POSITION_SEED_PREFIX"leverage_position_v2"
LIQUIDATION_AUCTION_DURATION_SECONDS300How long a lending auction runs before the backstop opens.
LIQUIDATION_BACKSTOP_CALLER_BPS50The backstop caller's bounty on consumed collateral.
LIQUIDATION_CLOSE_FACTOR_BPS5000The largest share of a position one fill may repay.
LIQUIDATION_FEE_BPS300
LIQUIDATION_INCENTIVE_BPS100The filler's share of the penalty.
LIQUIDATION_MAX_INCENTIVE_BPS500
LTV_BUFFER_BPS500The borrow limit sits this far below the liquidation limit.
MARKET_COLLATERAL_VAULT_SEED_PREFIX"market_collateral"
MARKET_CREATION_FEE_LAMPORTS200000000The fee paid when a market is initialized.
MARKET_INTEREST_VAULT_SEED_PREFIX"market_interest"
MARKET_LAYOUT_VERSION14The account layout version this program writes.
MARKET_RESERVE_VAULT_SEED_PREFIX"market_reserve"
MARKET_V2_SEED_PREFIX"market_v2"
MAX_BORROW_HALF_LIFE_MS2592000000
MAX_COLLATERAL_FACTOR_BPS8500The highest liquidation collateral factor a position can be issued.
MAX_JUNIOR_INCOME_SHARE_BPS9000
MAX_OPERATOR_INTEREST_SHARE_BPS5000
MAX_PARAMETER_FEE_BPS5000The combined gross-input budget fee parameters may not exceed.
MAX_REFERRAL_INTEREST_SHARE_BPS10000The ceiling on a referral partner's share.
METADATA_SEED_PREFIX"metadata"
MIN_BORROW_HALF_LIFE_MS43200000
MIN_CONCENTRATION_RAMP_SLOTS432000
MIN_JUNIOR_INCOME_SHARE_BPS1000
MINIMUM_BORROW_APR_NAD10000000
NAD1000000000The fixed-point unit, 10⁹.
NAD_DECIMALS9
OPERATOR_EXECUTION_WINDOW_SLOTS3024000
OPERATOR_NOTICE_SLOTS4752000
OPERATOR_POLICY_VERSION2
PARAMETER_EXECUTION_MAX_UTILIZATION_BPS8000Execution is blocked at or above this utilization on either side.
REFERRAL_ACCRUAL_SEED_PREFIX"referral_accrual"
REFERRAL_PARTNER_SEED_PREFIX"referral_partner"
TARGET_MS_PER_SLOT200Milliseconds per slot used to turn slots into time.
YIELD_ACCOUNT_SEED_PREFIX"yield"

Verifying the IDL

anchor idl fetch 2rYBVfGubUVbHrLeut6Dn4A9ShM695dGSPCErdsGo16Y --provider.cluster devnet

Compare the canonical hash with the one on Addresses. The events, accounts and errors pages complete the reference; the leverage delegate has its own page.