Author

Topic: [GUIDE] DEX Atomex (Read 138 times)

legendary
Activity: 1484
Merit: 1024
#SWGT CERTIK Audited
August 12, 2020, 07:40:00 AM
#4
looks interesting. can we import an existing address that is not generated by the wallet? or is there some specific way of wallet generation that makes the address can only be imported here?
maybe you can choose - i want restore my wallet - at begin,



by import mnemonic phrase from other wallet like guarda or coinomi,



I tried and got same Bitcoin and Ethereum address.
hero member
Activity: 520
Merit: 11957
August 12, 2020, 07:14:35 AM
#3
looks interesting. can we import an existing address that is not generated by the wallet? or is there some specific way of wallet generation that makes the address can only be imported here?

The wallet gives you 6 new addresses, 1 address for each I support cryptocurrency, add. import, export addresses won't work.
sr. member
Activity: 770
Merit: 268
August 12, 2020, 07:08:04 AM
#2
looks interesting. can we import an existing address that is not generated by the wallet? or is there some specific way of wallet generation that makes the address can only be imported here?
hero member
Activity: 520
Merit: 11957
August 12, 2020, 06:35:26 AM
#1

Table of contents:

1. Overview
2. Wallet
3. Cross-chain atomic swaps on practice
4. Staking
5. Useful Links
6. Interview with Atomex co-founder
7. Sources





Overview

Atomex - hybrid exchange. Combines advantages of centralized and decentralized exchanges. No registration or identity verification required. However, all addresses are checked against abuses and suspicious origin of funds. Private keys are kept encrypted on your computer. Cross-chain transactions are carried out using atomic swaps.

No additional fees. You pay only miner commission for both regular and cross-chain transactions. Atomex provides websocket API for wallets and market makers.

Staking Tezos brings passive income automatically. Decentralized Lending features coming soon.
Liquidity providers - Your counterparty is not an ordinary user, but a professional market maker whose task is to ensure sufficient liquidity.

Supported cryptocurrencies: Bitcoin(BTC), Ethereum(ETH), Tezos(TZX), Litecoin(LTC), Tether(USDT), tzBTC


How to get started:

1. Download the application.
2. Create wallet.
3. Top up your wallet with mainnet or testnet coins.

You can get testnet coins from different faucets: BTC, ETH, LTC, XTZ.






Wallet

Available wallets in the following variants:

- Web Wallet

- Windows

- Ubuntu

- macOS

Source code is available on GitHub


How to use Atomex:



After downloading and installing the msi package, open the Atomex application. You can either generate a new wallet or restore an existing one from the mnemonic phrase.

1. Choose the network - Use TestNet for testing purposes and exploring the features. Do not import your mainnet wallet or send real funds to addresses created in this mode!



2. Name your wallet



3. Generate seed - Before generating the seed you should pay attention to its length. Sometimes it’s better to check what is the seed length the other wallets your use. Don’t forget to write down your seed after you pressed "Generate".



4. Set mnemonic password (optional) - Set a derived key password which will be needed in addition to the seed to restore your wallet.



5. Set local password - Set up the storage password which is needed every time you unlock the wallet.



6. Make atomic swap - Now your private keys are kept encrypted on your computer and your AtomEx App is ready to make its first swap!




Cross-chain atomic swaps on practice


Atomic swap basics

Before we move on to the practical part, let’s dive a bit into the protocol details. Let’s say Alice wants to buy some ETH for XTZ and Bob has agreed to make a deal. There are two possible outcomes, either the transaction will take place or will be canceled.

Initialization phase

1. Alice locks XTZ

Alice generates a random bytes sequence — the secret, calculates its hash and sends her XTZ to a special smart contract together with the hash, a lock_time_a value, and Bob’s XTZ address_b
These XTZ can only be redeemed by the owner of theaddress_b if he knows the secret, and it has to be done before the lock_time_a, afterward, Alice can get these funds back.

