DeFi, a Web3 and crypto term that you always hear and see everywhere nowadays. The question is, have you been really using it? A lot of my friends are still stuck in the 2018 crypto era, the time when people are still buying ICO (Initial Coin Offering) tokens from exchanges. Fast forward to 2022, with less than 20 hours of learning and copying, an average person with okay-ish crypto knowledge could simply launch their own token and smart contract on chain. The development in the crypto world is too fast and we would not be able to progress if never had a chance to get hands-on. Given this situation, I decided to write a simple guidance manual for my friends and also crypto newcomers to get onto DeFi as quickly as possible.
DeFi, aka decentralised finance, bloomed in these 3 years specifically after the pandemic whereby every country’s government is handing free money to their people. The middle classes which have a lesser financial burden, trying to find a way to let their extra money work for them. DeFi was the answer. More and more people have figured out this DeFi thingy was the real deal and it successfully attracted even more money pouring into the ecosystem.
Before the global financial crisis in March 2020, bitcoin was slight above $10K and only to skyrocket in October. DeFi at the same time, the total value locked (TVL) increased 366% to around $7.5 billion from $2.05 billion while bitcoin was still remaining flat for the whole 10 months.
Here comes our first jargon in DeFi: TVL. TVL stands for “Total Value Locked”, the amount of user funds deposited in DeFi protocols. These funds could be vested in the project for several functions, such as liquidity pools, staking, or lending. Try to imagine the money you deposited in the banks in the real world, the difference is, we are our own bank, and we decide what to do with our deposits instead of the banks’ decision. In the very first chapter of this “Shortcut to DeFi” series, I am not going to start with depositing or staking but to get you out of your comfort zone first. Most crypto users begin their Web3 journey by using centralised exchanges, I'm no exception. Even though DeFi granted huge success in recent years, as above mentioned, a lot of crypto users have heard of it but never utilize it. So let’s kickstart our DeFi journey from the easiest level - decentralised exchange (DEX).
There are tons of DEXes out there, it is up to you to use any one of them
Among all the DEXes, Uniswap is the largest among them. While Uniswap may not be the first DEX ever created, it is indeed the pioneer in the concept of liquidity pool (LP) mechanism. A same-name DeFi protocol was created in 2018 and it's no exaggeration to say it is the mother of all DEXes. I will talk more about the liquidity pool in the next few chapters, let’s swap some tokens for now.
You can either visit the homepage at https://uniswap.org/ or directly to the application at https://app.uniswap.org/
Expected Output:The estimated total amount of tokens you can get after the swap.
Price Impact: The percentage of price impact on the market. A low liquidity pool would cause a high price impact, be cautious if it is high as you will lose out money by getting fewer than expected tokens. It happens if you are buying too much at one go or trading for some shitcoins. The lower the impact the better.
1 XEN should be worth less than 0.00001 ETH but if anyone is trying to buy in a bulk, wiping all the liquidity, 1 XEN would suddenly be worth 0.00127 ETH
Slippage: The difference in percentage that you are willing to accept while executing a swap. 0.5% is usually the default rate. If you are swapping coins when there happens to be a huge price movement, say ETH price drops 2% or XEN price increases 2%, likely your transaction will fail as the slippage is only 0.5%. In this case, you can manually increase the slippage to 5% or even move via the options button. And again, high slippage is only required when trading for shitcoins. Do not anyhow adjust slippage unless you know what you are doing.
Network Fee: Transaction fee paid to the network miners as well as the protocol (Uniswap), also don’t forget about the gas fee. It’s not cheap to use Ethereum’s DEX, you wouldn’t see such high fees required on other blockchains. Bear in mind a failed transaction due to low slippage would cost almost the full network fee as well.
The difference in network fee between Ethereum mainnet and Optimism
I believe you are having a big question mark above your head now. Where is the order book?
In a centralised exchange (CEX), be it crypto or stock exchanges, the order book is one of the most representative features. An order book is an electronic list of buy and sell orders for an instrument, organized by price level. Say bitcoin is the instrument, the order book lists the number of bitcoins being bid or asked at each price point or market depth. To let the order book to work as intended, it requires the server to provide the speed in milliseconds and handle the volume in millions. A blockchain transaction might probably take at best, 10 seconds to execute, but it is still considered too slow compared to the CEX server, which easily executes an order within one second.
When talking about the order book, another party is involved too – the market makers. Market makers provide liquidity by placing a list of orders on both sides of the trade. DEX has no such traditional market maker, Automated Market Maker (AMM) is implemented instead. Again, we will talk about AMM in a later chapter. As for now, you can view swapping in DEX as placing a market order in CEX. Most DEXes have no order book while some of the new protocols did implement the order book feature but it has no way to compete with the CEX one.
DEX is very simple and convenient to use, it has no account creation, no upload of personal credentials, no KYC, no region lock, etc. Often we heard that CEXes will halt trading or withdrawal of certain coins if anything happens, in order to “protect” the users as the exchanges claim. Even some of the largest exchanges are unavoidably having this kind of issue. DEX has no such hassle and runs 24/7 without any downtime. With just the browser’s crypto wallet, we are able to access different DEXes within a few clicks.
To trade in a CEX, we must first transfer our crypto asset into the account we created with identity proof and KYC. Anything that happened to the exchange would put our assets at risk. However, this doesn’t mean using CEX is totally a bad idea. CEX offers low fees when trading, sometimes even zero fees for spot trading. Besides, our asset is rather safe from hackers in the custodian of CEX, instead of lying there in the internet browser. It is not easy to hack and withdraw funds deposited in the CEX due to authentication, e.g., Google’s authenticator, Apple’s Touch ID, 2FA, etc.
However, as we dig into the world of blockchain deeper and deeper, we will slowly realize the constraint of CEX, and start using DEX more frequently. And from here, we begin our journey to explore the world of DeFi.