Liquidity Pools & Bonding Curves Additional information
On JewelSwap, anyone can offer liquidity. As a user, you have the option to purchase or sell NFTs at various price points along a bonding curve. Alternatively, you can engage in both buying and selling to profit from the trading fees that are generated.
A liquidity pool is a smart contract that lets you trade one asset for another instantly. On JewelSwap, the pools available are for trading NFTs from collection X and EGLD. If you have an NFT from that collection, you can easily trade it for EGLD, or the other way around.
Each pool uses something called a bonding curve to decide how the price of EGLD changes when people buy or sell NFTs. Basically, the more people buy a certain NFT, the more expensive it gets, and the more people sell it, the cheaper it gets.
In an ideal situation, there are enough NFTs and EGLD in the pool to make trading easy and smooth. But it's also possible to create a pool with just one asset, like only NFTs or only EGLD, which is called a one-sided pool. This lets people either buy or sell NFTs.
JewelSwap offers two different ways for people to create liquidity pools: linear and exponential bonding curves. When you provide liquidity to a pool, you are essentially putting your assets (like NFTs or EGLD) into the pool so that other people can trade them.
The bonding curve determines the price of the assets in the pool changes based on how much people are trading them. There are 2 kinds of curves:
- Linear (in EGLD) - on a linear curve, the price of an NFT goes up or down by the same amount each time someone buys or sells it from the pool. This amount is called "delta". So, if someone buys an NFT from the pool, the price goes up by delta. And if someone sells an NFT to the pool, the price goes down by delta. This makes the price changes predictable and consistent.
Let's say a liquidity provider creates a pool with a starting price of 10 EGLD and a delta of 1 EGLD. This means that each time someone buys an NFT from the pool, the price will increase by 1 EGLD. For example, after the first purchase, the price will be 11 EGLD. After the second purchase, it will be 12 EGLD, and so on. If someone sells an NFT back to the pool, the price will decrease by 1 EGLD.
This process continues as more people buy and sell NFTs from the pool, with the price changing by delta each time. As long as there is enough liquidity in the pool, this system allows for efficient and consistent trading of NFTs at a fair market price.
- Exponential (in %) - with an exponential curve, the price of an NFT in a liquidity pool is determined by a percentage increase or decrease (delta). As more people buy an NFT, the price increases more rapidly, and as more people sell, the price decreases more rapidly. This allows for more dynamic price changes in response to changes in supply and demand.
In an example scenario, a liquidity provider sets up a pool with a spot price of 10 EGLD and a delta of 25%. If there is enough liquidity, the price of an NFT in the pool will increase to 12.5 EGLD after the first purchase (10 + (10 * 25%)). After the second purchase, the price will increase to 15.625 EGLD (12.5 + (12.5 * 25%)), and so on. If at any point a sale occurs, the price of the pool will be divided by 1.25.
By letting people choose between these two kinds of curves, JewelSwap gives liquidity providers more control over how their assets are traded and how much they can earn from fees. The user just only needs to set up the initial Spot Price and the AMM will automatically adjust all prices of NFTs.