Popcorn Markets
Search
K

What is a liquidity pool

What is a liquidity pool?
A pool, or liquidity pool, is a smart contract that allows you to instantly swap between two assets. On Popcorn Markets, the most common type of pool is an NFT<>APT pool, which means that anyone holding NFTs from that collection can instantly swap them for APT, or vice versa.
Pools use a bonding curve to determine the relative price at which one asset is traded for another. The more an asset is bought from the pool, the more expensive it becomes. Conversely, the more an asset is sold to the pool, the cheaper it becomes.
Ideally, a pool contains some amount of both assets, enabling users to swap back and forth between them. However, it's also possible to create a pool with just one asset, meaning that users will only be able to buy that asset from the pool.
A bonding curve is a mathematical formula which defines the relationship between an asset's price and its supply. Bonding curves are a key feature of automated market makers since they are used to algorithmically adjust asset prices.
At launch, Popcorn Markets supports two types of bonding curve: linear and exponential.
Linear
With a linear bonding curve, the price of an NFT is increased by a flat amount (called delta) every time an item is bought from the pool. Conversely, the price of the NFT is decreased by that same flat amount every time an item is sold to the pool.
For example, a liquidity provider may create an NFT<>APT pool with a Start Price of 1 APT and a delta of 0.1 APT. Assuming they provide enough liquidity, the price of an NFT will increase to 1.1 APT after one item is purchased from the pool. After a second item is purchased, the price will increase to 1.2 APT, and so on and so forth. At any point, if an NFT is sold to the pool, the price will decrease by 0.1 APT.
Exponential
With an exponential bonding curve, the price of an NFT is increased by a certain percentage (also called delta) every time an item is bought from the pool. Conversely, the price of the NFT is decreased equivalently every time an item is sold to the pool.
To calculate the equivalent decrease, convert the the percentage to a decimal index (e.g. for 50%, the index would be 1.5) and divide the price by this number.
For example, a liquidity provider may create an NFT<>APT pool with a Start Price of 2 APT and a delta of 50%. Assuming they provide enough liquidity, the price of an NFT will increase to 2 + 50% = 3 APT after one item is purchased from the pool. After a second item is purchased, the price will increase to 3 + 50% = 4.5 APT, and so on and so forth. At any point, if an NFT is sold to the pool, the price will be divided by 1.5.