Replace order book model with autonomous protocol.
AMM -algorithm that helps in pricing of assets.
Trading pairs represented as individual liquidity pools.
Liquidity providers work by adding funds to liquidity pools. Liquidity providers can earn a certain share of fees from the trades occurring in their pool for providing liquidity in the automated market maker algorithm.
Higher levels of liquidity in the pool ensures limited possibilities of slippage for large orders.
Impermanent Loss: happens when the price ratio of the tokens you have deposited in a liquidity pool changes after you have deposited the tokens in the pool.
Arbitrage is the simultaneous buying and selling of, in our case, a token to make a profit
Yield Farming:
First an investor stakes their coins by depositing them into a lending protocol.
In return for providing liquidity to the pool, LPs get a reward which comes from fees generated by the underlying DeFi platform, or some other source.
On top of fees, another incentive to add funds to a liquidity pool could be the distribution of a new token.
APR doesn’t take into account the effect of compounding, while APY does. Compounding, means directly reinvesting profits to generate more returns.
Uniswap
It is a collection of smart contracts that define a standard way to create liquidity pools, provide liquidity, and swap assets.
Each pool has 2 assets. Pools keep track of aggregate liquidity reserves. x*y = k
The reserves are automatically balanced after each trade.
v3: liquidity allocated within custom price range(concentrated liquidity).
As asset's price increases or decreases, it may exit the price bounds that LPs have set in a position. When price exits the position interval, the position's liquidity becomes inactive.
Ticks: Continuous price space divided with ticks to achieve concentrated liquidity. Ticks are spaced such that an increase or decrease of 1 tick represents a 0.0001% increase or decrease in price at any point in price space.
Ticks- boundaries for liquidity positions. When a position is created, the provider must choose the lower and upper tick that represents their position's borders.
Crossing an active tick increases the cost of the transaction in which it is crossed, as the tick crossing will activate the liquidity within any new positions using the given tick as a border.
Narrow tick spacing improves prices for stable coin swaps.
Curve Finance
Allows users and other decentralised protocols exchange stablecoins (DAI to USDC for example) through it with low fees and low slippage.
Curve implements StableSwap invariant of stablecoin trades, which have significantly lower slippage.
Stable coins - problem of price stability and liquidity.
StableSwap - automated liquidity provider for stablecoins
Demand side - offers Uniswap like automated exchange with low slippage.
Supply Side - offers a multi-stablecoin saving account
Yield Farming:
Uniswap
x*y = k
Curve Finance