
Uniswap · Reads onchain state
Reads a Uniswap V2 pair's LP total supply and the share the socket's LP balance represents. The pair's totalSupply and the socket's balanceOf are read, and share is their ratio at 18 decimals. Reach for it to compute how much of each reserve a removal will return, multiplying share by the reserves read, or to set removal floors.