UniSat
  • home
    • UniSat Documentation Home
    • Work Priorities
      • UniSat 2025 Q2 Work priorities
      • Overview of UniSat 2025 Work Priorities
      • Production Roadmap in Q4 2024
  • 🛠️dev
    • UniSat Developer Center- Open API
      • UniSat Developer Center Plans
      • How to Acquire a UniSat API Key
      • Enable the two-factor authentication
      • FAQ
    • Open API documentation
      • UniSat Wallet
        • Connect with UniSat Mobile Wallet
        • Supported Chains
      • API for Bitcoin
        • General
          • Blocks
            • Get Blockchain Info
            • Get Block Transactions
          • Transactions
            • Get Recommended Fees
            • Get Tx Info
            • Get Tx Inputs
            • Get Tx Outputs
            • Get UTXO Info
          • Addresses
            • Get Address Balance
            • Get Address History
            • Get BTC UTXO
            • Get Inscription UTXO
          • Inscriptions
            • Get Inscription Info
            • Get Inscription Content
            • Get Inscription Events
            • Get Address Inscriptions
        • BRC-20
          • Get Best Block Height
          • Get BRC-20 List
          • Get BRC-20 Status
          • Get BRC-20 Ticker Info
          • Get BRC-20 Holders
          • Get BRC-20 Ticker History
          • Get BRC-20 Total History By Height
          • Get BRC-20 Tx History
          • Get Address BRC-20 Summary
          • Get Address BRC-20 Ticker Info
          • Get Address BRC-20 History
          • Get Transferable Inscriptions
        • Runes
          • Get Runes Status
          • Get Runes Info List
          • Get Runes Info
          • Get Runes Holders
          • Get Address Runes Balance List
          • Get Address Runes Balance
          • Get UTXO Runes Balance
          • Get Address Runes UTXO
          • Get Runes Events
        • BRC20-Swap
          • Get Global Config
          • Get Address Balance
          • Get Deposit Info
          • Get Address All Ticker
          • Deploy Pool
          • Add Liq
          • Remove Liq
          • Swap
          • Get All Pool List
          • Get My Pool List
          • Get My Pool
          • Get Overview
          • Get Gas History
          • Get Liq History
          • Get Swap History
          • Get Rollup History
          • Get Deposit List
          • Deposit
          • Withdraw
          • Cancel Withdraw
          • Get Withdraw Process
          • Get Withdraw History
          • Get System Status
        • UniSat Inscribe
          • Get Order Summary
          • Get Order List
          • Create Order
          • Search Order
          • Refund estimate
          • Refund
          • Create BRC-20 DEPLOY
          • Create BRC-20 MINT
          • Create BRC-20 TRANSFER
        • UniSat Marketplace
          • BRC20 Marketplace
          • Runes Marketplace
          • Collection Marketplace
          • Domain Marketplace
        • UniSat Collection
          • Get Collection Status
          • Get Collection List
          • Get Collection Info
          • Get Collection Holders
          • Get Collection List By Address
          • Get Collection Items
          • Get Collection Summary By Address
          • Get Collection Items By Address
          • Get Collection List By Inscription
          • Add Items
          • Remove Items
      • API for Fractal Bitcoin
        • General
          • Blocks
            • Get Blockchain Info
            • Get Block Transactions
          • Transactions
            • Get Tx Info
            • Get Tx Inputs
            • Get Tx Outputs
            • Get UTXO Info
          • Addresses
            • Get Address Balance
            • Get Address History
            • Get BTC UTXO
            • Get Inscription UTXO
          • Inscriptions
            • Get Inscription Info
            • Get Inscription Content
            • Get Inscription Events
            • Get Address Inscriptions
        • BRC-20
          • Get Best Block Height
          • Get BRC-20 List
          • Get BRC-20 Status
          • Get BRC-20 Ticker Info
          • Get BRC-20 Holders
          • Get BRC-20 Ticker History
          • Get BRC-20 Total History By Height
          • Get BRC-20 Tx History
          • Get Address BRC-20 Summary
          • Get Address BRC-20 Ticker Info
          • Get Address BRC-20 History
          • Get Transferable Inscriptions
        • Runes on Fractal
          • Get Runes Status
          • Get Runes Info List
          • Get Runes Info
          • Get Runes Holders
          • Get Address Runes Balance List
          • Get Address Runes Balance
          • Get UTXO Runes Balance
          • Get Address Runes UTXO
          • Get Runes Events
        • UniSat Inscribe on Fractal
          • Get Order Summary
          • Get Order List
          • Create Order
          • Search Order
          • Refund estimate
          • Refund
          • Create BRC-20 DEPLOY
          • Create BRC-20 MINT
          • Create BRC-20 TRANSFER
        • UniSat Marketplace on Fractal
          • BRC20 Marketplace
          • Runes Marketplace
          • Collection Marketplace
          • Domain Marketplace
        • UniSat Collection on Fractal
          • Get Collection Status
          • Get Collection List
          • Get Collection Info
          • Get Collection Holders
          • Get Collection List By Address
          • Get Collection Items
          • Get Collection Summary By Address
          • Get Collection Items By Address
          • Get Collection List By Inscription
          • Add Items
          • Remove Items
        • Get Fractal Circulating Supply
        • Get Fractal Total Supply
        • Get Fractal Total Address Count
        • Get Fractal Rich Address List
        • PizzaSwap
        • CAT Market
        • CAT20-DEX
          • Get Token Price
          • Get Market Stats
        • Fractal Development Support (testnet)
      • API Version Upgrade Notes
        • API Version Upgrade Notice: Untrack Deprecated brc20 Inscriptions
      • API Demos
      • UniSat Game Framework
    • Development for brc-20 protocol
      • brc20-swap Introduction
        • What Is an Automated Market Maker?
        • Liquidity providers (LPs)
        • Testnet guide
        • Technical Q&A
        • Modules, withdrawals, and decentralization of brc-20
      • Single-Step Transfer
    • Developer Service Legal Disclaimer
  • đź’ˇServices (Bitcoin)
    • UniSat Wallet
      • What is Signet?
      • UniSat Wallet FAQ
      • UniSat Wallet Address Type
      • Transfer brc-20 in UniSat Wallet
    • UTXO Management
      • Understanding UTXO
      • How to unlock inscription/runes utxo and send as normal btc in utxo management.
      • FAQ
    • PizzaSwap
      • How to interact with PizzaSwap?
      • Green Channel User Guide
      • Guides for withdrawing your assets from PizzaSwap or brc20-swap
      • LPfest: Step-by-Step Guide
    • Product Chronicles
      • UniSat Wallet - Release Notes
        • v1.6.2
        • v1.6.1
        • v1.6.0
        • v1.5.8
        • v1.5.4
        • v1.5.2
        • v1.5.1
        • v1.4.10
        • v1.4.9
        • v1.4.6
        • v1.4.5
        • v1.4.2
        • v1.4.1
        • v1.4.0
        • v1.3.3
        • v1.3.2
        • v1.3.1
        • v1.3.0
        • v1.2.9
      • Timeline of brc-20 Swap and PizzaSwap Development
  • đź’ˇServices (Fractal Bitcoin)
    • Fractal Service Links
    • FairPool
      • Getting Started with FairPool
    • Runes on Fractal
      • How to Etch Runes?
      • How to Mint Runes?
      • How to Trade Runes?
    • CAT Support
      • How to send / receive CAT20?
      • How to Buy and Sell CAT on UniSat CAT Market?
    • Simple Bridge
      • How to use the Simple Bridge
    • Guides & Tutorials
      • How to Submit Collection in GitHub?
      • Full Node Configuration
  • đź“–Knowledge Base
    • Extension Wallet Safety Guide: Protecting Your Assets
      • Best Practices for Safety
    • Bitcoin Basics
      • What is Bitcoin?
      • How does Bitcoin work?
      • Understanding Bitcoin Address Types
      • Glossary
    • .unisat Names
    • Name recognized and resolved
    • Runes
      • How to Etch Runes?
      • How to Mint Runes?
      • How to Trade Runes?
  • 🎏Community
    • Reputation System
      • Guides & Explanations
        • UniSat Marketplace Fee Rates
        • FAQ
          • Drops FAQ
      • Points
      • Titles
      • Credits
    • Events
      • brc20-swap Early Access
      • UniSat OG Pass Collection
      • LPfest
      • Babylon Staking Activity
        • How to Transfer $BABY to a Cosmos Wallet
        • How to Participate in BTC Staking on Babylon Using UniSat Wallet
    • Assets potentially associated with UniSat's products
