Bitcoin Forum
May 05, 2024, 03:33:12 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: OpenSource Exchange Engine  (Read 4388 times)
monsterer
Legendary
*
Offline Offline

Activity: 1008
Merit: 1000


View Profile
December 18, 2013, 08:19:11 AM
 #21

daybyter, i'm really sure, that alt-coins exchange could exist without fiat, cypher world come right now, you can see.
Moreover, trading just alt-coins against BTC or LTC, is very simple thing. It is so simple, you cann't imagine if you have no enough knowledge.

If this is so simple, please describe in detail, the algorithm for matching orders in the OB?
Remember that Bitcoin is still beta software. Don't put all of your money into BTC!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714879992
Hero Member
*
Offline Offline

Posts: 1714879992

View Profile Personal Message (Offline)

Ignore
1714879992
Reply with quote  #2

1714879992
Report to moderator
1714879992
Hero Member
*
Offline Offline

Posts: 1714879992

View Profile Personal Message (Offline)

Ignore
1714879992
Reply with quote  #2

1714879992
Report to moderator
coinrevo
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
December 18, 2013, 09:03:52 AM
Last edit: December 18, 2013, 09:18:19 AM by coinrevo
 #22

Again the overall idea is good. Somebody should do it. But you have to think about this as complicated as say building a distributed currency if it is supposed to work at scale (millions of users flooding the system with orders).

I can do a very solid opensource engine, but I would not opensource at it this point, because I know those who would using it would mess it up anyway. For someone with very deep technical knowledge it is always easy to tell who is serious, and who has some very serious learning to do. And people with two sentences posts, 99% are not just thinking enough. If a user clicks button - well, at what price? If you have two orders unlimited you can match them. You can only match a market order and a limit order. But the real challenge is time priority.

I can help if someone does some real work, but I will not read code that looks like its written as a homework project in school. The things we are talking about are much too important, and I am not got to waste time. Look at Buttercoin. Just a bunch of talkers and sellouts, wasting time of the community and then going to get VC money.

So, here is my suggestion.

First of all, have you done any real webprogramming? Wordpress and Joomla are not webframeworks, they are CMS. I suggest learning meteorJS. It is much more powerful than python/django or Rails. Anybody coding in PHP today is doing something wrong.

If you really want to know how auction markets work on a high frequency basis, you are in for a ride. You might get something going, but it most definitely will crash at scale or somebody will hack it. MtGox doesn't get it done, and they are sitting on perhaps 50M$ or more of cash. Again scale is important. Building something for 10 and 10^3 and 10^6 users are very different tasks.

http://www.quantcup.org/home/howtohft_howtobuildafastlimitorderbook

"To give some idea of the data volumes, the Nasdaq TotalView ITCH feed, which is every event in every instrument traded on the Nasdaq, can have data rates of 20+ gigabytes/day with spikes of 3 megabytes/second or more.  The individual messages average about 20 bytes each so this means handling 100,000-200,000 messages per second during high volume periods."
daybyter
Legendary
*
Offline Offline

Activity: 965
Merit: 1000


View Profile
December 18, 2013, 02:29:04 PM
 #23

I'm thinking about writing some closed source java code. I already wrote some trade bot stuff, so I understand and least all the API aspects.

realcoin
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250


View Profile
December 19, 2013, 10:34:02 PM
 #24

vertebrae, respect for your enthusiasm! But...

1. legal stuff
Where do you come from?
daybyter, methinks illegal place. Somewhere international, distributed, without governments. Just alt-coins...
upal, look at this forum again, look at bitcoin. There is no rules, yet, there is no government. Anyone could start its own alt-coins exchange right now.
Sorry, but this sounds naive. You never heard about (Know your customer (KYC), Modern anti-money laundering laws)?

2. running the exchange
coinrevo, don't talk about hardware. It is wordpress. it is joomla.

It is mysql(or something). You push 2 of buttons, buy or sell. You login/sigin, you deposit money, it is simple node, nothing else.
The herculean thing which I'm see is a graph of history, ...
You seem to be the next Simon Hausdorf who did run Bitcoin-24 exchange from Germany!

His engine matched/conducted  multiple orders, but deducted the money from the account only once! Below a part of the story...

Quote
TAiS46 = Simon Hausdorf

I have some question ... example: a user will buy something for his USD

    Check his USD Balance
    Deduct the USD from his account
    Make an Order -> order queue
    user gets his item and the other one gets his USD

