Arbswap token swaps

Arbswap exchanges tokens through liquidity pools on Arbitrum One and Arbitrum Nova. The selected pool’s reserves, pricing curve and trading fee determine the output. Its conventional AMM and StableSwap designs use different pricing rules, with StableSwap designed for exchanges between closely pegged assets.

Updated on
Table of contents
Contents

Pool Reserves and Trade Size

An automated market maker (AMM) calculates exchange amounts from the assets available in a pool and the pricing rule that relates them. A swap increases the pool’s holding of the input asset and reduces its holding of the output asset. The resulting balance changes affect subsequent quotes.

Trade size matters relative to the available reserves. A larger trade can move further along the pricing curve and receive a worse average exchange rate, even when the wider market price has not changed. This effect is price impact. A token’s displayed market price or the protocol’s total liquidity cannot establish the output available from a particular pool.

StableSwap Pricing Near a Peg

Beosin’s Arbswap-StableSwap Smart Contract Security Audit V1.0, dated April 27, 2023, describes a Curve-like pricing algorithm and pools containing two or three assets. The reviewed design covered dollar-pegged assets such as USDC, USDT and DAI, as well as related derivative assets.

A stable pricing curve can reduce price impact near the assets’ expected relative values when the pool has sufficient liquidity. That behavior depends on both the asset relationship and the pool’s balance. If one asset loses its peg or the output asset becomes scarce, the exchange rate can deteriorate. StableSwap does not guarantee an exchange at parity.

The relevant distinction is the pool’s pricing mechanism. StableSwap is itself an AMM; its specialized curve should not be treated as interchangeable with the curve of a conventional token-pair pool.

Trading Fees, Gas and Slippage

Arbswap’s AMM overview of May 11, 2023 described a 0.2% swapping fee accruing to liquidity providers in the relevant pairs. The figure concerned fees generated by trading activity and shared through providers’ pool interests. It does not establish a universal current fee for every pool design or cross-network route.

Network gas is a separate transaction cost. An ERC-20 spending approval can also require gas when a separate approval transaction is needed. A native ETH input does not use an ERC-20 allowance.

Slippage describes the difference between the quote and execution as market or pool conditions change. For a route that enforces a minimum-output amount, that limit is denominated in the output token and sets the lowest acceptable receipt. Execution below the enforced limit causes the swap to revert. Allowing more slippage permits a worse result; it does not increase the pool’s reserves or remove price impact.

Quote, Permission and Settlement

Stages of an allowance-based ERC-20-to-ERC-20 pool swap on Arbitrum One or Arbitrum Nova
Stage Meaning and Condition
Network and token selection The input and output are specific token contracts on the selected network. A balance on Arbitrum One is separate from a balance on Arbitrum Nova.
Pool quote The input amount is priced using the selected AMM or StableSwap pool’s balances, pricing rule and applicable fee. The quote reflects that pool state.
Spending authorization The spending contract needs sufficient allowance for the ERC-20 input. An existing allowance may cover the amount; a separate approval changes spending permission without completing the exchange.
Swap limits and signature The transaction specifies the exchange and its applicable limits. For a minimum-output route, the output-token limit must be set before the swap is authorized.
Transaction submission A submitted transaction can remain pending. A signature or transaction hash alone does not establish that the pool exchange executed successfully.
Execution result A successful swap transfers the relevant tokens and changes pool balances under the contract’s rules. A reverted swap does not complete the exchange, although the attempted on-chain transaction can consume gas.
Stages of an allowance-based ERC-20-to-ERC-20 pool swap on Arbitrum One or Arbitrum Nova (Arbswap token swaps) - diagram

View full-size image

Cross-Network Route Boundaries

Arbswap’s Symbiosis collaboration announcement of May 26, 2023 described Arbitrum Nova on-chain swaps as part of cross-chain routes. A pool quote covers the asset exchange within that route; cross-network delivery also depends on the transport mechanism and destination conditions. Confirmation of the source-chain transaction alone does not establish receipt on the destination network.

Arbswap separately published an ARBS-specific bridging guide on November 2, 2023 using LayerZero’s OFT mechanism between Arbitrum One and Arbitrum Nova. That token-specific transfer mechanism does not establish a general swap route for every token pair.