Coffer Docs
Technical

Pool Parameters

Fields, units, validation, and update authorities

Match this reference to your program version. Authorities below mean the pool admin or protocol admin.

Creation and identity

FieldRule
configFixed parent config; pool PDA seed
pool_idFixed creator-selected u64 salt
Token mints/order2–10 unique mints; fixed
token_programMint owner at creation; stored for validation
Token decimalsFrom mint; maximum 18
Initial virtual balancesPositive u64 per token

The initializer's payer becomes pool admin. initialize_pool_alt separately creates/freezes an ALT and stores pool.lookup_table; zero means none provisioned through that instruction.

Pricing and fees

FieldUnits / boundsUpdated by
normalized_weightBps; each 100–9,900; total 10,000Enabled manager
virtual_balanceRaw u64Swaps, liquidity, manager
actual_balanceRaw LP-owned reserves; initially zero; excludes protocol feesSwaps, liquidity
protocol_fees_owedRaw protocol-owned feesAccrual, collection
swap_fee_rateu32 / 1,000,000; 0–100,000; 3,000 = 0.3%Pool admin
protocol_fee_rateu16 / 10,000; 0–10,000 (0%–100% of base fee)Protocol admin

Initial protocol share comes from config.default_protocol_fee_rate; read the live pool value. Leverage is derived, not a stored multiplier.

Pool and token switches

FieldWhen disabledAuthority
pool_enabledBlocks swaps, proportional joins/exits, manager updatesProtocol
swaps_enabledBlocks swaps; proportional liquidity remains availablePool / protocol
Token is_activeBlocks selling that token in; buying out remains possiblePool / protocol

All start enabled. Liquidity still requires pool_enabled.

Sell-off window and surge fee

Pool admin calls set_max_selloff with one entry per token.

FieldUnits / constraints
max_selloff_pct0–10,000 bps; zero disables window and surge
max_selloff_period_lengthSeconds; positive when enabled
variable_fee_threshold_pctWindow-fill bps; below 10,000 when surge enabled
variable_fee_slope_low_pctSurge-rate bps at threshold
variable_fee_slope_mid_pctSurge-rate bps at optional kink
variable_fee_slope_high_pctSurge-rate bps at full fill; maximum 10,000
variable_fee_kink_pctWhole percent; zero disables kink; otherwise threshold_bps / 100 < kink < 100

Rates satisfy low ≤ mid ≤ high. High = 0 disables surge without removing a nonzero sell-off cap. Updating parameters does not reset usage; lowering the cap can immediately constrain trades. See Fees.

Range-manager settings

Pool admin configures these fields; protocol admin can only disable the existing manager.

FieldMeaning
range_manager, range_manager_enabledAuthorized signer and enable flag
range_manager_max_vb_change_pctRelative change per update, 0–10,000 bps; zero forbids change
range_manager_max_weight_change_pctSame scale and zero semantics, for weights
range_manager_min_update_interval_secsSeconds; zero removes interval
range_manager_min_leverage_bps, range_manager_max_leverage_bps10,000 = 1×; zero disables that bound; min ≤ max when both set
range_manager_last_updatedLast successful update timestamp

Bands apply only to changed virtual balances with positive actual reserves. See Range management for update checks.

Token extension policy

SPL Token and Token-2022 mints undergo layout, decimal and extension checks. For Token-2022:

chosen = creator_override ?? config.banned_extensions
floor = config.hard_banned_extensions or compiled fallback when zero
pool.banned_extensions = chosen OR floor

Defaults ban TransferFeeConfig, MintCloseAuthority, InterestBearingConfig, PermanentDelegate, TransferHook, ScaledUiAmount, and Pausable. The fallback bans NonTransferable.

Independent admission checks reject non-transferable tokens, Token-2022 native mint, a default account state other than initialized, paused mints, unknown extensions and malformed layouts. Clearing bitmap bits cannot bypass them. Active transfer hooks can be admitted when the effective bitmap permits them.

Protocol-admin changes to config defaults/floor affect future creation. Each pool stores its effective policy. Runtime transfers validate current mint/account functionality without reapplying a new config bitmap to existing pools.

The current instruction implementation accounts for epoch-dependent token transfer fees and accepts an extra-account tail for hooks and required memos. Hooks requiring additional signers are outside this transfer profile. Confirm support in the deployed program and matching SDK; SDK extension limits can be narrower than contract support. Admission does not guarantee that an issuer-controlled token will remain transferable.

On this page