BITFLOW Stable Swap: Mainnet Guide

BitFlow Finance
9 min readJun 6, 2023

Bitflow’s Stable Swap DEX is now live on Mainnet, offering users a decentralized and efficient way to swap stablecoins and different flavors of BTC and earn real yield. In this guide, we will walk you through the steps to use Bitflow’s Stable Swap DEX and provide you with tips to make the most out of your trading experience.

We value your feedback and are committed to continually improving our protocol to become the leading decentralized stable swap protocol in the industry. Please check out this guide on how to use our DEX.

  • The BITFLOW DEX is now open to the Public!
  • BITFLOW AMM V1 consists of STX<>stSTX, USDA<>sUSDT, xBTC<>aBTC trading pairs, and upcoming UWU, xUSD, DLLR and more pairs coming in the upcoming releases.
  • In case of any issues, bugs, or suggestions for improvements, please post on the BITFLOW Discord 🗨┃ report-bugs channel.

This article provides a step-by-step guide which will help you execute your first trades, swap, and earn using the Bitflow Protocol.

BitFlow StableSwap: How to Connect

First you want to make sure you have a Stacks compatible wallet, such as Leather (Formerly Hiro), Xverse Wallet app or Asigna installed, then make sure your wallet is set to MAINNET:

1 — Open the Xverse/Leather Wallet App by clicking on the browser extension

2 — Click “…”, then click “Change Network”.

3 — Select the default Stacks Mainnet, and the Wallet app will display Mainnet name.

