# Proactive market making curve for token-swap
Add additional curve to token-swap program that support proactive market making.
The core of PMM is essentially calculating one integral and solving two quadratic equations. It is implemented in Dodo protocol described [here](https://dodoex.github.io/docs/docs/pmm).
As a part of PR please implement as described in [[1](https://dodoex.github.io/docs/docs/pmmDetails)] and [[2](https://dodoex.github.io/docs/docs/math)].
For reference pricing formula is:
Where
is defined to be the piecewise function below:
is the market price provided by an oracle, and
is a parameter in the range (0, 1).
The funding pool of PMM is described by four parameters:
-
: base token regression target - total number of base tokens deposited by liquidity providers
-
: quote token regression target - total number of quote tokens deposited by liquidity providers
-
: base token balance - number of base tokens currently in the pool
-
: quote token balance - number of quote tokens currently in the pool