2. Bob locks ETH

When Alice’s transaction is confirmed Bob sends his ETH to a special smart contract together with the same hash, lock_time_b, and Alice’s ETH addreess_a
These ETH can only be redeemed by the owner of theaddress_a if she knows the secret, and it has to be done before the lock_time_b, afterward, Bob can get these funds back.

Requirement: lock_time_b < lock_time_a
To prevent the case when Alice first makes a refund and then redeems Bob’s funds.


Successful redeem


Simplified scheme of an XTZ/ETH swap (success case)

1. Alice redeems ETH

Alice sends the secret to the contract in Ethereum blockchain and receives Bob’s ETH in return.
The secret is revealed now and Bob can spend the locked XTZ.

2. Bob redeems XTZ

Bob sends the secret to the contract in Tezos blockchain and receives Alice’s XTZ in return.


Refund case

We will not consider the cases when something goes wrong during the initialization phase (they are rather trivial) but will examine the case when Alice doesn’t redeem Bob’s ETH for some reason, i.e. secret is not revealed and lock_time_b has passed.


Simplified scheme of an XTZ/ETH swap (refund case)

1. Bob refunds ETH

Bob sends hash to the smart contract in Ethereum blockchain and gets his ETH back.
He cannot spend Alice’s XTZ since secret is not revealed.

2. Alice refunds XTZ

Alice waits until lock_time_a, then sends the hash to the contract in Tezos blockchain and gets her XTZ back.
She cannot spend Bob’s ETH because lock_time_b has already passed.


That’s enough theory

Time to see Atomex in action! We’ll start from a multi-crypto setup with some XTZ and ETH on our balance. With regard to the above scheme we are Bob, and our counterparty is Alice.


Create new conversion

Choose the “Conversion” tab and set the ETH amount we want to exchange for XTZ. Check the deal terms and then press “Convert”.


Step 0. The user creates a new conversion

A new conversion appears in the table with the status “In Progress”.
Actually, that’s all we need to make an atomic swap through Atomex wallet. But let’s follow the internal process spawned by our actions.

Under the hood: Alice locks XTZ

First, check out recent operations for the Atomex smart contract in the Tezos blockchain:


Step 1. Alice locks XTZ

This is a transaction sent by Alice, these locked funds are going to be ours in the end. Mind the hash field passed via parameters.

Under the hood: Bob (us) locks ETH

Once the XTZ transaction is confirmed, Bob sends an ETH transaction. We can see that it contains the same hash :


Step 2. Bob locks ETH

Under the hood: Alice redeems ETH

Another contract invocation from Alice’s side. She receives our ETH in exchange for secret and Bob picks it up:


Step 3. Alice redeems ETH

Under the hood: Bob (us) redeems XTZ

Finally, Bob unlocks XTZ using the collected secret :


Step 4. Bob redeems XTZ

The status of our conversion changes to “Completed”, everything is ok.


Side notes

All the internal actions you saw are performed by the Atomex wallet in the background process so it’s necessary to keep it online until the swap is done. In our example of an XTZ/ETH conversion, it takes only 8 minutes for the whole thing, however, it depends on the particular blockchain confirmation time.
We are currently working on making different order types available. As soon as the Atomex swaps market will be consistent enough it will be possible to place limit orders through the Atomex app.





Staking

It’s simple to start earning Tezos staking rewards with your XTZ coins. With Atomex wallet you can stake Tezos through the Delegation function. After Babylon upgrade there is no need to create a KT-address to delegate your XTZ coins to a Tezos baker. You can delegate funds directly from your tz-address. You can delegate only all your XTZ coins from that tz-address and only to one Tezos baker.

However, you can use one mnemonic (seed) phrase to create an HD Wallet and create any number of Tezos addresses and delegate to different bakers. You can make transfers after you have delegated funds at any time. Delegated funds are not frozen on your Tezos wallets.