Changing Network on the Leather Wallet (Stacks Protocol/

Ways to Use The Protocol:

  • Visit and click Launch APP or
  • Click Connect Wallet
  • Trade stable coins on the Swap page.
  • Add / Remove liquidity on the Pool page.
  • Stake your LP tokens to start earning and claiming Rewards on the Earn page.
Click “Connect your Wallet” Button on Bitflow App page to start!


The Swap function on BITFLOW provides a trustless and decentralized exchange (DEX) of price-similar assets on the Stacks blockchain, such as USDA/sUSDT, stSTX/STX or xBTC/aBTC.

These traders pay fees to the protocol, which are then proportionally claimed by liquidity providers. Yield and APY % will be calculated on a daily basis, based on total liquidity in pool and swap activity. Upcoming releases will include estimate APY yield on historical data.


Using Swap

1 — First, select the “SWAP” tab on the top menu bar to navigate to the swap panel

2 — Select a Token at the top, “base token” or token that you currently hold (sUSDT or USDA).

3— Then select the token below, the “quoted” token, or token that you will receive in the exchange. Direct trading pairs: sUSDT<->USDA, STX<->xSTX, xBTC<->aBTC. Upcoming release will allow inderect trading pairs (routes)

4 — Enter Amount that you will submit in the exchange or click MAX. The smart contract will return as much as possible of the “quoted” token for that amount.

5- Click SWAP button.

The central down-pointing arrow represents the direction of the swap transaction. The example above, stSTX will be exchanged for STX.

5 — Once you are ready to move forward, click “Confirm” which will bring up the smart contract confirmation window where you would select “Confirm” to sign the transaction.

After signing, you should see that your transaction has been broadcasted, the “Broadcasted Transaction Message” will pop up, giving you the option to “ View Transaction in Explorer” link to verify your transaction status.

Please note that it may take up to 10–30 minutes for your balance to be updated in your wallet. BITFLOW is built through Stacks smart contracts which settle on Bitcoin. This transaction time reflects the Bitcoin block speed and processing on the Stacks network.


IMPORTANT: The first step to earning rewards (fees) is to provide Liquidity to our pool and receive your LP Tokens, then you need to Escrow (Stack for X Cycles) to earn Rewards (Earn Page).

How to provide Liquidity on BITFLOW Pools

Here’s a step-by-step guide for providing liquidity in the BitFlow Pool. Becoming a liquidity provider allows you to Escrow your LP Tokens and earn rewards from the fees generated by trades in the pool.

1 — Navigate to the POOL page

2 —Select the Pool you’d like to participate

3— Toggle between Add/Remove Button: Click ADD TO POOL tab

4 — Enter Amount for the first Token (USDA for example)

5 — Optional: Enter Amount for the second token to which you want to add Liquidity (sUSDT in this example) *You have the freedom to provide liquidity from one side. No need to add a balanced amount of each token. Example: Add only USDA or sUSDT, add only STX, or xBTC to respective Pool.

7 — Click “Confirm” which will bring up the smart contract confirmation window where you would select “Confirm”

In this single side example, we’re adding 1 STX to the stSTX<>STX pool.

How to add Liquidity?

In the example below we are looking to add $1000 worth of stablecoin liquidity to the USDA-sUSDT pool.

Click “Confirm” and you will be taken to the wallet confirmation popup screen.

By adding Liquidity, you can now earn the liquidity pool fees simply by escrowing (staking) your LP Tokens on the EARN page.

How to remove Liquidity?

Removing liquidity means you want to convert your LP tokens back into the two types of tokens you originally deposited.

1 — Navigate to the POOL page and Select your Pool

2 — Click REMOVE LIQUIDITY button

3 — Select the LP Token (USDA-sUSDT-LP)

4 — Enter the amount of LP token from your liquidity to withdraw.

Remove USDA-sUSDT-LP Screen

5 — Click “Confirm” which will bring up the smart contract confirmation window where you would select “Confirm”

Note: Your LP tokens represent your percentage of all the stablecoins in the specific pool, so depending on trading activity. The number of each token that you get out might be different from what you put in.

For Example:

  • You Add-Liquidity: Send 100 USDA, 100 sUSDT → Receive some % of LP tokens
  • Suppose traders swap sUSDT for USDA more than the other way around.
  • Now, there is more sUSDT in the pool than USDA
  • Remove-Liquidity: Send some % of LP tokens → 90 USDA, 110 xUSD.


Earning Rewards involves escrowing your liquidity pool (LP) tokens. The first step is to acquire LP tokens (USDA-sUSDT-LP for example), by adding liquidity to the BITFLOW pools. Please see “How to provide Liquidity on BITFLOW Pools” above.

BitFlow is a Real Yield protocol. What does this mean?

  1. All of the yield comes directly from trading activity
  2. Liquidity providers are rewarded with the same underlying tokens they escrowed.
  3. 1 (One) Cycle on Bitflow is ~24 Hours

Here’s the breakdown of how you can maximize your earnings:

  • The protocol charges 5 basis points (0.05%) on all swaps.
  • 3 bps reserved for LP token escrowers
  • 2 bp reserved for the protocol (so that we can keep the lights on)
  • Important: StackingDAO collects 2% sell tax on stSTX →STX sales, no taxes are collected for for STX → stSTX swaps.This contribution is specifically aimed at boosting the liquidity of the stSTX-STX pair. Once this pair achieves a substantial level of liquidity, StackingDAO plans to discontinue these sell taxes.

When you escrow your LP tokens on the earn page, you’re signing an agreement that you will not remove liquidity from the pool for as many cycles as you choose. And in return, you will receive a share of the trading fees collected by the protocol during these cycles while your LP tokens are escrowed.


This panel is where you can choose and enter the amount of LP tokens you wish to escrow and select the number of cycles you’ll lock up your tokens for.

1 — First, select the “EARN” tab on the top menu bar and navigate to view the escrow panel

2 — Select your Token (USDA-sUSDT-LP or stSTX-STX for example)

3 — Enter Amount of Tokens or Click MAX

4 — Using the Slider or Cycles Buttons Select the Number of Cycles you are committing to (1 Cycle ~ 24 Hours), meaning 5 cycles ~5 days, 60 cycles ~60 days (estimates).

5 — Click “Start Earning” which will bring up the smart contract confirmation window where you would select “Confirm”

After signing, you should see that your transaction has been broadcasted popup, with the option to “View Transaction in Explorer” link to verify your transaction status.

Please note that during the escrow period you select your LP tokens (and the ability to remove the liquidity you are providing) are truly locked away and inaccessible until the conclusion of your final escrow cycle. (Takes ~ 1 Block to claim it)


By visiting the EARN page you can see your total rewards in the “My Liquidity” Panel, and on “LP Tokens Tab” in your Escrowed Actively Earning and Available To Reclaim (Once Cycle Completed).

Claiming your rewards is the next step — Please follow these instructions:

View Rewards

1 — First visit the EARN page and wait a few moment while reward balances are scanned. Rewards and Balances may take a couple of minutes to load — please do not refresh page.

2 — Choose from the Liquidity Rewards Dropdown the LP Pool you’d like to see your rewards.

3— When complete, “Rewards” tab will show the balances available to claim, and the “LP Tokens” tab will show you Principal in Escrow (Actively Earning) Principal to Claim (Available To Reclaim), these balances are updated every 1 Cycle ~24 hours.

Claim Rewards

How to claim your Liquidity Rewards

1 — Click the “REWARDS” tab on the My Liquidity Panel

2 — Click the “Claim Rewards” button which will bring up the smart contract confirmation window where you would select “Confirm”

How to claim your LP Tokens

Note: You can claim LP TOKENS only after the number of cycles you staked for has ended.

1 — Click the “LP TOKENS” tab on the My Liquidity Panel

2 — Here you’ll see your LP Tokens that Actively Earning (Escrowed), and Available To Reclaim (Cycles Completed)

3 — Check the amount of Available LP TOKENS To Reclaim

4 — Click “Claim LP Tokens” which will bring up the smart contract confirmation window where you would select “Confirm”



BitFlow Finance

A decentralized stable swap protocol that generates rewards for liquidity providers & native Bitcoin holders