$3.28 3.05%
XTZ · 2w

Liquidity baking in Granada — how it works

by Nicolas Ochem

Liquidity Baking has been submitted to Tezos on-chain governance. Several publications explain what it is (Agora post, TZIP, Nomadic Blog Post), in this blog post we attempt to show the concept under a different light, by explaining what will actually happen when/if it goes live on-chain.

TLDR: the Granada proposal adds a new Decentralized Exchange contract to the Tezos protocol between tez and tzBTC. This contract is “special” because the protocol itself creates tez at every block and adds them to the contract. This incentivizes users to provide liquidity to the contract in order to capture a portion of the subsidy. Liquidity is a desirable attribute of any currency.

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.

In a traditional order book exchange, you place limit orders (essentially posting how much you want to buy/sell and at which price). In a CPMM, you trade tokens by simply submitting how much you want to buy or sell. The contract will ensure that you get a good deal. To achieve that, it stores both tokens in a liquidity pool inside the contract itself.

The liquidity pool is filled by liquidity providers. Anyone can be a liquidity provider by acquiring both tokens and submitting them to the contract at once. In exchange, they get redeemable tokens representing their contribution to the pool. They can withdraw their contribution at any time by returning these redeemable tokens. When they do, they do not get exactly what they contributed: if the proportion of tokens in the pool has changed, they will get back a larger quantity of one token, and one lesser quantity of the other one, than they initially put in. They also receive fees paid by traders in proportion of their contribution.

Uniswap is the most popular of ...

Continue on midl-dev.medium.com
Recent news