Atomic Swaps

Atomic swaps are trustless exchanges between digital assets of two users of the Stacks blockchain.

Currently, exchanges between STX and any SIP-010 compliant fungible tokens (FT) are supported.

STX - any FT

A swap consists of two steps:

  1. the buyer of the fungible token has to put STX into escrow.

  2. the seller of the fungible token sends the fungible token to the buyer and receives the STX in the same transaction.

A fee of 1% is applied. It is paid by the buyer in STX or FRIE tokens. It is hold in escrow and released when the swap was completed.

All swaps can be canceled after 100 blocks.

Create a Swap

The buyer of the fungible token creates the swap.


After the clicking on “Buy FT”, the Hiro Wallet will popup and ask the buyer to confirm the tx.


If you as a seller want to buy from a particular user, you can enter the stx address or the username of the user in the optional seller field.

Swap ID

The transaction result contains the swap id that must be shared with the seller. The transaction result looks something like this:


The details of the swap with id 8 can then be found at For other swaps, just replace the id at the end of the link.

Finalize Swap

The seller of the FT have to confirm the swap conditions


Follow the steps of any fungible token. For the links to a swap, you can use stx-mia instead of the stx-ft.


Follow the steps of any fungible token. The token identifier is prefilled if used stx-fari instead of the stx-ft. The start url is

Example of a completed swap:


Follow the steps of any fungible token using the follwoing url:

Example of a completed swap:

Smart Contract

The smart contract was deployed at stx-ft-swap-v1 by SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.

The fee contracts are

  • STX fees: stx-ft-swap-v1-fixed-fees by SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9

  • FRIE fees: stx-ft-swap-v1-fixed-frie-fees by SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9