Codaone / DEXBot

Trading Bot for the BitShares Decentralized Exchange
Other
250 stars 129 forks source link

HTLC Support ...Atomic Swaps #638

Open CryptickCryptick1 opened 5 years ago

CryptickCryptick1 commented 5 years ago

Who here in the DexBot community is excited about the possibilities of HTLC (Atomic Swaps)?

I think there could be an Atomic Swap version of DexBot. If Atomic Swaps HTLC (Hashed Time Locked Contracts) are going to be successful, I think they are going to need the liquidity and automation that a bot can bring!

Currently, there are very few exchanges doing atomic swaps, I spent time looking at Komodo a while back and did not see much volume in trades. It seemed like more of a marketing thing. In short, it seemed like almost no one was using it.

I have been over in the HTLC room and chatting. Things are in development. Not exactly sure when they might be able to go live, I know they have tested stuff on test networks.

I think that Atomic Swaps could be a huge thing for BitShares, and I think it could be a huge thing for DexBot.

There could be lots of market making opportunities.

So coordinating all these things together would be exciting. That said, we need to see who is interested and what it is going to take to get it going.

I believe there are several factors that could all work together towards a great product. We have a community that supports decentralized trading, we have existing markets and existing portals can supply liquidity for coins that do not support atomic swaps. We have stable coins, market makers and a market making bot. This gives an Atomic Dexbot multiple chances for success.

There is a chance the cabinet could sponsor an Atomic Swap version of DexBot. Given the success of the DexBot. It would seem to be a natural fit. There are many factors to consider.

In my opinion, I think that for atomic swaps to be successful, it is going to need a group to head up and manage the project. It is going to take programing, design, market making, accounting, reporting, fees, and a bunch of the other boring and mundane stuff that "makes stuff happen" in order for the project to be a success. I think the organization should be as flat as possible with the Atomic Swaps development group being separate and independently run from core BitShares.

HTLC swaps are complicated and require multiple things and approvals to happen. In my own understanding I think there should be a multistep process.

First, there should be an order book where interested people post their interest in doing swaps. This self-identifies and allows people to meet up. An engine of some sort matches people up. At this point they can sort out the details. Then the two parties can communicate back and forth. This would be secure communication on Where the specific hashes are created exchanged and agreement is made to trade. Looking at the specifics it is a fairly complex process. I think 95% of it can be automated. Then trading can begin to revolutionize trading and put the big CEX out of business.

From a DexBot side this can be sort of exciting as we can have a bot that creates the order people want to trade. For example, if someone says they want to sell 1 LTC for BTS, an Atomic DexBot could automatically volunteer. Hey, I will sell 1 LTC to Xd7d9273 for XXXX BTS at this prices (This is my account, let me lock this up in the blockchain.) People are generally impatient so this would be great for liquidity and tradability. The bot might also simply create offers to buy and sell at certain prices periodically. Then accept offer people might make

There are risks with atomic swaps: We don’t know if they will catch on We need to make sure they are profitable (appropriate commissions) We to make sure they are secure and do not result in lost money The market will need advertising and education. Potential hacking risks Funding may not be approved.

There is great potential. It could revolutionize trading. It gives BTS another chance to corner the exchange market. It is launched from one of the more successful decentralized exchanges. It could allow another line of complimentary business on top of BitShares current Exchange. It could allow for increased popularity and use of stable coins.

There is a lot that is still undecided. Is there going to a centralized order book? Is there going to be a decentralized order book? What are the fees going to be? What do they need to be? How do we charge the fees? (As much as one might wish it was not needed, without some fee structure, it is unlikely to be a sustainable model.)

That said, I was sort of seeing how this could all come together. In the initial phase we are going to need to talk with the protocol development to make sure the API calls, data, and other components, we need are going to be there. We are going to need to make sure programmers have the interest, ability and direction to potentially build and these new features. I think Atomic DexBot, which could solve the liquidity issues of an unused Atomic Swap could be a vital portion of the success of such a project.

Some exploratory work and discussions need to happen in order for us to have the ability to know if this the right direction to go. Cryptick

bitcoinsfacil commented 5 years ago

I am interested and available with a team if needed.

This team has upgraded the necessary code to support atomic swap on 3 blockchain projects ( electracoin, proeliocoin and myce ) with a walkthrough integration into Komodo Platfrom and AtomicDEX.

