βοΈLiquidity Pools & Staking
Adding liquidity behind your token & rewarding your community
Last updated
Adding liquidity behind your token & rewarding your community
Last updated
Liquidity pool - Pools of tokens locked into a smart contract Used to facilitate trading by providing liquidity to assets
Liquidity pool calculation - how to calculate percentage changes
Key terms:
Liquidity - Efficiency in which an asset or security can be converted to cash
DEX - Decentralised exchanges
Order book model - Buyers buy at the lowest amount possible, sellers sell at the highest price. Sale is only made if sellers sells at a lower price or buyers buy at a lower price
Market maker - entities facilitate trading who are always willing to buy or sell an asset
Liquidity issue - Liquidity is the time it takes to buy/sell an asset. Liquidity issues is the slowness/inability to convert an asset to $
Liquidity pool - a pool that contains two tokens. Liquidity pools creates a market for the exchange of these two tokens
LP - Liquidity provider
LP token - liquidity provider token (represents the assets deposited into the liquidity pool) For an LP provider to retrieve their liquidity funds & accrued fees they need to burn their LP tokens
LP token transaction - when a transaction occurs in the pool the LP providers receive a 0.3% fee
AMM - Automated market maker - Price adjustment algorithm - Allows traders to buy and sell certain coins using an algorithm that dictates how expensive something should be depending on how much of it there is.
Slippage - price change in the liquidity pool
Orca
Uniswap
Pancake swap
Raydium
Traditional stock exchanges use the order book model to exchange assets. All buys & sellers submit their offers to buy & sell.
Once buy offer = sell offer an exchange occurs
Example Order Book exchanges: Binance, Serum
Why is the order book model inefficient?
Need to wait until buy offer is equal to your sell offer
Takes time & requires both parties to agree on price
This is illiquid (takes time)
Liquidity pools are created using a smart contract written in a way to hold certain funds, do math with those funds & allow you to trade with the math that it did. The algorithm used to decide the price of tokens is called an Automated market maker (AMM)
Automated market maker Allows traders to buy and sell certain coins using an algorithm that dictates how expensive something should be depending on how much of it there is.
Why are liquidity pools efficient?:
Able to buy/sell asset no matter the price
No matter the time
No matter if there are buys/sellers to meet our current needs
ORCA https://g4s065hqno8.typeform.com/to/s6YucgAl?typeform-source=docs.orca.so
RAYDIUM https://raydium.gitbook.io/raydium/permissionless/creating-a-pool
https://raydium.io/liquidity/create/
SERUM
https://portal.projectserum.com/
What is Serum?
Decentralised exchange
Decentralised open source project - built by the serum foundation
Order book (similar to traditional exchanges, different to liquidity pools)
Rivals AMM (liquidity pool) exchanges such as Uniswap, Sushi & Bancor Cross chain (ie Solana, Etherum, Polkadot)
Serum is cross chain using the ERC-20 token standard
Why Serum?
Very user friendly
Low cost
Fast
Powered by Solana
Bonfita
Bonfita is the GUI & Product suite to bridge the gap between Serum & Solana. Bonfire also includes market for Solanaβs domain name tool (ie .sol) Asset agnostic order book
Maximize rate of return on capital leveraging different defi protocols
Crop rotation Moving funds/capital between different protocols/currency to get the highest yield
APY Annualised percentage yield, used to compare rates of return for different yield firms
Normal Web1/ASX investment yields - 0.1 to >3.0% Web3/DEFI investment yields - up to 100% APY
3 Aspects of yield farming:
Liquidity mining - Process of distributing tokens to users of a protocol (synthetics protocol). Ie yield farms (including validators) redistribute their % fee back to stakers/miners to increase their initial rewards. This will initially be a loss for liquidity holders
Leverage - Using borrowed money for investing. Farmers can deposit coins as collateral and borrow other coins. Use the borrowed coins as further collateral to borrow more coins.
Risk - High risk farmers are willing to take. Each loan (leverage) increases risk of overcollateralization
Leverage Smart contract
bugs
DEFi specific risks (ie attacks to drain liquidity pools)
LP tokens liquidity provider tokens. Represents precipitation in a liquidity pool
Overcollaterization
COMP tokens
Yield farming strategies:
Lending - ie supply stable coins (usdt/usdc) to lending platforms. They can receive extra Comp tokens, use their lended stable coins as leverage to borrow more coins
Supplying capital to liquidity pools - supplying coins to certain liquidity pools, they are rewarded by provided extra tokens
Staking LP tokens - stake you tokens to receive other tokens
Important to note: These yielding strategies can become obsolete overnight. You need to review changes constantly and be prepared to βrotate cropsβ if necessary
Important DEFI metrics - TVL - Total value locked in various DEFi protocols
DEX Volume - Total trade volume on decentralized exchanges
Using 2 liquidity pools to convert one currency to a second currency using a common currency.
IE SOL:USDC -> USDC:BTC Routing first converts Sol to USDC, then it converts USDC to BTC
Benefit - This allows you to trade between any currencies on a DEX without Liquidity pools existing for that currency
LP (Liquidity provider) Every trade takes a small fee (0.3%), these fees go to the Liquidity provider
Price impact How much of an effect can one trade have on a liquidity pool? IE liquidity pool size: investment amount
Arbitrage trades Traders that take advantage of the price difference between 2 liquidity pools. If one pool is selling cheaper than another pool, they buy from this pool and sell on the second pool. This is beneficial for the stability of the coin as it levels the token price among all pools.
Liquidity pool risks:
Impermanent loss
Rug pulls
Allows traders to buy and sell certain coins using an algorithm that dictates how expensive something should be depending on how much of it there is.
Less of it = more expensive Supply & Demand
Example AMM:
Constant Product Automated market Maker: X*Y=K
X - Number of X tokens
Y - Number of Y tokens
K - Constant that always stays the same (ie $10)
ORDER BOOK VS AAM (Automated Market making) w/Liquidity pools (LPs) The battle of the ages in the Crypto space
Wormhole - allows ERC30 tokens to be converted to SPL tokens
Note - When adding Liquidity to a staking pool on Raydium you need to add equal parts token and Solana! This will return you an LP token which you can use to stake