Pair
This documentation covers Pegasys-specific functionality. For ERC-20 functionality, see Pair (ERC-20).
#
Code#
AddressSee Pair Addresses.
#
Events#
MintEmitted each time liquidity tokens are created via mint.
#
BurnEmitted each time liquidity tokens are destroyed via burn.
#
SwapEmitted each time a swap occurs via swap.
#
SyncEmitted each time reserves are updated via mint, burn, swap, or sync.
#
Read-Only Functions#
MINIMUM_LIQUIDITYReturns 1000
for all pairs. See Minimum Liquidity.
#
factoryReturns the factory address.
#
token0Returns the address of the pair token with the lower sort order.
#
token1Returns the address of the pair token with the higher sort order.
#
getReservesReturns the reserves of token0 and token1 used to price trades and distribute liquidity. See Pricing. Also returns the block.timestamp
(mod 2**32
) of the last block during which an interaction occured for the pair.
#
price0CumulativeLastSee Oracles.
#
price1CumulativeLastSee Oracles.
#
kLastReturns the product of the reserves as of the most recent liquidity event. See Protocol Charge Calculation.
#
State-Changing Functions#
mintCreates pool tokens.
#
burnDestroys pool tokens.
#
swapSwaps tokens. For regular swaps, data.length
must be 0
. Also see Flash Swaps.
#
skimSee the whitepaper.
#
syncSee the whitepaper.
- Emits Sync.