Get started on the basics of trading on Stackswap and using the Stacks blockchain
Welcome Swapsters! Start with this section if you are new to Stacks or Stackswap and wish to become proficient with using Stacks and making swaps on Stackswap.
Hiro Wallet is your main tool for interacting with Stackswap and the Stacks ecosystem. Popular wallets other than Hiro Wallet include Xverse, D'Cent, and Boom. For more details on what your wallet options are, check our Medium post that goes into detail here: https://stackswap.medium.com/wallets-for-your-stx-b8819cca473c.
Please keep in mind that currently the Stackswap App only supports Hiro Wallet for transactions.
Any sites that look like Stackswap but are not through the official link are probably scams and should be avoided. Only interact with Stackswap by visiting https://app.stackswap.org/. If you are a proficient user of Stackswap and the Stackswap ecosystem, you can also execute functions on Stackswap smart contract directly, with applications such as the Hiro Wallet for Desktop. For new users and beginners, please use https://app.stackswap.org for the easiest and simplest user experience.
Once you have a Hiro Wallet account, you need to “connect” it to Stackswap. This is a bit like signing in with Google, except you are signing in with your own Hiro Wallet address. You would visit https://app.stackswap.org/ to connect your Hiro Wallet to Stackswap either from within your mobile wallet if it has a a built-in browser (like Xverse Wallet) or using Connect Wallet on the top right of your screen. When you make a swap you should expect the tokens to end up in your wallet at the end of the transactions. Tokens are not held in Stackswap nor can a transaction be reverted by anyone. Also, no one can refund swap fees or transaction fees.
Hiro Wallet accounts have addresses that look like SP…………… (i.e. a long string of letters and numbers). You can use Stacks chain explorers like explorer.stacks.co or explorer.syvita.org to look up any wallet address. These explorers pull data directly from the chain and are a great tool for identifying potential issues with your wallet application or transactions.
Stackswap is a decentralized exchange protocol that operates on the Stacks blockchain. The platform enables peer-to-peer swaps that execute without order books or an intermediary. The Stackswap platform achieves this with a liquidity pool model that uses automated smart contracts that enable prospective Swapsters to access user funded token reserves.
The key piece that makes the protocol work is Automated Market Maker (AMM) technology. An AMM is a smart contract that manages the pools that furnish the tokens to make a swap possible. When a swap is made, then AMM algorithm determines the price based on supply and demand between tokens in these liquidity pools.
When users swap with a Stackswap liquidity pool, a transaction fee of 0.3% is charged. Anyone who contributed to a Stackswap liquidity pool receives a cut of these fees proportional to their share of the entire pool, as well as LP (liquidity provision) tokens as a proof of their liquidity provision. For example, if the fees collected in a particular market equate to $100, and you provided 50% of the pool’s liquidity, you receive $50.
Once you have connected your wallet to Stackswap you are ready to make a swap. Remember, ALL Stacks transactions require a transaction fee (STX) so to do anything on Stackswap, you’ll need to have enough STX in your wallet to cover the gas fees on top of the swap amount. The steps are as follows:
- 1.Connect a wallet with sufficient balance for transaction fees and swap amount.
- 2.Select your token you want to swap for by clicking on one of the token fields.
- 3.Input an amount in either the From or To sections
- 4.Click Confirm Transaction to review your transaction details
- 5.Confirm the transaction in the Hiro Wallet extension.
Make sure you review the transaction fee in the Hiro Wallet and select a recommended fee or input your custom amount. Your transaction fee cannot be refunded. You will be able to see the status of your transaction in your wallet or by searching your wallet address in a Stacks blockchain explorer. Amounts of STX required to process a transaction can vary, but generally it is a good idea to use the amount recommended by the Hiro Wallet extension.
Every transaction on the Stacks blockchain costs STX – referred to as a transaction fee. It is paid to miners as an incentive to process transactions. Since the Stacks network has a limited amount of transactions per block, the transaction fees per transaction can rise during periods of high network activity. Transaction fees are set within the Hiro extensions before committing to a swap. Your transaction fee cannot be refunded.
There are two possible answers:
1. The swap transaction is still pending or has failed.
You can check on the status of your transaction by viewing the transaction immediately after making a swap, or checking your wallet’s transaction history on a Stacks chain explorer.
2. The swap was completed, but the token is not showing up in the Hiro extension.
Sometimes, transactions need time to be reflected in the Hiro Wallet. Some tokens may need a little time to show up. You can confirm that the transaction was successful by checking your wallet’s transaction history on a Stacks chain explorer.
First you should identify the transaction error encountered by searching for the transaction ID on a Stacks chain explorer. Look for the error code on the transaction summary page to find the error. Essentially, most of the transactions either fail due to insufficient slippage tolerance or insufficient funds in either STX or other tokens while submitting the transaction.
error code u102
If you are attempting to swap new, unlisted, or community created tokens, you must understand the transaction comes with risk. Just because you can load them into the interface (by pasting in the contract address of a token, or from the tokens list) does not mean they are verified. You can also read our documentation that contains explanations for many of the common error codes in Error Codes.
If assets suddenly go missing ffom your wallet and you are sure that you did not make those transaction, it is usually due to your wallet being compromised. You should stop using that wallet address, and send any remaining assets to a safe address and check for any viruses on your device.