Back
Definition of Swaps and How to Calculate Your Gains
Shailee Adinolfi
&
Annie Pei
General Wallet Use
Crypto swaps allow users to convert a pair of cryptocurrency coins or tokens without going through a centralized entity or exchange. Swaps are made for currencies or tokens that are similar in value but not the same. For example, swapping BTC for STX.
What Is a Swap?
A crypto swap involves converting one token for another using a DeFi platform or wallet. They help users minimize transaction expenses, save time, and improve security by eliminating intermediaries.
A swap is sometimes confused with an exchange of coins, although the two are fundamentally different. Crypto exchanges function similarly to banks, allowing you to purchase and sell cryptocurrency just like you would fiat money. The exchange, like the bank, would function as a governing intermediary. Crypto swaps, on the other hand, are similar to exchanging fiat money directly with a friend, with no intermediaries involved.
To calculate the gains from your swaps, you need to:
Subtract the buying price and gas fees from the selling price.
Alternatively, use profit calculators to automate the process.
How Do Swaps Work?
Swapping cryptocurrencies involves using a crypto wallet or DeFi platform to directly exchange one asset for another. The process happens through the blockchain. All you need to do is select the assets you wish to swap from your wallet, determine which tokens you'd like to receive, approve the transaction, and the swap will automatically be executed.
Swaps help users diversify their portfolio, cut transaction fees, and even generate profits. There are almost fewer limitations when it comes to swapping.
How Is a Swap Structured?
Swaps are made possible thanks to smart contracts, which are self-executing programs that manage the swap automatically. These contracts define the terms of the swap, ensuring that both sides of the transaction occur securely and simultaneously. It is similar to a vending machine in that, when you enter the correct amount of money and request the product by clicking the appropriate button, the program (the smart contract) activates the machine and dispenses your chosen snack or beverage.
So, a typical swap would consist of:
The Assets: The cryptocurrencies you are swapping (for example, BTC for STX).
The Smart Contract: The self-executing program that verifies and processes the swap, locking and releasing the assets once both parties meet the conditions.
Calculations of Gains or Losses
Calculating your gains or losses before and after swapping cryptocurrency is critical for making informed decisions, maximizing your gains, and determining whether a swap will benefit you or not.
Here are the two most typical approaches:
1. Subtract the buying price and gas fees from the selling price
It is a basic mathematical calculation: Selling Price - Buying Price - Gas fees = Your Gains or Losses
Say you purchased Bitcoin for its trading value of $50,000 and sold it when it reached $55,000, paying gas fees that amounted to $200. To calculate your earnings, deduct the purchase price and gas fees from the selling price.
In this case, $55,000 - $50,000 - $200 equals $4,800. Because the number is positive, you have profit! If the result was negative, you would have incurred losses.
2. Use Automatic Profit Calculators
If you do not want to do the calculation or have lots of swaps to compute, there are automatic profit calculators that will save you time.
One of the most user-friendly calculators is the Coinmash Crypto Profit Calculator. You will get your profit or loss, as well as other vital information like the purchase price, current price, return on investment (ROI), and present value.
Follow these simple steps:
Add the amount invested.
Add the token.
Add the buy and sell price or date purchased and sold.
Press the “Calculate ROI” button.
Other Swaps
Swaps are most easily done directly through your crypto wallet; however, there are other options:
DEX swaps: These swaps use decentralized exchanges (DEXs) to connect buyers and sellers of various coins or tokens across multiple blockchains.
Atomic swaps: These are direct transactions between two parties that use a particular smart contract known as a hash time-locked contract (HTLC). This contract ensures that both parties receive their coins simultaneously.
Aggregator swaps: Aggregators identify the optimal exchange prices and routes for various coins or tokens. They search various DEXs and other liquidity sources to perform the swap on behalf of the user.
What Is the Purpose of a Swap?
Many users tend to prefer crypto swaps because they can:
Save time and money
Avoid using centralized exchanges
Access a broader pool of cryptocurrency assets
Discover or support emerging coins and projects
Switch blockchains and explore different projects within the crypto space
How to Swap Bitcoin with Leather
With Leather, swapping Bitcoin is straightforward. Simply follow these steps:
Set up a Leather wallet
Once you have created your wallet, fund it with Bitcoin.
Choose the swap option and enter bitcoin in the “You pay” section. Then select the other asset from the “You receive” section.
Enter the swapping amount. Clicking the "Available Balance" button allows you to enter a specific amount or the entire balance available in your Leather.
Before you confirm the coin swap, double-check the details.
Swap Use Cases
Here are some common use cases where swaps can be beneficial:
Portfolio diversification
Liquidity management
Arbitrage opportunities
Blockchain migration
Access to DeFi