Dekant

Glossary

Symbols, notation, and shorthand used throughout the protocol pages.

AMM state

SymbolTypeMeaning
NintegerNumber of bins in the market. Set at creation, range [2, 256].
xᵢu64Position in outcome i. Zero-indexed i ∈ [0, N).
xu64[N]Position vector across all outcomes
hᵢu64AMM holding of outcome-i tokens. Related: hᵢ = k − xᵢ.
ku64L₂ norm: k = √(Σ xᵢ²). Fixed by invariant; updated only on liquidity events.
‖x‖₂scalarL₂ norm of position vector, equal to k.

Probabilities

SymbolTypeMeaning
pᵢscaled intTrue (calibrated) probability of outcome i.
p̂ᵢscaled intImplied probability extracted from AMM state: p̂ᵢ = xᵢ²/k². Quadratically distorted.
pint[N]Calibrated probability vector. Recoverable from via pᵢ = √p̂ᵢ / Σⱼ √p̂ⱼ.

Continuous markets

SymbolTypeMeaning
[a, b](u64, u64)Range of the continuous outcome value.
binintegerBin index. Continuous range divided into N equal-width bins.
centerⱼu64Midpoint of bin j: centerⱼ = a + (2j+1)(b−a)/(2N).
μu64Trader's center: where they think the value lands.
σu64Trader's conviction: standard deviation of the curve.
zⱼscaled intStandardized z-score for bin j: zⱼ = (centerⱼ − μ)/σ.
wⱼscaled intUnnormalized PDF weight: wⱼ = exp(−zⱼ²/2).
Wⱼscaled intNormalized weight: Wⱼ = wⱼ · S / Σ wⱼ. Integer-valued.
SconstantWeight scale: S = 10⁹. So Σ Wⱼ = S.
Z_CUTOFFconstant5. Bins with `

Trading

SymbolTypeMeaning
cu64Collateral amount (in USDC base units) for a buy.
tu64Token amount returned to the AMM for a sell.
Tu64Total token amount returned in a distribution sell.
λu128Solved scalar for distribution buy: λ = √(XW² + W²(k'² − k²)) − XW.
XWu128Inner product: XW = Σⱼ xⱼ Wⱼ.
u128Squared L₂ norm of weights: W² = Σⱼ Wⱼ².
k'u64New L₂ norm after the operation.
tokens_outⱼu64Tokens of outcome j received (positive = buy, negative = sell).

Liquidity

SymbolTypeMeaning
du64Collateral added in an LP deposit.
su64LP shares burned in an LP withdraw.
L_totalu64Total LP shares outstanding.
L_initialu64Initial liquidity at market creation.
i_winintBin index of the resolved outcome.

Fees

SymbolTypeMeaning
creation_fee_bpsu16Creation fee in basis points. Default 50 bps (0.5%).
trade_fee_bpsu16Trade fee in basis points. Default 30 bps (0.3%).
redemption_fee_bpsu16Redemption fee in basis points. Default 50 bps (0.5%).
lp_fee_share_bpsu16LP share of trade fee in basis points. Default 5000 bps (50%).
MAX_FEE_BPSconstant5000 (50%). Hard cap on any individual fee.

Constants

SymbolValueMeaning
SCALE10⁹Fixed-point precision for non-collateral values.
INVARIANT_TOL256Maximum allowed `
MAX_BINS256Cap on N (bins per market).
Z_CUTOFF5σ multiples beyond which weight = 0.
MIN_LIQUIDITY1 USDCFloor for initial market liquidity.
MIN_TRADE_AMOUNT0.001 USDCFloor for any single trade.

On-chain types

TypeBit widthUsed for
u6464-bit unsignedToken amounts, collateral, L₂ norms (USDC base units)
u128128-bit unsignedIntermediate products that could overflow u64 × u64
Pubkey256-bitSolana public keys for accounts and PDAs
bpsu16Basis points (1 bp = 0.01%). All fees stored as u16.

State machine

StateMeaning
ActiveMarket accepts trades and LP operations. Before deadline.
PendingResolutionDeadline passed; awaiting oracle. New trades rejected; LP removes still allowed.
ResolvedOracle has reported a value. Claims open indefinitely.

Operations (instruction names)

InstructionEffect
create_marketInitialize a new market with parameters and seed liquidity.
buyDiscrete buy on a single outcome.
sellDiscrete sell of a single outcome's tokens.
distribution_buyDistribution buy with (μ, σ) over a continuous range.
distribution_sellDistribution sell of token holdings weighted by (μ, σ).
add_liquidityLP deposit. Mints LP shares.
remove_liquidityLP withdraw. Burns LP shares.
resolve_marketOracle posts the final value.
claim_payoutToken holder redeems winning tokens for USDC.