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.
- IDL
- dusk 2.0.0
- Instructions
- 80
- Accounts
- 16
- Events
- 59
- Errors
- 147
- Trade and liquiditySwapping and two-sided srLP liquidity, with their previews.
- LendingCollateral, borrowing, repayment and the capacity previews.
- LeverageIsolated positions: open, adjust, close, delegate and liquidate.
- hLP and yieldSingle-sided hLP vaults, yield accounts, harvesting and vault recovery.
- Liquidation and loss allocationAtomic external liquidation, emergency settlement and junior-first loss allocation.
- Market operators and protocol administrationMarket creation, parameter proposals, referrals and protocol administration.
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
| Constant | Value | Notes |
|---|---|---|
| BORROW_POSITION_SEED_PREFIX | "borrow_position_v2" | |
| BPS_DENOMINATOR | 10000 | Basis points in one; 10,000 is 100%. |
| DEFAULT_JUNIOR_INCOME_SHARE_BPS | 5000 | |
| DEFAULT_PROTOCOL_REVENUE_SHARE_BPS | 2000 | |
| FUTARCHY_AUTHORITY_SEED_PREFIX | "futarchy_authority" | |
| HLP_SRLP_VAULT_SEED_PREFIX | "hlp_ylp_vault" | |
| HLP_TERMINAL_CALLER_BPS | 50 | The caller bounty on a terminal hLP closeout. |
| JUNIOR_EXIT_FEE_BPS | 50 | |
| JUNIOR_MAX_NOTICE_SLOTS | 4320000 | |
| LEVERAGE_COLLATERAL_VAULT_SEED_PREFIX | "leverage_collateral" | |
| LEVERAGE_DELEGATION_SEED_PREFIX | "leverage_delegation_v2" | |
| LEVERAGE_MAX_MULTIPLIER_BPS | 200000 | The maximum notional over margin. |
| LEVERAGE_POSITION_SEED_PREFIX | "leverage_position_v2" | |
| LIQUIDATION_AUCTION_DURATION_SECONDS | 300 | How long a lending auction runs before the backstop opens. |
| LIQUIDATION_BACKSTOP_CALLER_BPS | 50 | The backstop caller's bounty on consumed collateral. |
| LIQUIDATION_CLOSE_FACTOR_BPS | 5000 | The largest share of a position one fill may repay. |
| LIQUIDATION_FEE_BPS | 300 | |
| LIQUIDATION_INCENTIVE_BPS | 100 | The filler's share of the penalty. |
| LIQUIDATION_MAX_INCENTIVE_BPS | 500 | |
| LTV_BUFFER_BPS | 500 | The borrow limit sits this far below the liquidation limit. |
| MARKET_COLLATERAL_VAULT_SEED_PREFIX | "market_collateral" | |
| MARKET_CREATION_FEE_LAMPORTS | 200000000 | The fee paid when a market is initialized. |
| MARKET_INTEREST_VAULT_SEED_PREFIX | "market_interest" | |
| MARKET_LAYOUT_VERSION | 14 | The account layout version this program writes. |
| MARKET_RESERVE_VAULT_SEED_PREFIX | "market_reserve" | |
| MARKET_V2_SEED_PREFIX | "market_v2" | |
| MAX_BORROW_HALF_LIFE_MS | 2592000000 | |
| MAX_COLLATERAL_FACTOR_BPS | 8500 | The highest liquidation collateral factor a position can be issued. |
| MAX_JUNIOR_INCOME_SHARE_BPS | 9000 | |
| MAX_OPERATOR_INTEREST_SHARE_BPS | 5000 | |
| MAX_PARAMETER_FEE_BPS | 5000 | The combined gross-input budget fee parameters may not exceed. |
| MAX_REFERRAL_INTEREST_SHARE_BPS | 10000 | The ceiling on a referral partner's share. |
| METADATA_SEED_PREFIX | "metadata" | |
| MIN_BORROW_HALF_LIFE_MS | 43200000 | |
| MIN_CONCENTRATION_RAMP_SLOTS | 432000 | |
| MIN_JUNIOR_INCOME_SHARE_BPS | 1000 | |
| MINIMUM_BORROW_APR_NAD | 10000000 | |
| NAD | 1000000000 | The fixed-point unit, 10⁹. |
| NAD_DECIMALS | 9 | |
| OPERATOR_EXECUTION_WINDOW_SLOTS | 3024000 | |
| OPERATOR_NOTICE_SLOTS | 4752000 | |
| OPERATOR_POLICY_VERSION | 2 | |
| PARAMETER_EXECUTION_MAX_UTILIZATION_BPS | 8000 | Execution 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_SLOT | 200 | Milliseconds per slot used to turn slots into time. |
| YIELD_ACCOUNT_SEED_PREFIX | "yield" |
Verifying the IDL
anchor idl fetch 2rYBVfGubUVbHrLeut6Dn4A9ShM695dGSPCErdsGo16Y --provider.cluster devnetCompare the canonical hash with the one on Addresses. The events, accounts and errors pages complete the reference; the leverage delegate has its own page.