Skip to main content

2 docs tagged with "swaps"

View all tags

Pricing

As we learned in Protocol Overview, each pair on Pegasys is actually underpinned by a liquidity pool. Liquidity pools are smart contracts that hold balances of two unique tokens and enforces rules around depositing and withdrawing them. The primary rule is the constant product formula. When a token is withdrawn (bought), a proportional amount must be deposited (sold) to maintain the constant. The ratio of tokens in the pool, in combination with the constant product formula, ultimately determine the price that a swap executes at.

Swaps

Token swaps in Pegasys are a simple way to trade one ERC-20 token for another.