Powered by GitBook
On this page
  • Slippage
  • Impermanent loss
  • Price impact
  • Service fee
  • Rollup fee
  1. dev
  2. Development for brc-20 protocol
  3. brc20-swap Introduction

What Is an Automated Market Maker?

This page explains the inner workings of an Automated Market Maker (AMM).

brc20-swap implements the functionality of an automated market maker (AMM). This is the underlying technology that powers most decentralized exchanges (DEXs). You don’t need to have a counterparty (another trader) on the other side to make a trade. Instead, you interact with a liquidity pool by exchanging for a price calculated by a math formula.

brc20-swap specifically implements the x * y = k formula, where x is the amount of one token in the liquidity pool, and y is the amount of the other. In this formula, k is a fixed constant, meaning the pool’s total liquidity always has to remain the same.

Slippage


Slippage occurs when the actual price you get for a trade is different from the expected or quoted price. It often happens in situations of high market volatility or low liquidity. If you want to buy or sell an asset at a specific price, but the market conditions change before your trade is executed, you might end up with a slightly different price than you anticipated. Slippage can result in a higher or lower cost for your trade than you initially planned.

Impermanent loss


Impermanent loss is a term used in liquidity provision. When you provide liquidity to a pool by depositing two different assets, the value of your assets can change over time due to price fluctuations. Impermanent loss occurs when the value of your assets in the pool is less than if you had simply held those assets without providing liquidity. It's "impermanent" because the loss can decrease or disappear as the prices of the assets change.

Price impact


Price impact refers to the effect a large trade has on the price of an asset in a market. When someone buys or sells a significant amount of an asset, it can cause the price to move in the direction of the trade due to the imbalance in supply and demand. The larger the trade relative to the overall liquidity in the market, the greater the price impact. Price impact can lead to higher or lower prices depending on whether it's a buy or sell order.

Service fee


Each swap incurs a 0.3% transaction fee, of which 1/6 goes to the platform as fees, and the remaining portion is received by LPs.

LP fees are accrued inside the pool. They don't need to be claimed.

LP tokens represent your share of assets in the pool. As fees accumulate in the pool, the amount of brc-20 assets backing your LP tokens will grow automatically. Just keep in mind, impermanent loss can affect your profitability.

Rollup fee


brc20-swap is able to reduce bitcoin network fees significantly. The brc20-swap sequencer bundles transactions and submits them to the Bitcoin network. brc20-swap charges a fee in SATS (brc-20) to cover Bitcoin network fees.

Previousbrc20-swap IntroductionNextLiquidity providers (LPs)

Last updated 8 months ago

🛠️