Why Aren't Alternative Interfaces for Internal Market on Hive?

in LeoFinance2 years ago (edited)

I've just read an interesting article by @taskmaster4450 proposing the internal market as a good way to increase the HBD in circulation, if more people exchanged HIVE to HBD at a small premium at which the HBD stabilizer operates.

He also clarifies the distinction between exchanging HIVE to HBD (sell HIVE) or HBD to HIVE (buy HIVE) on the internal market and the conversion mechanism, something that was needed for many regular users of Hive.

You are probably aware of how the internal market looks like:
image.png

It may not be the coolest interface around, but it does its job.

And unlike centralized exchanges with their points of failures, this is a decentralized exchange from what I see, apart from the front end.

Look here, I made a test exchange so you can see:
image.png

It was all on the blockchain. A virtual operation that informs whoever reads the blockchain that I 'wanted' a certain amount of HBD for a certain amount of HIVE.

And a real transaction happening when someone took my offer, and the exchange happened. In this case it was almost instant, since I took the market price.

Someone could say, how is this internal market decentralized if you can only access it via one interface (and one domain)?

Well, that's a fair point, but transactions are on the blockchain (including when you add a new order), which means, technically, there are the low level operations necessary to interact with the blockchain this way. Maybe even APIs for them, I don't know.

The problem I would see in creating different interfaces for the internal market is managing order books separately.

If on one interface someone creates an order, when it gets filled (totally or partially), how do all the interfaces know it got filled? They can't know, unless they each keep an order book on the backend and reflect the internal market transactions that are broadcasted on the blockchain (in my example above, the second operation).

This could be problematic... Because it involves financial transactions with HIVE and HBD that are not based on the consensus of witnesses, but on order books kept centralized by various interfaces.

EDIT: Looks like I was wrong in my assumptions struck through above. In a comment, @ engrave said the information is fed to the interfaces via an API. I still asked who provides the API, the witness nodes or the operator of the hive.blog interface. If it's provided by the witness nodes, that makes the internal market even more decentralized.

Engrave also mentioned there was another internal market on Ecency and that he works on something too.

This may be or not the reason why we don't see alternative interfaces for the internal market on Hive.

But this was the extent of my insight on this matter on a late Saturday evening.

Posted Using LeoFinance Beta

Sort:  

There is also https://ecency.com/market and I'm working on a new one for hiveledger.io

If on one interface someone creates an order, when it gets filled (totally or partially), how do all the interfaces know it got filled? They can't know, unless they each keep an order book on the backend and reflect the internal market transactions that are broadcasted on the blockchain (in my example above, the second operation).

Order books are not stored on frontends, they are fetched using the API so it's consistent between interfaces.

OK! Thanks for sharing this. I didn't know about it. I knew that guy back on back on Steem tried it with his all-in-one toolset, and in a discussion I had with him said it was very difficult.

Maybe there was a lack of API back then, I don't know. It is not that complicated to create an interface for the internal market but hence it's not popular, there are not many developers willing to do that.

Maybe, I don't remember the specifics of the discussion, but as far as I do remember he did create that internal market feature on his tool (steemworld) after all.

Also the first time for me to see this ecency token exchange.

Well, we'll never know everything. That's why we should accept help/info when it's offered.

Yes, that's the beauty of the community.

Ahh, that's good to know. Is it available on mobile, I couldn't find it on the interface?

mobile website access works, mobile application doesn’t have that yet

I like ecency app a lot, I use it more than twitter ;) I'm really looking forward to that in the future.

untitled.gif

I couldn't find it either. Maybe @good-karma can answer it.

in wallet tokens have option says Trade token and it will open market page. direct link: https://ecency.com/market

This is how I found it. Consider linking it in a left sidebar, under Witnesses and Proposals links. And the question was specifically about the mobile app. I just logged in, visited my wallet and there is no option to trade HIVE or HBD.

Thank you for suggestion, good idea.

For anyone else and @gadrian as well: Ausbit.dev is another interface for the internal market.
Its interface has a more in-depth view of the blockchain in place of being less clean; and the internal market has a line of the last 100 transactions which I miss from the other interfaces.

Yes some witnesses operate public nodes but also anyone can operate their own node. You can download the code from https://github.com/openhive-network. It is fully decentralized.

Thanks! I wasn't fully aware of how the internal market operates. It's incredible, we even have an exchange that is decentralized on Hive! I'm not sure many knew that about the internal market.

Interesting take, replicating order books that will share info in real time has to be the hard part.

Posted Using LeoFinance Beta

Looks like that that isn't an issue, because any existing and future internal market interface gets the order books via an API (clarified engrave in a comment).

I was thinking the same as Engrave, the orderbooks are basically all the same on any frontend. The API is provided by all witnesses since the API call goes for records on chain, those records can not be modified or tempered with so doublespending is not an issue. But then again I am super noob and a boomer and have no clue how API works anyways :D

You are right

Looks like you are right. :)

Isn't that what Leodex does? And wouldn't they time out if there was a transaction in progress already?
I am no expert but it seems like they would have a way of dealing with numerous orders at once.
Just my 2 cents.
!CTP

Leodex is an interface for Hive-Engine, not for the internal market. But looks like there is another one on ecency, I didn't know about.

Transactions on Hive are handled by the Hive blockchain. Transactions on Hive-Engine are handled by Hive-Engine. What I didn't know about was how the internal market operated at its core. Looks like there shouldn't be a problem, but it would be nice to have more front ends for the internal market.

Could this lead to potentially me selling, let's say 50 HBD, on different interfaces and getting paid for it multiple times?

Sorry if the question sounds dumb, you know how I am with these subjects.

Could this lead to potentially me selling, let's say 50 HBD, on different interfaces and getting paid for it multiple times?

No. You order will be filled only once.

But who provides the API? Is it from witness nodes or by blocktrades or whoever operates the hive.blog interface?

It is a standard API available on any full API node like api.hive.blog, api.openhive.network, api.deathwing.me and others.

Ok, thanks! That's very good to know.

That could be a potential problem. Each interface would need to keep its own order book based on the internal market transactions from the blockchain (as far as I can tell). If the order books are accurate and synchronized, I don't think double spending is possible. But how can you be sure? These are centralized solutions without a consensus mechanism. What if there is a discrepancy between order books at some point?

It seems like @engrave had an answer for this. Thank you both for responding.

Yes, he did a great thing he jumped in to clarify this.

When you sell HBD, doesn't it get locked in some account somewhere until the offer is taken? In that case, it would just be that one node or operator verifying who gets what. Of course, order books might take a bit of time before they can reflect changes in the actual order book after that. Of course, I could be wrong though if that is how it would work.

Posted Using LeoFinance Beta

Looks like I was wrong and there is an API serving the order book to anyone wanting to provide an internal market. I just asked engrave who provides the API.

That does make sense. Isn't it possible the API could go down? It seems like it might be centralized so if it goes down, the entire internal market will go down.

Posted Using LeoFinance Beta

Engrave answered and it looks like it's a standard API provided by any full API node. This is great for decentralization of the internal market!

Your content has been voted as a part of Encouragement program. Keep up the good work!

Use Ecency daily to boost your growth on platform!

Support Ecency
Vote for new Proposal
Delegate HP and earn more

Thanks for the information. I am not so sure more ways to exchange are needed but lower fees would be nice.