bitCow Swap

bitCow is an AMM offering stable swap and automated concentrated liquidity on BTC L2s.

Vision

bitCow envisions a vibrant DeFi ecosystem on Bitcoin, aiming at enhancing capital efficiency and liquidity access. We strive to capitalize on Bitcoin's untapped DeFi potential by introducing innovative solutions to overcome key obstacles, namely impermanent loss and LP profit tracking. With our oracle-based approach and novel dual-LP token structure, bitCow not only solves these problems but also empowers liquidity providers — particularly those with significant BTC holdings. These innovations are crucial towards creating a more secure, efficient, and transparent AMM platform, thereby enhancing returns and bolstering Bitcoin's DeFi growth.

Stableswap (V1)

bitCow's stableswap allows stablecoin pairs and pegged coin pairs (LSDs) to be traded with simplicity and efficiency. Compared to constant product AMMs or CurveFi's stableswap implementation, bitCow's stableswap has the following advantages:

  • High concentration and capital efficiency

  • Minimal gas use (same level as constant product AMMs)

  • Equilibrium price can be adjusted (for LSDs that slowly appreciate in value over time)

Automated Concentrated Liquidity (V2)

bitCow also supports the trading of volatile coin pairs (e.g. BTC-USDT) with concentrated liquidity. Compared to traditional concentrated liquidity AMMs, bitCow's implementation has the following advantages:

  • Automated pricing

  • Zero impermanent loss

  • Transparent Profit-and-Loss

Automated Pricing

bitCow V2 uses an external oracle to control the price of a liquidity pool. The advantage of using an oracle is that not only can liquidity be highly concentrated, but users also no longer need to manually manage price intervals. Instead, the AMM uses an external oracle to determine the fair price of the token, and concentrate all available liquidity around that fair price. So that traders can obtain much smaller slippage, and liquidity providers can earn more trading fees using much less capital.

Zero Impermanent Loss

One person's loss is another person's profit. In the case of impermanent loss commonly seen in constant-product pools, it is usually a consequence of arb-bots exploiting a pool's passive/late pricing. In other words, liquidity provider's impermanent loss becomes arb-bots' profit. For example, let us assume the price of BTC is $50K, and consider a constant-product pool with 1 BTC and 50K USDT:

When the market price for BTC suddenly moves to $55,000, an arb bot will come in to buy BTC from this pool, and sell the purchased BTC in another exchange (where price is $55,000). After the arb-bot performs this transaction, the pool's price will be raised to $55,000, same as the market price:

If the trade did not take place, and the liquidity provider holds that 1 BTC and 50,000 USDT in his wallet, he would have 105,000 USD worth of assets in his wallet. However, as he has put these tokens in the constant-product pool. He now only has 104,880 USD worth of assets, and has just experienced a $20 USD "impermanent loss".

If we look at things from the arb-bot's perspective, though, we will notice that in the above transaction, the arb-bot paid $2440 USDT for (1 - 0.95346) = 0.04654 BTC. After it sells that 0.04654 BTC at a price of $55,000, it would get back (55000 * 0.04654) = 2559.7. This leads to a profit of about 20 USDT for the arb-bot. This is exactly the same as the impermanent loss experienced by our liquidity provider.

Or, in short, impermanent loss is a consequence of arb-bots taking profits.

So how does bitCow V2 eliminate impermanent loss? As mentioned in the previous section about automated pricing, bitCow V2 uses an external oracle to actively price the pool. When BTC's price suddenly moves from $50,000 to $55,000, this price is immediately reflected in the pool as the oracle has updated. This eliminates any arbitrage opportunity for the arb bots. So no arb profit for bots. No impermanent loss for LPs.

Transparent Profit-and-loss

In traditional AMMs, keeping track of LP's profit-and-loss (PnL) is a bit of a headache. Again, let us use BTC-USDT as an example:

  • the price of BTC itself may rise or fall

  • the amount of BTC that an LP token corresponds to may rise or fall

  • trading fees accumulate

For example, when the price of BTC rises, it is common that an LP token would then correspond to less BTC token. While the rising BTC price creates profit, the falling BTC amount creates some loss. In addition to mixing up PnL, it also makes things complicated for long-term BTC holders or for liquidity providers who wish to stay market-neutral.

To solve these problems, bitCow V2 introduces a unique dual-LP token structure. Still, using BTC-USDT as an example, our pool actually has two LP tokens:

  • BTC-LP token

  • USDT-LP token

1 BTC-LP token always corresponds to exactly 1 BTC token. And all trading profits (and rebalancing losses) gets accrued to the USDT-LP token. Through this structure, different kinds of liquidity providers can benefit at the same time:

  • LPs who wish to retain their BTC holding in the long term will find out that their BTC-LP token will always redeem back to the original amount of BTC, no matter how the price of BTC changes

  • LPs who wish to stay market-neutral can borrow BTC from another lending protocol, and be sure that his BTC-LP token will always be able to cover his principal. By borrowing BTC to provide liquidity, this kind of liquidity providers will be able to earn trading fees even when the price of BTC falls significantly, as he is able to maintain an overall neutral position

In addition, since all trading PnL goes into the USDT-LP token, the amount of USDT that 1 USDT-LP redeems to becomes an index that directly tracks trading performance. If this index is increasing, it means that the pool is making money from trading fees. If this index is decreasing, it means that the pool is losing more money from rebalancing. This transparent indicator of LP performance makes it straightforward for liquidity providers to decisions as to whether he should add or withdraw liquidity.

Last updated