Lets say, the users makes 5 requests in the same second (very fast). So it is possible (and happen) that 5 requests are running. He has only money to buy only from 1 request. Now the requests are so fast, that the script checks his balance, but is not so fast, that it deduct the money from his account. So the requests will pass two times! How to solve it?
...
http://stackoverflow.com/questions/15026825/php-mysql-how-to-prevent-two-requests-update


Quote
What happened to bitcoin-24.com?
2013-04-12

Today some people were very upset because their bitcoin exchange bitcoin-24.com was closed [10] for five or so hours without any announcement about what had happened.

One visible problem was that there were many reports of incorrect transactions. Users getting twice (or more) the amount of BTC than they should have gotten. Then somebody reported a rather scary mysql question on stackoverflow by the user TAiS46. He is bitcoin24's developer. (Simon  itself?)

This bug would lead to the problem with incorrect booking of orders. It is two months old, so it's very likely that some people have known about it, and that they gamed the site to farm free money. They might have used a flood of micro-orders to do this.

Later today the following statement appeared on the site:

Our Service is momentarily not available.
1. All funds (EUR, USD, PLN, GBP & Bitcoins) are safe.
2. All withdrawals will be gradually processed chronologically from another bank account.
3. The Polish authority closed your [sic] Bank account in Poland.
4. Our lawyers are working with high pressure on a solution.

We will back with Bitcoin-24 2.0 on when all declarations are finished.

All important Emails can be send to help@bitcoin-24.com

If somebody found a way to exploit the bug reliably and withdrew the money they made, they effectively took other user's money. This makes the "all funds are safe" claim doubtful.
Blockchain and missing money

Here's a list by z3c0 of orders that were executed more than once. This post said that around 6000 BTC had left bitcoin24's wallet, but that info was apparently incorrect, see also CoinSheep's comment below.
More scary technical info

1. Simon, bitcoin24's admin, does seem to have problems with basic coding stuff. A few weeks ago there was another stackoverflow question on rounding. He uses floats to deal with currency.

2. Late last year he apparently lost a wallet (google translate) due to missing backups.

(scroll to 2013-04-12 ) http://kuttler.eu/post/what-happened-bitcoin24/

The video is not good explained but an example.
Quote
4800% in two days?
Bitcoin-24
Published on Apr 4, 2013
They have a coding error on it where they double your money, oops!
Spotted this after running a market maker for one hour, who knows how long it has been like this and how much money has been stolen...
Owner assures me it's not an exploit yea right.
Get your money out and don't send any in. People with duplicate coins will withdraw it.
http://www.youtube.com/watch?v=3YN101xieCY



3. Simons did learning by doing and people still wait for their Bitcoins and money!
Of course, dont lose your enthusiasm. But consider what people like coinrevo said. Dont offer people a service you dont have control over.

I am not "Realcoin REC"! There were no REC when I sign up the forum...
fasbit
Sr. Member
****
Offline Offline

Activity: 425
Merit: 253


View Profile
January 10, 2014, 07:44:49 AM
 #25

Other Sources Out There:
Modulus claims to have "hundreds of lines of code" for sell, for a trading engine for $5700.  Anyone ever looked at it or know about it?  http://www.modulusfe.com/m4/ 
Bter will sell a copy of their site for 15 BTC and 10BTC for annual tech support. (pass)

I've been on the hunt for this same thing.. for months...

Actually I was thinking this is a better approach to trading:

Convert Fiat to "Fiat Credits" from Licensed Broker (example:  Pay 101 EUR for 100 EURe 1% fee)
List your Fiat Credit or BTC or whatever on P2P bulletin board. (open source, escrow P2P software)
When buyer and seller are matched, both sides of the trade go into escrow, and each must agree and release.
Upon second release each side gets their purchase.

Its still a trade engine, but you cut out the Cryptsies and decentralize the exchange.
And the match doesn't have to be automatic, it COULD be done by the market taker.
(This is like a router between two separate financial networks)

Example:
I have 10 BTC for sale, listed at $1000 each.
Market taker looks at my order, hits "buy" 1 BTC which Ecrows 1 of my BTC and she pays with her 1000 USDe.
I now have 1000 USDe and 9 BTC, Buyer has 1 BTC after escrow and release.

This seams better because, this system would allow licensed money changers to be just that.  And all of the hard core computing could be separated from them and it could be done on a P2P network if there were no fiat involved.  It also makes the order matching process easier form a programming standpoint.  I think something like this could be open sourced. 
Sukrim
Legendary
*
Offline Offline

Activity: 2618
Merit: 1006


View Profile
January 10, 2014, 09:52:03 AM
 #26

