July 29, 2021
Bitcoin was the first cryptocurrency to ever exist. Over time, many other coins appeared. As more tokens were created, developers and users felt the need to exchange them for one another. Centralized exchanges, however, are risky and prone to attacks: they reproduce the flaws of the traditional systems Bitcoin was born to overcome.
Around 2017, a technology called atomic swap was launched. This feature allows any user to perform cross-chain transactions seamlessly, through a smart contract. It was successfully tested by making swaps between Bitcoin-Litecoin and Decred-Litecoin.
They can be performed on-chain, directly on the Bitcoin blockchain, or off-chain, through a Layer-2 platform.
Atomic swaps make use of the Hash Timelock Contract (HTLC) feature, a protocol implemented in the Lightning Network of Bitcoin. To perform a swap, user 1 must deposit their currency in a contract address and send the key to user 2. With this key, the latter creates another contract and deposits the second currency.
The function of HTLC is to reveal the hash key so, once user 1 claims their coins, user 2 can also withdraw theirs.
By the time of their launch, atomic swaps were highly praised, since there wasn’t any other decentralized option to perform cross-chain trades. Investors either had to trust a third party or trust the other part of the exchange. Neither of these is an ideal scenario.
Advantages and disadvantages of atomic swaps
Atomic swaps allow users to trade their coins in a trustless environment. The decentralized nature of the protocol offers a higher level of security, unlike centralized exchanges, because they are conducted through the user’s own personal wallet.
The fees are also much lower than centralized exchanges because there is no need to pay a third party. Overall, these swaps can expose traders to other coins they wouldn’t be able to access through traditional platforms.
However, there are a few important limitations to atomic swaps that can hinder their full adoption. The main obstacle is regarding cryptocurrency support: to perform a trade, both chains must use similar hashing algorithms (like Bitcoin and Litecoin) and be compatible with HTLC.
If the technology of the desired coin is very different from the one you own, atomic swaps can’t function.
It is also necessary to use a supporting wallet, and there aren’t many options in the ecosystem so far. As long as wallet developers don’t integrate this feature, the majority of users will not be able to access it.
Peer-to-peer (P2P) swaps, on the other hand, are any exchange made between two parties, regardless of how they do it. P2P systems became popular around the 90s, with the rise of the internet. They are present in torrent and other file sharing protocols online.
In the crypto space, there are several platforms to perform P2P swaps, like LocalBitcoins, LocalCryptos, and Paxful, among many others. The process may vary slightly from one application to another, but in general, they follow the same guidelines. User 1 connects with user 2 and conducts the trade.
DeFi DEXs, like Uniswap, also offer P2P exchanges, but the fees and trading rates are disadvantageous most of the time. Users often get a lot less than what they’re giving and only liquidity providers get the bigger piece of cake.
Introducing the P2P Swap Button
That enables safe transactions in 10 tokens, recently launched a P2P swap protocol that uses an innovative authentication mechanism and smart contract-powered simultaneous two-way transfer. The solution enables peer-to-peer token swaps without the need to use an exchange or OTC party and removes risk of error and fraud from token swaps.
The platform supports Ethereum and BNB, as well as other tokens created in both these chains like LINK, SUSHI, and UNI. Stablecoins and wrapped assets, like USDT, USDC, DAI, and WBTC are also supported.
By using the Kirobo P2P Swap Button, you can set the price to match the rest of the market, so you avoid the disadvantageous price adjustments known as slippage. There is no cost of the service, it’s completely free.
The only fee you pay is the gas set by the Ethereum network.
To make a swap, user 1 enters the recipient’s address and sets the coins and rate. These transactions are automatically protected by Kirobo’s security protocol, so the user must also create a password which they communicate to user 2. User 2 must then input the correct password in order to execute the trade.
After setting the rates and the password, the user signs the transaction and waits for the recipient to do the same. If a mistake was made – for example entering the wrong address – the user can undo the transaction and retrieve their coins. Custody of the money doesn’t change until the counterparty enters the correct password and signs the transaction.
In this way, Kirobo not only allows users to diversify their portfolios and investments but also protects holdings from the mistakes that anyone can make.