---
title: Bonding curves
description: Work through share conversion and rounding on a linear curve, then see how a flat-price curve can charge different fees across tiers.
url: https://docs.intuition.systems/docs/concepts/bonding-curves
markdown_url: https://docs.intuition.systems/docs/concepts/bonding-curves.md
version: V2
llms_index: https://docs.intuition.systems/llms.txt
kind: concept
reader:
  - app
packages:
  - '@0xintuition/curves@0.1.1'
  - '@0xintuition/protocol@4.1.0'
depends_on:
  - https://docs.intuition.systems/docs/concepts/vaults.md
---

A bonding curve answers two questions for a vault at a particular moment. How many shares will a deposit buy? How many assets will a redemption return? The curve defines the conversion rule. Some curves also charge fees that depend on how much is already in the vault or when a holder acquired shares.

**Builds on:** [Vaults, shares and positions](https://docs.intuition.systems/docs/concepts/vaults).

**Implemented by:** [curves](https://docs.intuition.systems/docs/reference/packages/curves), [protocol](https://docs.intuition.systems/docs/reference/packages/protocol).

## How it works

On an initialized **linear curve**, the asset value of one share is proportional to the ratio of total assets to total shares. Depositing at that ratio need not raise the price. If a vault receives additional assets without minting shares, each existing share represents more assets. A **progressive curve** uses a different rule. Its marginal price grows with total share supply according to its slope. [Linear pricing](https://github.com/0xIntuition/packages/blob/ccae0f0d0277cddd8490b72c49d3771866e7ffea/packages/curves/src/linear-curve.ts) · [Progressive pricing](https://github.com/0xIntuition/intuition-contracts-v2/blob/82cfcdb832c100fd2e53ee3f474289ae14cc6020/src/protocol/curves/ProgressiveCurve.sol)

The **dynamic-fee flat-price curve** keeps the underlying conversion at par and varies the fee. A deposit spanning several tiers pays each band’s configured rate on the portion in that band. The contract tracks a holder’s shares in lots according to their entry tiers, and redeems the highest-tier lots first. To estimate a holder's redemption, account for those lots as well as MultiVault’s fees. A vault-wide preview uses the current tier for the account-less curve fee. [Dynamic-fee curve and holder quotes](https://github.com/0xIntuition/intuition-contracts-v2/blob/82cfcdb832c100fd2e53ee3f474289ae14cc6020/src/protocol/curves/DynamicFeeFlatPriceCurve.sol)

## Bonding curves - Example

Imagine an initialized linear vault with 3 asset units and 2 share units. To find the shares for a deposit of 2 net asset units, multiply by the share supply and divide by the asset balance. The result, `2 × 2 / 3`, rounds down to **1 share unit**. To acquire exactly 1 share unit at that state would require `1 × 3 / 2` rounded **up to 2 asset units**. To acquire exactly 2 share units requires 3 asset units.

```ts
import { createLinearCurve, type CurveState } from '@0xintuition/curves';

const curve = createLinearCurve();
const state: CurveState = { totalAssets: 3n, totalShares: 2n };
export const preview = {
  depositShares: curve.previewDeposit(2n, state),
  mintAssets: curve.previewMint(2n, state),
};
console.log(preview); // 1n share for a deposit; 3n assets to mint 2n shares.
```

The `n` suffix denotes a JavaScript `bigint`. These small values illustrate integer rounding using only the curve. For a proposed transaction, a MultiVault preview also applies the relevant fees and initialization costs. [Deposit calculation](https://github.com/0xIntuition/intuition-contracts-v2/blob/82cfcdb832c100fd2e53ee3f474289ae14cc6020/src/libraries/MultiVaultLib.sol)

## Common mistakes

- **Choosing a curve by a familiar number.** Check the selected deployment’s curve registry and configuration before interpreting a curve ID.
- **Applying the last tier’s fee to the whole deposit.** A deposit can cross several fee bands even while the underlying asset-to-share price stays flat.
- **Deriving minimum proceeds from a curve quote alone.** A holder-specific curve quote can still exclude MultiVault's protocol and exit fees.

## Next

[Signals](https://docs.intuition.systems/docs/concepts/signals) interprets positions priced by these curves. [Fees, epochs and rewards](https://docs.intuition.systems/docs/concepts/fees-and-rewards) distinguishes the charges on a transaction from a holder’s eligibility for emissions.

Applies to V2 · `@0xintuition/curves` 0.1.1 · `@0xintuition/protocol` 4.1.0
