# Sigmoid Curve

A Sigmoid function is a S-shaped function `P(deltaN)` that returns a value between minimum price `P_min` and maximum price `P_max`, with the midpoint of the two being the centre of the curve. A traditional sigmoid curve looks like the above. A sigmoid curve is most useful when we want to ensure liquidity is concentrated between two price levels, with `delta` being the slope of the curve as the midpoint (how fast it approaches the price floor or ceiling, a low `delta` value approaches `P_min` and `P_max` slowly, a high delta value quickly converges to `P_min` and `P_max`).

We’ve adapted the sigmoid function, which is given as `P(deltaN) = P_min + (P_max - P_min) / (1 + 2 ** (k * deltaN))`.While a traditional sigmoid uses e as the exponent base, this is equivalent to modifying the value of k so a value of 2 is used for convenience. `delta` here represents `k * 2**10 as a uint128`

As this curve requires a degree of memory of statefulness of where we are in the curve (it is meaningless if we assign the slope at the centre at every buy or sell order, that would not lead to a S-shaped curve), we use the `state` parameter to record how far we are from the original centre.

<figure><img src="/files/XORCDdvo3oKUH4SS8WgP" alt=""><figcaption><p>Sigmoid Curve</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.collection.xyz/guides/technical-reference/bonding-curves/type-of-bonding-curves/sigmoid-curve.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
