I have searched this Stack and read tutorials like this one: https://vomtom.at/how-to-use-uniswap-v2-as-a-developer/, but I'm still not 100% I understand what "liquidity" and "reserves" are.
Let's take an example. I want to track the number of tokens for a pair on a DEX (decentralized exchange), through smart contracts. Let's say I want to track WAVAX/USDT.e on the platform Trader Joe. The pair can be tracked here: https://snowtrace.io/address/0xed8cbd9f0ce3c6986b22002f03c6475ceb7a6256#readContract (NOTE: this page tracks the pair, not the individual tokens). If we go to Contract > Read contract we can actually query the smart contract directly from the page. If we trigger getReserves
we get two numbers back:
reserve0: 812366423471170692437931
reserve1: 69748145940889
AFAIK, reserve1 is the "raw reserve" of USDT.e (since we're looking at the pair WAVAX/USDT.e). We know that USDT.e uses 6 decimals, so the real reserve of USDT.e is: 69,748,145.940889
. Correct?
If this process is correct, it means that - when I queried - there was ~69 million USDT.e "on the DEX". Correct?
These 69 million, is that what is called the "liquidity" of the token? Does that mean that the maximum amount of USDT.e I can buy from this DEX is 69 mill?