> ## 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.

# Points and Interpolations

## 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

<Info>
  Points define the shape of the curve; interpolation determines the behavior between them.
</Info>

## 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.

<Info>
  By combining points and interpolation types, makers can construct virtually any curve shape — from order-book ladders to smooth nonlinear depths.
</Info>

<Card icon="sparkles" href="https://docs.hadron.fi/examples/mixed-interpolation" img="/images/mixed-interpolation.png" title="Mixed Interpolation Example" />
