How Bancor Liquidity Pools Work

Nate Hindman
5 min readApr 11, 2019

--

Although the Bancor Protocol is unique, you don’t need a degree in quantum computing to understand it. The protocol introduces a new standard for enabling liquidity between tokens through a network of interconnected smart contracts. Each contract, known as a Bancor “liquidity pool”, acts as an automated-market maker that performs on-chain, peer-to-contract token trades and generates a fee from each trade.

Traditional exchanges work by matching buy and sell orders in a bid/ask model using order books or a matching engine to fulfill trades. When there are enough buyers and sellers of a token, this system generally works well; however, it assumes a given level of volume and interest in a token. If a token has low volume at any time, it not only becomes difficult to buy or sell, but individual transactions can cause unpredictable price swings, reducing a token’s usability and adoption.

Because liquidity pools don’t rely on matching buyers and sellers, and instead use on-chain “reserves” as always-available liquidity sources, they have the potential to remove a token’s dependency on trade volume and ensure constant liquidity for tokens.

Bancor’s bonding curve formula is the sole determinant of price for all trades on Bancor pools. As the size of the order increases, the price paid per unit of the token increases. And as the size of the liquidity pool increases, the price paid per unit decreases.

The size of the pool and the size of the order are known quantities before a trader submits a transaction, so the cost of the trade can be calculated transparently and deterministically prior to submission.

In this way, liquidity pools managed by smart contracts offer an algorithmic alternative to fickle human-mediated market makers. Traders can be less concerned with low token volume or unreliable order books.

How it Works (ELI5)

Liquidity pools hold one or more token reserves. These reserves are programmed to perform trades according to a predetermined formula which continuously measures the supply of tokens held in each reserve.

Most pools adjust the prices of each token in terms of the other, in order to maintain a fixed 50/50 ratio between the two reserves.

For example, a pool created with watermelon tokens and grape tokens allows a user to sell a watermelon to the pool and receive grapes in return. Such a transaction would add a watermelon to the pool’s watermelon reserve, and withdraw grapes from its grape reserve. In order for the pool to maintain its 50/50 reserve ratio, the pool rebalances prices to decrease the price of the sold token (watermelons) and increase the price of the purchased token (grapes).

Fees & Liquidity Providers

Liquidity pools extract a percentage fee from each trade that is deposited into the pool’s reserves. Any user can act as a liquidity provider to a pool and collect a share of its trading fees by depositing tokens into a pool and holding its “Pool Token”.

Pool Tokens are ERC20 or EOS tokens that represent ownership shares of a liquidity pool. As fees accumulate in a pool, they increase the price of its Pool Token.

Adding liquidity to a Bancor pool is permissionless (no central party can block or control the process) and easy for everyday users (you can add liquidity in a couple clicks, all you need is ETH). You can remove liquidity by selling your Pool Tokens back to the pool’s contract in order to realize gains.

Today thousands of unaffiliated users provide liquidity to Bancor pools in exchange for trading fees and (coming soon) staking rewards. Staking rewards aim to create additional incentives for users to contribute to the system by performing a specific action the system requires: providing liquidity.

NOTE: This video uses the old term Bancor “Relays” — which are the same as “Liquidity Pools”
Providing liquidity to the UBT/BNT pool on 1inch.exchange. (How to Zap into a Bancor pool)

Guide: How to add liquidity & earn fees on Bancor

Creating a Bancor Pool

Pools can be created with:

  • unlimited reserve tokens (any ERC20)
  • custom reserve weights
  • adjustable fees

Guide: How to create a Bancor pool

Learn about Bancor reserve weights

Creating a Bancor pool on KatanaPools.com

Pools created on Bancor get added to Bancor’s smart contract registry. Any app or interface can plug into this on-chain registry to source liquidity for token trades. The Bancor Protocol uses smart order-routers to determine which liquidity pool(s) are offering the best price for any given trade.

Control

Once live, a liquidity pool’s underlying assets and reserve weights remain fixed, while the fee can be updated by the pool’s creator. In the future, a pool’s fee and other parameters will be updated by liquidity provider voting to achieve further decentralization.

Advanced users can program pools to update weights and fees dynamically according to market triggers (e.g., trade volume/liquidity) or connect pools to a DAO. As pool management software evolves, the creation of dynamic “smart” pools will become more accessible to users.

Since their creation in 2017, Bancor liquidity pools have processed billions in non-custodial trade volume generated millions in fees, providing algorithmic, autonomous liquidity through an open and decentralized protocol.

For More info on Bancor pools, check out Bancor’s Developer Documentation or join the Bancor Developer’s Telegram group.

About Bancor

Bancor is an on-chain liquidity protocol that enables automated, decentralized exchange on Ethereum and across blockchains. The protocol is made up of a series of smart contracts designed to pool liquidity and perform peer-to-contract trades in a single transaction with no counterparty. Users add liquidity to automated market makers in exchange for trading fees, BNT staking rewards and voting rights in the Bancor DAO. Since 2017, Bancor has processed billions in trade volume across thousands of tokens, with millions in fees generated by liquidity providers.

--

--