So, to delegate you need to deposit your Tezos wallet and select a baker (delegation service) for it. Please read the step-by-step guide below.

Atomex is a cryptocurrency wallet developed by Baking Bad team. Now available following versions:

  • Web Tezos wallet: here
  • Windows Tezos wallet. Download it here
  • Linux (Ubuntu) wallet. Download it here
  • macOS Tezos wallet. Download it here
  • iOS Tezos mobile wallet: coming soon
  • Android Tezos mobile wallet: coming soon


How To Stake Tezos Using Atomex wallet

Step 1 - Login to your Atomex wallet. To create a wallet. Press "Wallets", select "Tezos" and press "Delegate"



Step 2: Fill in the delegate address or select from the list provided by Baking Bad. Select the TZ-address from which you want to delegate. Check “Use default fee”. Check the correctness, click "Delegate".



Step 3 - Check the correctness of data on the Delegation confirmation page and press "Delegate". It takes around 1-2 minutes for the transaction to be processed by Tezos blockchain. Check your delegation status on Tezos Block Explorer.

Step 4 - Press the "Update" button. After that, you will see the delegation in the window of your Tezos wallet. The end.




Useful Links

- HD wallets explained

- How does atomic swap works?

- Tezos Block Explorer

- Media & Partners

- Mail for questions

- GitHub

- Terms of Use

- Medium

- Twitter

- Telegram

- YouTube




Interview with Atomex co-founder

Atomex co-founder Igor Matsak explained how Atomic Swaps could help solve interoperability between blockchains.

Hello! What’s your background, and what are you working on?

My name is Igor Matsak, co-founder of Atomex. We are working on Atomex as a part of our diverse team. Many of us and me as well were studying together at university, having cryptography and maths as our majors. Then some of us got vast experience in investments, and others were working in software engineering. Fortunately, about four years ago, we were united by the inspiration of blockchains, which were very fitting to our background. Crypto still needs another tone of cozy and reliable things to become adopted, so we are excited to bring our part.

Atomex is our hybrid DEX based on atomic swap technology and a multicurrency HD wallet. It allows storing funds locally and keeping them liquid at the same time. So, users can make an exchange of their funds to another cryptocurrency just like they do an ordinary blockchain transaction. And it is done in a trustless, decentralized manner, without sending crypto to any third party.


What’s Atomex backstory?

Our quite a big independent team has a wide range of interests. We are also quite known in the Tezos community as Baking Bad. In the last year, we released the baking-bad.org explorer for bakers and delegators in Tezos, the better-call.dev smart-contracts explorer and Python (Pytezos) and C# (Netezos) wraps for Tezos nodes.


We loved atomic swaps because they expand the list of things people can do on-chain. I think the main point is similar to the whole cryptocurrency idea. So, it’s all about decentralization. Like Bitcoin is a way a payment system could be built in a decentralized manner, atomic swaps is a way of enabling decentralized crypto exchanges. Swaps use the same cryptographic principles to eliminate gaps between blockchains.

We started from scratch. The atomic swap seems to be quite simple and powerful, but there are still very few popular implementations. Why? As we turned out, it is pretty tricky to make a user-friendly app based on atomic swaps. Assuming market volatility, various chain specifics, exchange fees, etc., it is quite challenging to built exchange operating 24-hours.

That exiting process takes all our experience to cover all the parts from head to toe, starting from cryptography basics and ending with trading principles.

The main thing that’s inspiring us on the way is that Atomex can help cryptocurrencies to take another step further to stay a full-fledged and independent ecosystem that operates differently.

What went into building the Atomex?
It took about 1.5 years to make the first release on the mainnet. And now, we still have a more like an MVP with four currencies: Bitcoin, Ethereum, Litecoin, and Tezos, but it is fully working. So we’ve been watching from the inside how the industry is developing. Comparing blockchains, we noticed that the newest blockchains are changing faster. So Tezos is now the most changing environment we work with. Also, the DEX sector is developing quickly today, including all possible sorts of on-chain exchanges with varying degrees of trust and decentralization.

