Skip to content

Liquidity Pools

Liquidity Pools are smart contracts deployed by users of the Cauldron Protocol. These are public and available for all to use.

Liquidity Pool contracts contain equal amount of two assets, where one is a CashToken and the other is BCH (Bitcoin Cash). The price of the token is determined by the ration betweent these two assets using the Constant Product Market Maker formula plus fee.

Constant Product Market Maker

Cauldron is a smart contract based liquidity pool that contains two distinct assets. One asset is always Bitcoin Cash (BCH).

It follows the Contanct Product Market Maker model, using the formula

k = x * y

LP fee

Providing liquidity is incentivized by giving the market maker 0.3% fee for every trade. See details for swap.

Micro-pools

Each creation of a liquidity pool is a unique contract. Each liquidity provider owns 100% af the liquidity of their unique pool.

This implementation deviates from the traditional single large liquidity pool model by utilising multiple small-scale CPMM contracts called micro-pools. Each liquidity provider operates their own set of micro-pools.

Aggregating Micro-Pools

The Cauldron contract allows for aggregation of micro-pools to increase liquidity for trades. Multiple contracts can be used as inputs, combining their liquidity. This enables a trade to be executed as though it were interacting with a larger pool.

This means there are potentially thousands of liquidity pools for the same token pair.

flowchart LR
   CauldronInput1 --> TradeTransaction --> CauldronOutput1
   CauldronInput2 --> TradeTransaction --> CauldronOutput2
   CauldronInput3 --> TradeTransaction --> CauldronOutput3
   UserBCHInput  --> TradeTransaction --> UserTokenOutput
                     TradeTransaction --> UserBCHChangeOutput

In a typical trade, multiple micro-pools are used as inputs along with additional 3 inputs to fund the trade. Contract UTXOs are recreated in corresponding output positions, and additional outputs send new funds back to the user. While funds are commonly held in P2PKH UTXOs, the contract does not mandate this. See details for swap.