ever wondered how decentralized exchanges process trades and discover prices unlike traditional
exchanges a DEX uses an automated Market maker AMM to enable a fluid trading system that borders on
autonomy liquidity and automation first of all what is market making as its name implies Market
making connotates the process involved in defining the prices of assets and simultaneously providing
liquidity to the market in other words a market maker does create liquidity for a financial asset
it must find a way of meeting the selling and buying request of Traders which in turn plays into
the pricing of said asset for instance a Bitcoin exchange uses an order book and an order matching
system to facilitate Bitcoin trades here the order book records and showcases the prices at which
Traders desire to buy or sell Bitcoin the order matching system on the other hand matches and
settles sell and buy orders at every given time the most recent price at which Bitcoin was bought
will automatically feature as the market price of the digital asset in some cases where there
are not enough counter-parties to trade with the market is said to be illiquid or prone to slippage
slippage occurs when the processing of large order volumes drives the prices of an asset up or down
to mitigate this occurrence some crypto exchanges employ the services of professional Traders in
the form of Brokers Banks and other institutional investors to continuously provide liquidity these
liquidity providers ensure that there are always counter-parties to trade with by providing bid
ask orders that would match the orders of Traders the process involved in providing
liquidity is what we call Market making and those entities that deliver liquidity are market makers
now that you understand what Market making is it's a bit easier to grasp the workings of an
automated Market maker and what are automated market makers unlike centralized exchanges
decentralized trading protocols do away with order books order matching systems and financial into
cities acting as market makers some examples are uni swap Sushi curve and balancer the goal
is to eliminate the input of third parties so that users can execute trades directly from
their personal wallets hence a majority of the processes are executed and governed by smart
contracts in other words AMMs allow traders to interact with smart contracts programmed
to enable liquidity and discover prices how do AMMs work first and foremost have it at the back
of your mind that AMMs use preset mathematical formulas to discover and maintain the prices of
paired cryptocurrencies also note that AMMs allow anyone to provide liquidity for paired assets the
protocol allows anyone to become a liquidity provider or LP to explain this further let's
take uni swap as a case study the protocol uses the popular x times y equals K equation
where X denotes the value of asset a and Y represents that of asset b k is a constant
value hence regardless of changes in the value of s A or B their product must always be equal
to a constant note that the equation highlighted as an example is just one of the existing formulas
used to balance AMMs balancer uses a more complex formula that allows its protocol to bundle up to
eight tokens in a single pool while there are a variety of approaches to AMMs as exemplified by
uni Swap and balancer the factor means that they require liquidity to function properly and negate
slippages as such these protocols incentivize liquidity providers by offering them a share
of the commission generated by liquidity pools and governance tokens in other words you get to
receive transaction fees when you provide capital for running liquidity pools once you stake your
fund you will receive liquidity provider tokens that denote your share of the liquidity deposited
in a pool these tokens also make you eligible to receive transaction fees as a passive income you
may deposit these tokens on other protocols that accept them for more yield farming opportunities
and to withdraw your liquidity from the pool you would have to turn turn in your LP tokens
impairment loss although AMMs offer significant returns to LPS there are risks involved the most
common is impairment loss this phenomenon arises when the price ratio of assets and liquidity pool
changes LPS who have deposited funds in affected pools automatically incur an impairment loss the
larger the shift in the price ratio the larger the loss however this loss is called impairment for a
reason as long as you do not withdraw deposited tokens at a time that the pool is experiencing
a shift in price ratio it is still possible to mitigate the loss the loss disappears when the
prices of the tokens revert to the original value at which they were deposited those who
withdraw funds before the prices revert suffer permanent losses nonetheless it is possible for
the income received via transaction fees to cover such losses over the past couple
of years AMMs have proven to be Innovative systems for enabling decentralized exchanges