We've also worked with bots related to payments since 2015. During 2018 we developed Telegram bots that helped swapping a blockchain’s old coin for a new ones and hosting bots that helped crypto users install masternodes removing the technical needs.

If the idea of BTS having an HTLC api goes ahead this is a perfect match for DEXBot.

PermieBTS commented 5 years ago

Great to have you around Pedro, thanks for letting us know about your experience in this area

CryptickCryptick1 commented 5 years ago

So I see the Hashed Time Locked Transaction is working in staging... https://staging.bitshares.org/#/htlc

There is some explanations here: https://github.com/bitshares/bsips/pull/104

Interesting...

CryptickCryptick1 commented 5 years ago

A couple of more notes of interest: Interestingly there was a Worker Proposal for HTLC by Everbloom hosted via the BBF https://www.bitshares.foundation/workers/2019-03-atomic-cross-chain-swaps Launched in March it only has 84M of 312M votes which would be needed.

Not having enough votes could be interpreted as a lack of enthusiasm for HTLC, or it could be interpreted as it was the wrong groups, or wrong price.

I do notice that with the current HTLC frame work, transactions take place with a very small fee, (~1 BTS). There are several points of the fees for both opening and closing the transaction. As much as I like entertaining the idea of building a new decentralized exchange on HTLC, without a supportive fee structure it could be very difficult. At present it is also a multi-step process that is much harder than traditional trading. While BTS is fast, other chains could process transactions very slowly, by comparison, something that makes trading and market making more difficult.

CryptickCryptick1 commented 5 years ago

Could Atomic Swaps be BitShares second attempt to free crypto investors from Centralized Exchanges?

BitShares is one of the most successful decentralized exchanges, but has not realized its dreams of overtaking over the exchange market. Centralized Exchanges are still striving putting people at risk of losing their keys and coins and money.

Strategically, there has been a lot of talk about the idea of Atomic Swaps. This could solve the exchange problem and solve the key ownership problem. BitShares has support for Atomic swaps at a staging level.

No one can know the future, and success in any venture is hard to predict. However, one of the best alternatives is to provide a widespread support to a number of initiatives and try a number of different things. We might ask 10 people if they think it will work, and get 10 different answers, but sometimes it is easier to just do things and try them, then pivot if needed.

BitShares would be a natural place to try Atomic Swaps. It has a decentralized customer base already It is established itself as a decentralized exchange It has been around for a while It has a market maker community. It has a solid core of workers. Could provide more uses for the stable coins (bitCNY, bitUSD) Could provide more uses for gateways (for chains that do not have atomic capabilities yet) Extremely fast transactions.

Atomic Swaps provide some challenges They are a bit technical in doing It is a multistep cumbersome process It required education There needs to be a way to bring people together They need to be profitable for everyone involved. They are slower than a centralized exchange. Needs a sustainable business model

Atomic Swaps could be a game changer They can circumvent the KYC laws Provide a leap forward in technology They get rid of Centralized exchanges one of the problems in crypto Many have speculated they are the future.

Strategically, BitShares is in a unique spot to take advantage of Atomic Swaps. We could test launch a new exchange BitShares Atomic. Or we could not. We can also wait for someone else. It is an interesting question that bears discussion…

What do you think?

CryptickCryptick1 commented 5 years ago

So following up, Atomic Swaps work on BitShares. It is basically a transfer. There is a tiny fee. There are some people talking about the idea of order books and a market. There have been several hundred atomic swaps done as seen in the explorer here.

http://bts.ai/htlcs

There has also been several other groups that are working on it, or are claiming to work on it. I can't really speak to their success. Currently, BitShares has had the Cn-Vote vote up the refund 400K and stop most BitShares Workers because they felt the workers were selling and driving down the BitShares Prices. Mass Layoffs is common in Business, and this is effectively a mass layoff among BitShares employees. For better or for worse, now may not be the best time for an initiative.

Currently, I think there needs to a way to profit from HTLC transactions in such a way that one can support an organization. Komodo seems to be solving this problem by requiring one party to send in a fee before facilitating the transaction. A fee might also be integrated into the prices on trades for. I like transparent marketing models, but much work need to still be done. I will be watching and waiting and seeing what comes about. There are several working on things, in a -decentralized- way.