Liquidity baking in Tezos Granada proposal — how it works

The CPMM contract

A Constant Product Market Maker contract is an invention coming from the Ethereum world that provides a Decentralized Exchange between tokens. Such exchanges have existed on Tezos for some time: Dexter, Quipuswap.

Wrapped Bitcoin

tzBTC is bitcoin, wrapped on Tezos, in custodian fashion.

Granada proposal

Tezos is a self-amending protocol. Twice, the bakers (validators) must vote in favor of a proposal. If they do, at the end of phase 52, the protocol running the Tezos chain will switch over to PtGRANAD. In addition to Liquidity Baking, Granada proposal contains a migration to Emmy* consensus algorithm and a reduction in gas fees.

Wait, what?

This is not what you would expect. Everyone’s gut reaction is that this is a poor separation of concerns and a violation of the defi layers. Normally, the base layer is a neutral world computer. Smart contracts and decentralized exchanges live on this substrate. Why is a contract in particular getting special treatment? To answer that, let us see what happens if the protocol activates.

Protocol-funded CPMM

Alice, a liquidity provider, was eagerly waiting for the protocol activation and had already bought some tzBTC. She adds 10 tez, plus 10 tez worth of tzBTC in the liquidity pool. In exchange, the contract allocates some redeemable tokens to her.

5 tez per minute? Sign me up

That is not what will happen however, because there will be a lot of Alices eagerly waiting to provide liquidity to this contract in anticipation of lucrative rewards straight from the protocol. So, at block +1, it is likely that the pool will have a lot of tzBTC and tez, from many liquidity providers.

Enter Bob the trader

At next block, since the procotol added 2.5tez, it made the tzBTC/tez pair artificially more expensive than on centralized exchanges. Bob, realizing the opportunity, will acquire tzBTC, send them to the contract and get cheap tez. By doing that, he will remove some tez and add more tzBTC to the pool, “rebalancing” it and moving the price closer to its external value.

Few blocks later

The protocol keeps inflating the tez balance in the CPMM by adding 2.5 tez per block, slightly increasing the tzBTC price in the contract. In response, more Bobs (arbitragers) will keep acquiring more tzBTC and trading them for tez.

Inflation

This proposal results in 2.5 additional tez being created at each block than would otherwise have been. These rewards are not taken away from bakers: they receive the same amount than before. This increases the supply of tez overall.

Phase out

This is an experiment: it is written in a way that will phase out in 6 months without any intervention. To continue the experiment, another protocol upgrade vote will be needed. There is also an escape hatch: bakers can raise a flag for the experiment to stop sooner. If enough bakers do, the 2.5 tez liquidity rewards per block will stop flowing.

Vote for liquidity baking

Cryptoeconomics is all about creating the right rules so economically rational actors will contribute to something useful. By explaining what happens when this upgrade kicks in, we hope to have demonstrated its usefulness: it creates a liquid pair between tez and a very liquid asset (Bitcoin).

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store