https://images.unsplash.com/photo-1520881685182-f4f6a103adf5?ixlib=rb-1.2.1&q=80&cs=tinysrgb&fm=jpg&crop=entropy

DeFi (Dencentralized Finance) is the name for tools on blockchain to put your money to work.

This includes borrowing, lending, trading and earning interest.

The focus here will be on trading (exchanging one token for another token) and some problems that exist with the current tools for trading.

Typically a trade is between two parties, trading pokemon cards, exchanging numbers, etc.

However, how trading mostly works on the blockchain is on Decentralized Exchanges (DEX) using something called an Automated Market Maker (AMM), where the 2nd party is a group of people automatically accepting trades.

The automated market maker makes it possible for someone to trade a token anytime, without needing offers to accept the trade.

For example, if Bob wants to trade USDC (stablecoin worth $1 USD) for BTC (Bitcoin), he would normally have to find someone who would take his USDC and give him Bitcoin. People go to exchanges like Coinbase or Binance to do this, and all the people lined up to trade with other people are what is called an order book.

The Automated Market Maker allows Bob to trade USDC for BTC with pool participants, which are always willing to trade, regardless of price. He does this by putting his USDC in a “pool” of USDC and Bitcoin, in which he receives BTC out of the pool.

When Bob makes this trade, the pool now has more USDC and less BTC, as he added USDC and removed BTC. Due to supply and demand, when supply goes down, demand typically increases. This is the same dynamic in this pool- more USDC in the pool means the supply of BTC goes down, raising the price of Bitcoin for people wanting to trade in this pool.