Pair
The Pair contract represents a liquidity pool for a specific token pair. It manages token balances, tracks reserves, and handles the logic for token swaps within the PumpSpace protocol.
Each Pair is uniquely created by the Factory and is responsible for maintaining the state and rules of a single trading pair.
Functions
token0
Returns the address of the first token in the pair (sorted by address).
token1
Returns the address of the second token in the pair (sorted by address).
getReserves
Returns the current reserves of
token0
andtoken1
, along with the timestamp of the last block in which the reserves were updated.
swap
Swaps tokens within the pair contract. Either
amount0Out
oramount1Out
must be non-zero. Used internally during trades initiated via the Router.
Last updated