Other Sources Out There:
Modulus claims to have "hundreds of lines of code" for sell, for a trading engine for $5700.  Anyone ever looked at it or know about it?  http://www.modulusfe.com/m4/ 
Bter will sell a copy of their site for 15 BTC and 10BTC for annual tech support. (pass)

I've been on the hunt for this same thing.. for months...

Actually I was thinking this is a better approach to trading:

Convert Fiat to "Fiat Credits" from Licensed Broker (example:  Pay 101 EUR for 100 EURe 1% fee)
List your Fiat Credit or BTC or whatever on P2P bulletin board. (open source, escrow P2P software)
When buyer and seller are matched, both sides of the trade go into escrow, and each must agree and release.
Upon second release each side gets their purchase.

Its still a trade engine, but you cut out the Cryptsies and decentralize the exchange.
And the match doesn't have to be automatic, it COULD be done by the market taker.
(This is like a router between two separate financial networks)

Example:
I have 10 BTC for sale, listed at $1000 each.
Market taker looks at my order, hits "buy" 1 BTC which Ecrows 1 of my BTC and she pays with her 1000 USDe.
I now have 1000 USDe and 9 BTC, Buyer has 1 BTC after escrow and release.

This seams better because, this system would allow licensed money changers to be just that.  And all of the hard core computing could be separated from them and it could be done on a P2P network if there were no fiat involved.  It also makes the order matching process easier form a programming standpoint.  I think something like this could be open sourced. 
You've just described Ripple, open source for a quarter, live for a year now.

https://www.coinlend.org <-- automated lending at various exchanges.
https://www.bitfinex.com <-- Trade BTC for other currencies and vice versa.
fasbit
Sr. Member
****
Offline Offline

Activity: 425
Merit: 253


View Profile
January 10, 2014, 02:01:07 PM
 #27


You've just described Ripple, open source for a quarter, live for a year now.

1. Ripple is not ANON.  They actually disclaim this in their marketing literature.
2. ALL transactions are cleared by Ripple, not just the network.
3. I wouldn't exactly call Ripple an Open Source escrow service.

Sukrim
Legendary
*
Offline Offline

Activity: 2618
Merit: 1006


View Profile
January 10, 2014, 02:21:43 PM
 #28

1. You did not specify anonymity as design goal in your example
2. Ripple is the network, it could be that you mean "RippleLabs", the company developing most software behind it? Anyone can set up validators by the way and anyone is free to choose their set of validators too.
3. What else? Gateways are the "licensed brokers" where you deposit fiat or crypto in your example, Ripple itself is the "P2P bulletin board" + trade engine. Transfers are atomic, so no need for additional escrow.

https://www.coinlend.org <-- automated lending at various exchanges.
https://www.bitfinex.com <-- Trade BTC for other currencies and vice versa.
coinrevo
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
January 10, 2014, 03:04:48 PM
 #29

You need first of all a decent test environment. Basically you set up some bots which load-balance the engine.

The problem is arbitrage and efficiency. For true price discovery to occur, you need orders which are ordered by time. Because the price you want to be executed at is the best price, not say 1% more as a buyer. If I offer you 1 BTC for MtGox Price + 1%, that is a very good deal for me. So liquidity flows to the deepest orderbook, and everyone else is paying for market makers (who meet there). And those market makers are going to be machines who can execute orders in 1 of 10^6 second. Writing an engine that scales is very hard for many reasons, most importantly market design.

kezzyp
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
January 15, 2014, 09:24:31 PM
 #30

The idea is simple, the execution never is.

I was about to same exact same thing, but anyways i reserve this, its going good..
nipol
Newbie
*
Offline Offline

Activity: 46
Merit: 0


View Profile
December 06, 2017, 12:33:46 PM
 #31



We are looking for software to organize a cryptocurrency exchange (have a look at: https://bitcointalk.org/index.php?topic=2488439.0 )

And we will be very grateful for the advices and links!

 Roll Eyes Roll Eyes Roll Eyes


timisis
Member
**
Offline Offline

Activity: 178
Merit: 10


View Profile
December 06, 2017, 01:28:17 PM
 #32

Openex is gone from github. Honestly I had no idea "free" users can remove projects, perhaps he went premium just for this!
nipol
Newbie
*
Offline Offline

Activity: 46
Merit: 0


View Profile
March 02, 2018, 11:46:08 AM
 #33

We are still looking for software to organize a cryptocurrency exchange (have a look at: https://bitcointalk.org/index.php?topic=2488439.0 )

And we will be very grateful for the advices and links!

 Roll Eyes Roll Eyes Roll Eyes
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!