Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.hadron.fi/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Points and interpolations are the means by which you define curves.

Defining Curves

Each bid or ask curve consists of control points. Every point specifies:
  • Input Amount: Trade size in atoms
  • Price Factor: Adjustment relative to mid-price - equivalent to spread
  • Interpolation Mode: How pricing transitions to the next point
Points define the shape of the curve; interpolation determines the behavior between them.

Interpolation Modes

Hadron supports multiple interpolation types, which can be mixed across points:
  • Step (0): Constant price factor between point A → B.
  • Linear (1): Linearly interpolates price between points.
  • Marginal Step (2): Points store average spread, producing constant marginal pricing between A → B. Gives orderbook-like behavior where each size tier has a flat marginal price.
  • Hyperbolic (3): Rational easing with shape parameter k .
    k=1.0 is exactly linear, k<1.0 is concave (saturating), k>1.0 is convex (accelerating).
  • Quadratic (4): Quadratic easing with shape parameter k. Formula: ease(t) = t + k*(t² - t). k=0 is linear, k>0 is convex (stays near f0 longer), k<0 is concave (moves toward f1 quickly).
  • Cubic (5): Cubic easing with 2 shape parameters a and b. Formula: ease(t) = t + a*(t² - t) + b*(t³ - t). a=0,b=0 is linear. Allows S-curves and richer shapes.
By combining points and interpolation types, makers can construct virtually any curve shape — from order-book ladders to smooth nonlinear depths.
mixed-interpolation

Mixed Interpolation Example