Pool
This documentation covers DMM-specific functionality. For ERC-20 functionality, see Pair (ERC-20).
#
Code#
AddressSee Pool 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.
#
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. Also returns the block.timestamp
(mod 2**32
) of the last block during which an interaction occured for the pair.
#
getTradeInfoReturns the actual and virtual balances of token0 and token1 used to price trades and distirbute liquidity. Also returns the dynamic trade fee being charged to the trader.
#
kLastReturns the product of the reserves as of the most recent liquidity event. See Protocol Fee.
#
State-Changing Functions#
mintCreates pool tokens, which are sent to the to
address.
#
burnDestroys pool tokens.
#
swapSwaps tokens.
#
skimGets actual token balances to match the reserve accounted balances reserve0
and reserve1
.
#
syncSyncs virtual and actual reserve accounted balances with actual token balances.
- Emits Sync.