A liquidity pool is a smart contract that holds reserves of two or more tokens and allows anyone to deposit and withdraw funds from them, but only according to very specific rules. One such rule is the constant product formula x * y = k , where x and y are the reserves of two tokens, A and B.