DumpsterDumpster Docs
Protocol

Bonding Curve

Constant-product reserve math, buy and sell behavior, and the key properties of Dumpster curve trading.

Protocol

Bonding-curve pricing on Dumpster

The bonding curve decides price from two virtual reserves. When users spend GOR, the token reserve goes down and price moves up. When users sell tokens back, the token reserve goes up and price moves down. For integrations, the useful part is knowing which values move, which rounding rules matter, and when trading should switch venues.

Core formula

xy=kx \cdot y = k price=xyprice = \frac{x}{y}
  • x = virtual GOR reserves
  • y = virtual token reserves
  • k = constant product

Buy path

When a user buys Δy\Delta y tokens, the curve removes those tokens from the reserve and solves for the new GOR reserve.

y=yΔyy' = y - \Delta y x=kyx' = \left\lceil \frac{k}{y'} \right\rceil gross GOR in=xx\text{gross GOR in} = x' - x

After that, protocol and creator fees are added on top of the gross curve cost.

Sell path

When a user sells Δy\Delta y tokens back into the curve, the token reserve increases and the quote reserve is solved again.

y=y+Δyy' = y + \Delta y x=kyx' = \left\lfloor \frac{k}{y'} \right\rfloor gross GOR out=xx\text{gross GOR out} = x - x'

The user receives the gross output minus protocol and creator fees.

What actually matters when you integrate

  • Price is entirely deterministic from the curve reserves.
  • Buy and sell previews must match the protocol's ceiling and floor rounding.
  • Once the curve is complete, trading logic needs to switch to DumpsterSwap.

Match protocol rounding

If your client-side previews ignore the protocol's ceil and floor behavior, your slippage bounds will be wrong on edge cases and larger trades.

On this page