As for us, we decided to build a fully trustless service. Perhaps, there must be a place for liquidity to meet. Our solution was to make a hybrid model with two essential points:

- all the on-chain exchange work is done independently on the client side;

- liquidity is collected and matched on the Atomex server.

When deal sides have met each other on the server, their apps operate with blockchains on their own to execute the trade. That model gives both the efficiency for bringing enough liquidity to the market and the trustless and independent on-chain exchanging process. As I have mentioned, the exchange is done through the atomic swap scheme. This technique is based on the locking transactions that are explained in this article.


Being trustless also requires the Atomex app to be open source. It helps to get more people involved in testing the app, ensuring that the code is reliable and has no security issues. On our way, we tried to use as much existing open-source code as possible but also reworked some RPC libraries and nodes wrappings, and eliminated some bugs in existing cryptography libs. The exciting thing is that in the first month after mainnet release, we’ve already got in touch with several great projects, including DeFi projects such as DEX.ag and bZx Protocol. So we feel an increasing potential in that field.

One of the most thought-provoking parts on the way is that decentralized apps commonly offer a bit unusual user experience. It’s also Atomex business. As the client app does all the blockchain work, it requires to keep the app online throughout the process. That’s a hard one for the UI.

Another thing is that Atomex doesn’t serve a high speculative fast trading style, as every exchange operation takes at least 5 minutes to be mined in both blockchains. However, it is faster than typical workflow for users who don’t keep their funds on centralized exchanges, if you take into account deposit and withdrawal times.

What’s your business model?

Atomex has no additional fees, so users pay only miner’s commissions for transactions. Now we charge market-makers that provide the Atomex exchange with liquidity and can make profits from market-making strategies. For now, we have a small group of market-makers, who are very dedicated to service’s success. But we are going straight to make limit orders and market-making option available on every client app.

We consider our target auditory to be crypto enthusiasts, those who believe in ideas behind the blockchain technology and who is paranoid in a good sense. So our priority for today is to offer the most useful and competitive service as possible.

Eventually, regulatory limitations could play a vital role in a significant shift to decentralized blockchain tools. Due to that, we are considering Atomex architecture to be easy to scale for widespread market use.

Today are a lot of other projects in our scope, maybe the AtomicDEX from Komodo is the most recognizable of them. Atomex is supposed to be a quality implementation of the helpful atomic swaps technology which distinguishing feature is usability. We are not concerned about similar competitors. Actually, we are tuned to possible cooperation with other DeFi’s as possible. I think it’s the best strategy to compete with centralized entities in the industry.

What’s your position on the regulatory landscape today?

Regulation cuts some blockchain technology value today. We believe DEXs could help blockchains to keep moving in the technologies-vs-regulation tag play. In that sense, centralized exchanges seem to be a kind of temporary solution.

As Atomex has decentralized execution architecture, it doesn’t require any KYC for users. And making limit orders available for every client would eliminate regulatory issues in the future.

What are your goals for the future?

Atomex’s great goal is definitely to become a useful tool for the future decentralized economy.

To achieve this, Atomex roadmap now includes these significant roadblocks:

- adding more chains;

- adding different chains and standards tokens support;

- adding REST API for external wallets integration;

- adding hardware wallets support;

- adding more nice features like different staking options.

What are your future thoughts for the DeFi market?

In the next few years, we are likely to witness the emergence of numerous digitized assets. There will be fiat currencies, real estate, precious metals, and other asset classes. With current tech, we will be able to do things like trustless deals, collateralized loans, margin trading, derivatives, structured products, autonomous organizations, and more, and all this on-chain.





Sources

- https://atomex.me/#home
- https://blockgeeks.com/guides/atomic-swaps/
- https://defiprime.com/atomex
- https://github.com/atomex-me/atomex.client.wpf/wiki/Atomex-wallet-tutorial
Jump to: