-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blockchain-regulated markets #2559
Comments
|
Existing literature (no code, just ideas): |
Ongoing 15 pages of decentral markets survey .tex : #2535 |
Related implementation on central server from 2011 that can handle 6 million orders per second on a single thread on a 3 GHz machine. |
Getting started with coding:
|
Additional resource: Tribler/dispersy#517 |
Gumby experiment link: https://jenkins.tribler.org/job/pers/job/market_experiment_devos50/ Like the AllChannel experiment, this can (should?) become a performance/health indicator for our decentralised market. |
Suggestions:
Sections:
related work: evolution over past 15 years:
|
@basvijzendoorn these tickets seems to have overlap, see #2535 (comment) for another table of content. |
|
ToDo Bas, read and run the code :
|
THE Core economic theory of markets from 1970: https://github.com/dmvaldman/library/blob/master/economics/Akerlof%20-%20The%20Market%20for%20Lemons.pdf |
Worked on a first very basic version of a Trustchain credits <-> BTC market in Tribler. I've integrated the Bitcoin wallet and made an API endpoint to get the balance, both confirmed and unconfirmed using the Electrum wallet. Note that the asks and bids are requested using the RESTful API. In addition, when Tribler discovers a new ask/bid, the list in the GUI is automatically updated and sorted accordingly. TODO (GUI-related):
|
good screenshot. will include it in grant submission for Tuesday. |
I've rewritten some of the wallet logic. We now support more than one wallet and each wallet has a short identifier. The main idea is that we have various wallets that holds assets, i.e.:
More wallets can easily be added in the future. Also, some of the API endpoints have been rewritten. One can query all the wallets available with a call to
This allows us to get rid of the Finally, the GUI has to be redesigned slightly to support multiple wallets and multiple assets. |
Good progress. If now API access is hacked, wallet access is possible. Needs to be hardend. |
Privacy of Traders problem description |
@devos50 critical above item slipped of the roadmap. We need to detect if peer is connectable. Everything assumes full connectability. |
A small update here. Last week, I've been working on writing a big integration test that tests the decentralized market from ask/bid dissemination up to and including making transactions (with real bitcoin!). This works well and the Jenkins job can be found here: https://jenkins.tribler.org/job/pers/job/market_community_btc_credits_test/. The wallets used in this test are encrypted. In addition, I've spent some time improving the incremental payments system. Also, I've included a bloom filter in each introduction request so the order books are synchronized between two users. This addresses bootstrapping problems since we have no persistency of orders in our market. Also, the timeout mechanism of asks and bids has been fixed and I've added an event so orders are dynamically removed from the GUI. This all works pretty neat. @synctext regarding the connectability of peers, I rather implement a generic check in Tribler for this since there might be more components in the future that requires connectability. Do you agree if we just disable creating new orders and display a warning if a peer is not connectable for a first iteration? |
ACM publication related work: decentralized blockchain-based electronic marketplaces. Discussion at YCombinator.
|
Related work on market for labor and tasks: |
Bitshares live exchange (https://wallet.bitshares.org/#/explorer/blocks): |
Really decentral related work? https://github.com/KomodoPlatform/BarterDEX "The Komodo security services are performed by notary nodes" |
I've listed BarterDEX already in my related work comment. At that time, there was no code. It seems that there's a beta available now. Their technology heavily relies on atomic swaps, a feature that requires BIP65 implemented. While this ensures that exchange of currencies is either executed or not at all, its functionality is limited to trading of cryptocurrencies. Browsing a bit through their documentation, I found this comparison between state-of-the-art DEX platforms (the last row is quite arbitrary chosen): I will try to get some more information about their decentralized matching algorithm. Curious to know how they implemented that. |
They haven't done any scalability experimentation at all, after reading through their whitepaper. Also, some statements they make, are fuzzy:
|
I compiled BarterDEX and got it running on the DAS5, it's ready for some experiments 👍 |
Extracted from the IDEX whitepaper:
Also, according to the whitepaper, their distributed order book will be live in Q3 2018. Even more fantasy and dreaming from their main project, Aurora (https://auroradao.com/assets/Aurora-Labs-Whitepaper-V0.9.5.pdf):
|
Epic text! |
I might have fried the DAS5 cluster at the VU but I managed to reach over 30.000 trades/sec. The following graph gives the relation between the total number of traders in the network and the average global throughput in trades per second. Each trader trades with another trader at a rate of 20 trades/sec, for a period of 30 seconds. The graph is made after optimizing the code and storing all Trustchain records in memory such that lookups are very efficient. Also, the graph strongly suggests horizontal scalability. |
Repeated the OpenRide experiment, here are two rough plots (still needs some polish and I'm running it more times so I can add some error bars). During the experiment, I differ the broadcast settings, in particular, the fan-out f and TTL. So when using f = 10 and TTL=2, each new ask/bid order reaches 10 + 10^2 = 110 nodes. As we see, lower values of f and TTL lead to suboptimal efficiency, in particular in the situation where f = 5 and TTL = 2. Also, note that increasing the broadcast range further doesn't really improve the matching efficiency anymore. Average bandwidth usage per network participant: |
https://en.m.wikipedia.org/wiki/Myerson–Satterthwaite_theorem |
Don't forget Bitbay #BAY (Bitbay.market which is also a decentralized market with smart contracts. |
I now have a trading bot running on the market testnet, which periodically (every 35) creates an order, alternating between an ask and a bid. See here for the latest orders of this node. Note that these blocks are not dual-signed since they are source blocks (and can have any counterparty). I will run this overnight to see whether things work as expected. Next step: add a second node to the testnet and let these two bots trade. |
Nice! This could be the V7.2 key feature. A testnet wallet auto-activated and instant live animation would be cool TorrentFreak promo points. |
After some major refactoring, matchmakers no longer reserve some quantity in their order books when matching. Instead, any conflicts should be resolved between the two trading parties. The motivation behind this change is that I noticed during my experiments that matchmaking becomes very inefficient if assets are reserved. By avoiding the reservation of assets in the order book, the same order can be matched against multiple other orders and a |
Lots of related work appearing. As discussed indeed 1 common theme. We need reputations, we are not working on it, and concrete plan is lacking. |
Since our market is mostly accountability-oriented, I think a reputation system is a valuable addition and a natural extension of this line of work. |
Sorry, to clarify: common theme on these white papers: they have no reputation system, they critically need one, and are delaying work on it. Fundamental science: universal reputation system. |
phd thesis outline, outcome of discussion:
|
After (almost) a week of work, I have the following progress:
Next, I will focus on some fundamental issues, namely counterparty fraud detection and improved trade accountability. Hopefully, I can make some progress with the GUI next week, and setup some unit tests for the REST API. |
I think the issues raised in this ticket have been sufficiently addressed with the deployment of AnyDex and our upcoming journal article 👍 . |
Marketplace with blockchain based reputation system supporting bid,ask, and cancel messages.
Our previous running code, needs work: http://repository.tudelft.nl/islandora/object/uuid:c1816da8-c82e-47bc-bde2-4f35b9a3e775
The text was updated successfully, but these errors were encountered: