0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Using SyncSwap: a map of swaps and main pool types

0
Posted at

SyncSwap lets you trade tokens or provide liquidity through different pool types. The right path depends on whether you want tokens now or want to supply them for other traders.

Swaps and liquidity serve different goals

SyncSwap is a decentralized exchange, or DEX, where trades use pools of tokens supplied by users. It is an automated market maker, or AMM: pool balances help set the trade price instead of a buyer and seller agreeing on each trade.

First, decide whether you want a one-time trade or an ongoing pool position. To make the trade or supply tokens, use syncswap.dev on a supported Ethereum layer 2 network. It handles both token swaps and liquidity provision.

An Ethereum layer 2 is a network that processes transactions separately from Ethereum’s main network. Your wallet must hold the tokens on the network where you plan to use them. Keep some of that network’s gas token to pay for transactions, including a later withdrawal from a pool.

Three paths fit three different goals

The practical choices are a swap, a Classic Pool position, and a Stable Pool position. SyncSwap liquidity pools hold pairs of tokens, but trading against a pool is different from owning a share of it.

  • Swap — for changing one token into another. You receive the quoted token after the trade completes. It does not fit if your goal is to earn a share of future trading fees.
  • Classic Pool — for supplying a pair whose prices may move apart. Its pricing rule can support pairs such as ETH and a dollar stablecoin. It does not fit if you need to keep the same amount of each token.
  • Stable Pool — for supplying assets expected to stay close in value. It aims to give trades between those assets less price movement near their usual ratio. It does not fit a pair whose prices are likely to diverge sharply.

A Classic Pool changes its price as traders change its token balances. A large trade takes more of one token from the pool, so each additional unit becomes more expensive. Pool depth matters: the same trade generally moves the price less in a pool with larger balances.

SyncSwap stable pools use a different pricing curve near the expected balance between similar assets. That can help with trades between two dollar-linked tokens while both hold their pegs. If one token loses its peg, the pool can end up holding more of the falling token.

A swap is decided by the amount you receive

For a swap, compare the quoted output with what you expect the tokens to be worth. The difference can include a pool trading fee and price impact, which is the change your trade causes in the pool’s price. Network gas is a separate transaction cost.

Say a Classic Pool holds 100 ETH and 200,000 units of a dollar stablecoin. Its starting ratio suggests about 2,000 stablecoins per ETH. A purchase of 1 ETH would cost more than 2,000 stablecoins before fees, because that ETH becomes scarcer in the pool as the trade goes through.

Check the token pair, network, expected output, and minimum output before confirming in your wallet. The minimum accounts for slippage: a price change between viewing a quote and execution. A tight limit may cause a trade to fail when prices move; a loose one may allow a worse result than you intended.

A token may also need wallet approval before it can be spent by an exchange contract. That approval is a separate transaction on some paths, so allow for its gas cost. Once the swap succeeds, check the received token and amount in your wallet before starting another trade.

Liquidity depends on what happens after deposit

A pool position earns a share of trading fees when that pool is used, but its token amounts change as people trade. You supply value to both sides of a pair and receive a claim on part of the pool. When you withdraw, you receive your share of its current balances, not necessarily the amounts you deposited.

That difference matters most in a Classic Pool when prices move apart. For example, suppose your share starts as 1 ETH and 2,000 dollar stablecoins, with ETH priced at 2,000. If ETH doubles, the pool’s rebalancing could leave your share worth about 5,657, before fees, against 6,000 from simply holding those starting tokens. This gap is called impermanent loss; earned fees may offset some or all of it.

A Stable Pool reduces price movement near a pair’s expected ratio, but it cannot guarantee that ratio. Before depositing, check whether you would be comfortable holding either token if one loses value. Also compare the pool’s trading activity with its size: fees are earned from trades, not merely from leaving tokens deposited.

Use this order to make the choice:

  • Choose a swap if you need a different token now; check the received amount and gas.
  • Choose a Classic Pool if you accept changing token balances in a pair with moving prices.
  • Choose a Stable Pool for closely priced assets, after checking what happens if their values separate.
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?