r/Bitcoin • • Apr 12 '13

Buttercoin - Open Source High-Performance Bitcoin Exchange Project

[deleted] — view deleted post

1.3k Upvotes

446 comments sorted by

37

u/eklass Apr 12 '13

Accepting virtual currency is "easy" enough, but how do you plan to deal with the fiat side of deposits?

Or do you have no interest in running an exchange--just coding one?

0

u/[deleted] Apr 12 '13

[deleted] — view deleted comment

22

u/17chk4u Apr 12 '13

The question I have about fiat (and perhaps the same question that the OP was asking) was "if I buy or sell at a distributed exchange, I'm going to have to send my fiat to, or receive my fiat from, someone. Who is that, and how could I trust them?"

Also, how do you deal with the FinCEN issues regarding money exchangers.

21

u/runeks Apr 12 '13

OP is not building a distributed exchange, as far as I can see.

With regards to your question about a distributed exchange, the solution to the problem is to have trusted actors within the distributed exchange. The order book should be maintained in a distributed manner, but the trades should be executed by trusted actors on the exchange. One such actor could be Mt. Gox. The difference is that they would only provide the service of moving fiat around, they wouldn't maintain an order book.

The distributed order book is possible with the Ripple system. I've explained how I think it works in this post:

http://www.reddit.com/r/Bitcoin/comments/1c7vb4/could_this_distributed_currency_exchange_ie/c9dxbvc

The way I understand it is that Mt Gox, for example, could become a "gateway" on the Ripple network. You would then fund your Mt. Gox account as you do usually, but Mt. Gox wouldn't have its own order book. The BTCUSD order book would exist in a decentralized manner within the Ripple network. So if Mt. Gox trusts Bitstamp, for example, a Bitstamp user with 100 USD in his account - which we will call bitstampUSD - wants to buy 1 BTC at 100 USD each. If Mt. Gox trusts Bitfloor, they can exchange dollars between themselves, thus enabling users to trade across exchanges.

For example, the user Bob on Bitstamp has 100 USD in his Bitstamp account. These USD are represented as bitsstampUSD within the Ripple network (a currency in and of itself in the Ripple network). Another user, Alice, has 1 BTC on her Mt. Gox account. This is represented as mtgoxBTC within the Ripple network. If Mt. Gox and Bitstamp trust each other, that means they think their respective currencies are good, ie. that mtgoxUSD, bitstampUSD, mtgoxBTC etc. are valid IOUs. So when Bob wants to buy 1 BTC for 100 USD, he will put a bid order on the book, and if Alice puts a ask on the book, selling 1 BTC for 100 USD, Mt. Gox can exchange their 1 mtgoxBTC from Alice's account with the 100 bitstampUSD from Bob's account, and a trade has happened. Mt. Gox and Bitstamp would then periodically (at the end of the day, for example) settle their outstanding debt (Mt. Gox would redeem bitstampUSD for actual USD and bitstampBTC for actual BTC and vice versa).

Thus, the usual actors - Mt. Gox, Bitstamp, Bitfloor, bitcoin-24.com, BTE-e.com, etc. - would be reduced to entities transferring fiat money to each other within the Ripple network, and we would effectively have a decentralized exchange, where only single actors can be DDoS'ed. Since the order book is maintained in a decentralized manner, it cannot disappear because of a DDoS, and the exchanges that are able to withstand DDoS attacks would get the trades when Mt. Gox is down, thus increasing the incentive for the exchanges to protect themselves against DDoS attacks.

http://www.youtube.com/watch?v=M16ZatXbmLg

→ More replies (19)

5

u/rick2g Apr 12 '13

This is very close to my question - basically, exchanges are the biggest bottleneck in Bitcoin right now, and part of that is the difficulty of establishing exchanges that won't get the operators arrested. IIRC, there was an article about MtGox a while back that quoted a $25 million price tag to get all the legal requirements and certifications taken care of so that they could operate openly and run ACH/wire transfers/deposits. Obviously, that goes well beyond the standard PCI requirements for online vendors. Can this be addressed thru your project, and if so, how?

→ More replies (1)

36

u/hugolp Apr 12 '13

Why node.js? Not bashing, just wondering because its not what comes to mind when you are talking about a real time high demand system.

14

u/pyabo Apr 12 '13

I had the same question... OP says high performance is a chief goal and then goes with an interpreted script backend? I don't get that part. Surely you'd get better performance out of Java, C++, or .NET; even if your system is I/O bound that's one less layer of abstraction.

My experience with node.js is nil, so maybe I'm just biased.

→ More replies (12)

4

u/jevon Apr 12 '13

Agreed. From what I can tell even LMAX is designed to be single threaded. Introducing the resource and scalability problems of Javascript is going to seriously hinder the performance of the platform. I'd imagine PHP optimised later into Java optimised later into C as necessary.

I've thought of building an exchange too, and I still think that having a master trade processing server/thread is still probably the most correct option. You don't want to have multiple threads with incomplete information unless you want to reduce the precision of trades.

2

u/killerstorm Apr 13 '13 edited Apr 13 '13

I'm currently trying to work with bitcoinjs-server, which uses node.

Reliability of this thing does not please me, at all. For example, it needed a restart during testnet blockchain download, it just hanged on some block. (It was eating CPU so it wasn't a problem with the network.)

I have a couple of other components based on node.js. Basically they query data from bitcoinjs-server and populate a database, code is fairly simple... But it's simply a crapfest. It leaks memory and needs to be restarted, it crashes in weird ways.

So I have an impression that it is one of least reliable platforms I've ever worked with.

OK, maybe people who wrote these particular applications are to blame, or maybe I'm using a wrong version of node or something.

But something tells me it is not a terribly good idea to use a language without static type checking, running on a virtual machine optimized for showing LOLcats, to run anything finance-related.

3

u/DrArcadium Apr 13 '13

node.js isn't inherently unstable, sounds like the platform middleware you're using is causing these leaks, either that or you're ram greedy.

0

u/[deleted] Apr 12 '13

[deleted] — view deleted comment

11

u/killerstorm Apr 13 '13

Have you considered Go?

→ More replies (2)

14

u/hugolp Apr 12 '13

:) Well compared to python, almost anything is fast (and I do love python).

But Im sure you know what you are doing (at least much more than me) so if you have chosen node.js and you think cpu is not going to be a problem then Im sure you have good reasons, I was just surprised by the pick. Not what I expected (mostly i was expecting java or C++).

6

u/hrghr Apr 13 '13

You are the one who is right.

It is a CPU bound problem, and as I've said in other comment, virtually every real-world exchange is written in Java, C++ or C.

→ More replies (1)

13

u/deeper-blue Apr 12 '13

I would reconsider that - the bottleneck is probably data lookup and matching. I would implement just those two pieces in pure C and everything else in a higher language (would probably go with python).

16

u/revcbh Apr 12 '13

It's relatively simple to rewrite performance critical parts in C as it becomes needed. Premature optimization ends up being a waste of time.

16

u/deeper-blue Apr 12 '13

While I agree with your statement about premature optimization... I didn't talk about writing inline assembler or optimizing data structures to fit the cache. Since when is writing in C a premature optimization?

I also find pure C much more readable than javascript.

→ More replies (12)
→ More replies (3)

9

u/r3m0t Apr 13 '13 edited Apr 13 '13

You don't need something that's readable by a lot of people, you need something that's readable by smart, dedicated people. A good exchange is not going to be built by a thousand people idly browsing your code on github. And you ignore that there aren't many developers who can wrap their mind around the LMAX architecture either. Surely you have to test each consumer because one slow one will back up the rest of the system?

Erlang is fine and is pretty much created for this situation, its only issue is that it doesn't have a JIT so it runs slowly, but would still easily be able to run 100* faster than Mt Gox IMO.

Edit: Have you looked at PyPy? It's very, very fast.

3

u/938 Apr 13 '13

For a financial market I hope they go with Erlang or Haskell. Python and Ruby are too lassiez-faire for it, though I do love them too.

→ More replies (5)

7

u/sososojacques Apr 13 '13

Being a distributed systems guy too, I understand your stance towards node.js, but I admit I disagree with what you say about Erlang. Earlier this week, with a couple of my colleagues, we also discussed about what it would take for us to implement a proper exchange, and when it came to the implementation language, it was mostly between Haskell, Java and Erlang.

Erlang

I don't think I need to introduce OTP to you if you already shipped Erlang code, but you probably understand why it would be a good choice for this application. Hot swappable code is also something tempting for any serious application running 24h a day.

Other thing, a lot of the Erlang programmers you will find have to deal with serious problems where keeping the system running is critical. Telecom is an industry where reliability is not an option. You want to have this type of programmers with you.

Haskell

Haskell, with its incredible performance, concurrency model, and, of course, type safety, make it a very serious contender. The Haskell compiler would do so much work for us that we could actually focus on the actual problem.

Java

Java was a contender because it's fast, has an enormous amount of libraries and tooling and used a lot in the finance industry (well, you cited lmax yourself!), so finding talented and experienced programmers, or even consultants, would be totally possible.

The rest

C is... fast, and finding talented C programmers is doable, but shipping safe and secure C code is quite a big undertaking, so we thought we would rather write a few modules in C if necessary, rather than the whole app.

Node was ruled out as we realized that it does not provide any advantage over any of those three languages in this scope, even though we all actually shipped production code in node.

All of that to say, I hope you reconsider your decision and see Haskell/Erlang/Java as potential contenders. But still, if you want to go with Node, I'll be happy to help, as I totally agree with the rationale of the project!

Good luck!

3

u/SeriousWorm Apr 13 '13

How come you haven't looked at Scala + Akka? It's a modern highly concurrent type safe combination, based on the actor model. Scala provides an awesome concise language, miles ahead of Java while still running on the highly performant JVM, while Akka provides the concurrency and allows easy scaling. All Java libraries are of course available, too. You can even hot swap code easily with JRebel (free for Scala users).

→ More replies (2)

2

u/hrghr Apr 13 '13

Then you think wrong.

The reason you typically have those huge ass queues in front of a matching engine is precisely because it's a CPU bound problem.

→ More replies (2)

2

u/SeriousWorm Apr 13 '13

Have you looked at Scala / Akka? The combination is perfectly suited for highly concurrent, high performance, safe and readable code. It's easy to transition from Java to Scala and in any case Akka supports Java as well. Also, I'm pretty sure the JVM is much more suited for this task, as opposed to a Javascript VM.

→ More replies (20)

12

u/frycicle Apr 12 '13

I'm interested in helping. There is a Bitcoin group at my University and this was a project (open source exchange) I was going to present that we work on. I'll try to get us to work on this one.

0

u/[deleted] Apr 12 '13

[deleted] — view deleted comment

2

u/cha0s Apr 12 '13

We're currently chatting on freenode at #buttercoin

http://webchat.freenode.net/ channel #buttercoin

9

u/mariano54 Apr 12 '13

May I ask who is the Stanford proffessor? Because I'm studying there now. Either way, this sounds like an excellent idea! This can really help get bitcoin up.

0

u/[deleted] Apr 12 '13

[deleted] — view deleted comment

3

u/bshwckr592 Apr 12 '13

I study here too!

8

u/[deleted] Apr 12 '13

Please take advantage of cloud computing. These sites make so much money on transaction fees, it's ridiculous to think they should be constrained by whatever hardware happens to physically be there at the moment. A high-demand site like that should temporarily spin up a few extra instances on a Microsoft or Amazon cloud space if traffic jumps up.

6

u/[deleted] Apr 12 '13

This is already addressed in the hackpad doc he linked to. Single server runs the main engine, but multiple servers can handle the API chatter in a scale-out fashion. The main server has to be singular in order to be able to run the orders in proper sequence.

→ More replies (28)

10

u/ItsBirdItsAPlane Apr 12 '13

Hey there Paul, My name is Kyle Collins, and I am a serial entrepreneur/SEO'r/Developer.

I've been interested in Bitcoin for a long while now, and I'd love for it to stable out and become a viable currency.

I think you are just the person I've been looking for to support. I'd like to discuss a bit more about what motivates you, and possibly fund your project (along with any other developers you may want to bring on board) and ideas.

Within my business I usually don't back projects with more than 10 thousand, but I've got 70 thousand in reserves, and you may just be getting my support.

Please shoot me contact request on skype so that we can communicate futher. (CerviaDeveloper)

1

u/limerickeyy Apr 13 '13 edited Apr 13 '13

Your Skype username leads me to ChosenRewards on hackforums. Which leads to buybitcoinwithsms.com, which has a phone number associated with it that leads me to this: http://pastebin.com/EvPw0QiT (where you say you are only 17 years old)

1

u/ItsBirdItsAPlane Apr 13 '13

That's been a LOONG time ago in the world of internet marketing. lol.

28

u/Jandur Apr 12 '13

It's pretty cool to see people interested in this getting together to build something. Best of luck.

10

u/cybrbeast Apr 12 '13

The enthusiasm in this thread is great, especially after all the resent sulking. I wish bitcoinbillionaire would have saved his tips for awesome stuff like this, instead of just randomly throwing it around. Not want to sound ungrateful though, as he tipped me too, so I've tipped most of what I had left to this :)

→ More replies (3)

21

u/bitcoiny Apr 12 '13

This is the great thing about Bitcoin, those of us who believe in the idea WILL come together to fix the problems. The recent boom can only be good in the long run, in terms of bringing these issues to the fore and expanding the pool of talent for fixing them. Good luck!

53

u/hardleft121 Apr 12 '13

+5 internets verify

21

u/bitcointip Apr 12 '13

[✔] Verified: hardleft121 ---> ฿0.05 BTC [$3 USD] ---> enki23 [help]

7

u/DeCiB3l Apr 13 '13

and now that's $5

1

u/kaax Apr 13 '13

You're awesome!

14

u/[deleted] Apr 12 '13

Right man at the right place at the right time with the right motivation for the right reason.

I wish I had something to offer the project besides moral support, but thank god for folks stepping up and taking on projects like these for the reasons they do!

Thank you.

10

u/cybrbeast Apr 12 '13 edited Apr 12 '13

Great idea! We really need a good exchange before Bitcoin can truly become viable. It does seem like a huge challenge and effort, so I hope this gesture of faith isn't misplaced.

+bittip ฿0.25 verify

I wish I could do more, but I don't have the technical skills. I made some 3D Bitcoin pictures though, so if you wanted some 3D modelling done I might be able to help. However I think vector art is usually more suitable for professional looking sites, and I'm not good at that. Maybe some promotional work.

3

u/bitcointip Apr 12 '13

[✔] Verified: cybrbeast ---> ฿0.25 BTC [$14.99 USD] ---> enki23 [help]

19

u/gamerandy Apr 12 '13

+btctip 1McqPj92jvWfFg5F24dwyDSUptjTosH2EY 5 dollars verify

When you're ready, I'd love to interview you for The Daily Bitcoin Show

Good luck and godspeed in your endeavor

2

u/bitcointip Apr 12 '13

[✔] Verified: gamerandy ---> ฿0.08340284 BTC [$5 USD] ---> 1McqPj9... [help]

7

u/cyborgcommando0 Apr 12 '13

This would be exciting to help out on (I'm no programmer).

Also, why buttercoin?

15

u/msltoe Apr 12 '13

Probably just tried to find the best domain name available. Tagline - "Our goal: To make Bitcoin transactions as smooth as butter"

13

u/goonsack Apr 12 '13

I can't believe it's not buttercoin

→ More replies (1)

3

u/hak8or Apr 12 '13

I feel that this might create some confusion and make some people think that there is an actual new cryptocurrency called buttercoin. That would be humurous!

7

u/kinkydiver Apr 12 '13

in node.js B-tree filesystem

"If all you have is a hammer, everything looks like a nail".

But I agree.. having stable exchanges would be a big boom for BTC. Great idea.

7

u/ESRogs Apr 12 '13

It might be a good idea to sign up for an exhibit space at the Bitcoin 2013 conference in San Jose next month: http://www.bitcoin2013.com/become-a-sponsor-or-exhibitor.html.

6

u/Annom Apr 12 '13

Great idea.

I am a programmer and want to help.

I don't have experience with security and distributed systems. Also very little javascript experience. I am motivated to learn about all these though and I can probably help in some way at some point.

What is the best way to familiarize myself with what you are trying to build here? I understand the concept, but not the technical details and problems. Just follow the design phase and read/try/test the code?

3

u/[deleted] Apr 12 '13

Read about event sourcing, and the LMAX architecture (on the Martin Fowler wiki). Then download and run the buttercoin code. Familiarize yourself with Node.js and coffeescript.

3

u/r3m0t Apr 13 '13

You realise there's only 200 lines of code? It doesn't do anything yet.

→ More replies (1)

2

u/Annom Apr 12 '13

Thanks. I will!

6

u/lemkenski Apr 12 '13

Coffee script is an interesting language choice. Why did you choose it?

2

u/[deleted] Apr 12 '13

I think coffeescript is great, and much more readable than javascript. And for those who don't like javascript, it actually gets you to like it more. But if you are going for longevity of the project, Discourse.org decided to convert from CoffeeScript to javascript so they could attract a wider audience of open source contributors. I don't think their decision was worth it though.

→ More replies (1)

6

u/Nassor Apr 12 '13

One quick suggestion before you guys start getting too far ahead. Can you make it agnostic of what's being traded? Rather than BTC to USD it would commodity to value. Like if someone wants to build a baseball card exchange using seashells as currency with this platform they should be able to.

Anyhow I'd like to help out as much as possible I'm a software engineer contractor between contracts at the moment. I'm not sure I'd be much help because 99% of my experience is in digital imaging in real time systems but I guess you never know!

20

u/fuckoffplsthankyou Apr 12 '13

It has to be able to run on the Tor network.

→ More replies (4)

5

u/funky_pretty Apr 12 '13

Would love to help financially!

5

u/rockefoten Apr 12 '13

Nice to see some positive initiatives that can bring some much needed enthusiasm. Wish you the best of luck in your project!

5

u/TheGiantBroccoli Apr 12 '13

This sounds great! I'm a young developer in SF as well and would love to help out with this.

5

u/patcon Apr 12 '13

This is effin exciting. Tweeted at you about offering support for the server provisioning scripts. I work with Chef/Vagrant.

Would love to see this built in the spirit of Travis-CI :)

5

u/BobbyLarken Apr 12 '13

Be sure to look at how the ripple.com code clears transactions. While you don't have to copy the ripple model, there probably something to be learned about how they keep track of balances in a p2p system. It is based on an open trust model that can be verified in a tree structure every minute or even quicker. Nodes that cheat or make a mistake are quickly identified and weeded out.

If you are doing a distributed system, there will still have to be trusted and recognized individuals that can hold paper currency, as well as individuals that can hold bitcoins. It may turn out that ripple.com has the correct model, and all you have to do is build on it to produce the desired system.

Just my two btc cents.

4

u/ragmondo Apr 12 '13

Here's something that someone "knocked up" a few years ago using web.py. It runs on a 400Mhz machine and does 100 trades / second. Ok... its probably only doing the "easy" bit but there is an interesting architecture discussion on one of his vimeos. Just thought I'd send it your way. https://code.google.com/p/emte-trading/

4

u/[deleted] Apr 13 '13

Curious, is this you? The post has a different donation address. If it is someone impersonating you, then I'll report it.

https://bitcointalk.org/index.php?topic=175347.0

1

u/Buckiller Apr 13 '13

don't think that's Paul :)

7

u/kerstn Apr 12 '13

I would like to see proof of the so called "quantum cryptographic engine" you speak of.

3

u/apetersson Apr 13 '13

there are real, working systems that cannot be eavesdropped for physical reasons. Anton Zeilinger developed such systems for example.

2

u/kerstn Apr 13 '13

Please elaborate

1

u/musicbunny Apr 13 '13

Here is the pfd from his webpage (I haven't read it.): http://arxiv.org/pdf/quant-ph/0408179v1

7

u/narwhalslut Apr 12 '13

node.js?

lol. Have fun with all of those values being floating point.

1

u/samhocevar Apr 14 '13

You plan to write a high performance exchange using a language that doesn’t even have an integer type? Good luck, sir.

9

u/[deleted] Apr 12 '13

Support this! Fuck Mtgox

13

u/itsnotlupus Apr 13 '13

It's considerably less antagonistic than that.

If this ends up being a huge success, MtGox could simply decide to start using it too.

There's literally nothing destructive about this.

6

u/[deleted] Apr 13 '13

it will be better if they decide to use proven opensource more reliable structure and code for their exchange, everybody wins.

3

u/[deleted] Apr 12 '13

Programmer here, so in. I had the same exact thought yesterday.

→ More replies (1)

3

u/myringotomy Apr 12 '13

Why not use ripple? Isn't that what it's supposed to be for?

3

u/[deleted] Apr 13 '13 edited Apr 13 '13

3

u/joseph_bejart Apr 13 '13

Hi guys

I find it wonderful that you're taking on this task.

I think that if you guys build in the option to make sure that traders are human (captchas + one minute delay between orders), you could enable some exchanges to try to be bot-free, and try to curb high-frequency trading... And people might like that.

7

u/lukasbradley Apr 13 '13

You lost me at node.js.

5

u/scrod Apr 12 '13

I don't know why you'd use node.js. Erlang is practically designed to operate an exchange of the sort you're trying to build.

→ More replies (1)

6

u/Todamont Apr 12 '13

Node.js??? When developing low-latency high-volume computational processes, you want to stay away from interpreted languages. Now I'm skeptical of your competence.

→ More replies (4)

4

u/miscreanity Apr 12 '13

These are exactly the kind of systems that could interface with Ripple and Open Transactions to create an unbelievably robust structure.

4

u/Puupsfred Apr 12 '13

Please include ripple!

2

u/[deleted] Apr 12 '13

So what do I do if I want to contribute but am an amateur coder at best? I've been thinking day and night about how a decentralized exchange could work.

2

u/perthguppy Apr 12 '13

This does not seem to be a decentralized exchange, but coule be the basis of a "turnkey" exchange system.

2

u/[deleted] Apr 12 '13

Hey, I can't code much, my knowledge is mostly in Python.

I also don't have that much money to donate.

I would love to help though. I work occasionally as a social media manager and and PR for some local businesses. I'd love to help if you guys want.

2

u/lusid Apr 12 '13

I wish I lived in a place not filled with retards so I could join in on stuff like this.

2

u/hak8or Apr 12 '13

I think a popular question will be, is there any way we could invest?

Also, any ideas on how you will handle fees yet?

Since this will be open source, are there any ideas towards a normal shmoe like me being able to get the exchange up and running with little knowledge of SQL databases and whatnot? Or is this intended to run only on some beefy servers?

2

u/[deleted] Apr 12 '13

You'll probably be able to run it on any decently sized machine (4 cores, 8GB+ RAM, fast disk), but you'll probably need someone who knows what they are doing to set up and maintain a deployment.

2

u/working101 Apr 12 '13

Not a programmer by trade but I am a systems administrator who would love to help in any way possible.

2

u/paleowannabe Apr 12 '13

Let me know when you'll be in need of quality assurance - I do it for a living, and I might be able to find some spare time to help you out!

2

u/[deleted] Apr 12 '13

Looks promising!

I'm no programmer, but I could help with the UX, but from Europe...

2

u/[deleted] Apr 12 '13

Sounds cool. Just hope you handle the decimal calcs correctly in javascript! http://stackoverflow.com/questions/2876536/precise-financial-calculation-in-javascript-what-are-the-gotchas

2

u/Puupsfred Apr 12 '13

please include short selling!

2

u/Puupsfred Apr 12 '13

please include trading on margin!

2

u/Puupsfred Apr 12 '13

please include STOP orders!

2

u/Puupsfred Apr 12 '13

Please include altchains!

2

u/tristara Apr 13 '13

Hey Paul,

Great work in organizing this.

My suggestion: just use the LMAX code -- it's battle-tested and pretty easy to use.

Then, you can focus on the other aspects of the exchange, like the policy for front-end API servers to prevent DDOS flodding. And, of course, the web UI.

2

u/ItsAConspiracy Apr 13 '13

Distributing the core order matching engine isn't possible, because orders need to be executed in a defined sequential order.

That seems an odd statement on a bitcoin forum ;)

2

u/ItsAConspiracy Apr 13 '13

You may be interested in this paper on matching algorithms.

2

u/[deleted] Apr 13 '13

very interested in helping. experienced in node.js. ill join the chats today

2

u/fellowtraveler Apr 13 '13

Just FYI -- Open-Transactions has markets and trading, with limit orders, date ranges, stop orders, etc. You can perform trading using the command line tool (you can write client-side scripts...) as well as the test GUI.

2

u/webznz Apr 13 '13

wow.. the gathering sounded like something out of an avengers movie.

2

u/HouseholdAppliance Apr 13 '13

If there's a god, then you deserve to be blessed. Unlike a previous highly qualified individual who started a thread on how he profits from weak markets and just shitting on all the exchanges, you actually look to help! Bravo to you my friend!

3

u/throwaway-o Apr 12 '13

The free market -- collection of individuals working and trading together peacefully -- works!!

3

u/pyalot Apr 12 '13

I think that using JS/node for the server is a stupid choice. I like JS/Coffeescript. But it's a stupid idea for a highly robust, reliable service.

I've written python based high performance software (with a custom server implementation) that's been operating for more than 600 days without reboot and degradation under load.

If you're pulling in node/V8/JS you're just asking for trouble.

2

u/[deleted] Apr 12 '13

Can such a system accept load balancing across multiple data centers. Take Mt. Gox for example. They have their own servers ( which is good), but when the trade volume suddenly spiked in the last 30 days, they couldn't expand fast enough. It would be great if you could set up the system so that it is running on the in house servers and also an Amazon EC2 (or equivalent) cloud. That way, during normal load the Amazon servers are basically idle and everything is being done on the in house servers. During this time you would only be paying for a single CPU from amazon so it's really cheap. If there is a sudden spike in demand you could quickly call up a thousand amazon nodes and take care of it. Then as you expand in house, you can scale back the Amazon cloud as needed.

I think an in-house server + scalable cloud backup is the best way to create a proper system that can react to most situations.

1

u/noxstreak Apr 12 '13

Would a CCNA/ CCNP security help you at all?

1

u/penispretzel Apr 12 '13

what do you think about something for the vendors that would take the BTC as soon as they accept the order and instantly converts it to the market price in usd or whatever currency so they would have minimal time to lose out on wild market shifts? just a thought.

5

u/[deleted] Apr 12 '13

bitpay.com

→ More replies (1)

1

u/ToryJujube Apr 12 '13

+bitcointip @enki23 5 bitcents

→ More replies (1)

1

u/perthguppy Apr 12 '13

Hell yes. There were some smart guys discussing exchange backends on the mtgox AMA. I will donate some money to the project as soon as i can get some money to an exchange / payment processor to buy some more coins (yay for verification). Would love to also help out anyway i can but im mostly a windows sysadmin so not sure how usefull i wouldbe.

1

u/[deleted] Apr 12 '13

I think it's a great idea. I'd throw some money at it.

1

u/[deleted] Apr 12 '13

I can't code but I have some funds I will contribute if there is progress starting to be made. I will monitor this.

1

u/JAndiz Apr 12 '13

This is the kind of action which gives me warm-tingly's. Kudos to you for your initiative, it's an inspiration to us all. Good luck!

1

u/JokerSp3 Apr 12 '13

I emailed you - I would love to contribute to an open source project. I want to make an exchange I am just finding I don't have enough time in my day to do the entire thing on my own.

1

u/remyroy Apr 12 '13

I like that LMAX architecture. I did a quick glimpse of it but I fail to see how different it is from using standard message queues like RabbitMQ or something else.

Keep up the good work!

1

u/neurobro Apr 12 '13

Awesome. I was planning to write up a similar post in a couple of days (minus all the stuff about experience, credentials, partners, ...) I hope this project grows fast!

1

u/SaroDarksbane Apr 12 '13

This is fantastic and (IMO) exactly what bitcoins needs. I had just decided today to start looking into an open source trading platform I could adapt for use with bitcoins, but I'm happy to see that someone more experienced than me is already on it.

Will definitely keep an eye on GitHub, and who knows, maybe I can contribute.

1

u/epeen90 Apr 12 '13

BUTTERcoin...

1

u/uedauhes Apr 12 '13

lmax seems like the perfect architecture. What do you plan to put inside the "business logic" component? What needs to be there minimally? Would you pipeline these together to check for things like account balance before accepting an order?

Great article although the use of flowerly language to describe simple ideas is a bit off-putting.

1

u/TheAndy500 Apr 12 '13

My understanding from reading this is that the end product would simply be a more reliable Mt.Gox, is that the case? I assume you would have to reinvent the wheel with the whole verification process and the cold storage of bitcoins, etc. Is my understanding correct?

1

u/Kiwizqt Apr 12 '13 edited Apr 12 '13

I'm sorry in advcance, this might be a dumb question but what do you (we) mean by

but I really want Bitcoin to succeed

I don't really get the thing, from what I understood, Bitcoin is an experimental alternative currency which was never meant to be functionnal or competing with $ or even the "stockability" of gold as some would imply.

Is sucess meant in a way that Bitcoin will make things change ? Can someone bring me light ?

2

u/[deleted] Apr 12 '13

It's definately an answer to currency debasement and fractional banking.

1

u/RDS Apr 12 '13

Will you need any web/ui/graphic designers as well?

1

u/voluntaryistmitch Apr 12 '13

Thank God. I hope this succeeds.

1

u/TurnTheShip Apr 12 '13

this sounds pimp

1

u/JollyClogger Apr 12 '13 edited Apr 12 '13

Would be happy to use your service IF I had a bitcoin. "missed the boat I did!" Would any of you invest now if you were just starting? Outsider looking in.. Good luck to all!

→ More replies (1)

1

u/MiracleRiver Apr 12 '13

Think Marlon Brando in "Last Tango in Paris". Sort of Buttcoin in reverse.

Ha ha!

Alright... please yourselves then!

1

u/SeanusIdius Apr 12 '13

Awesome sounding initiative. Please look after us Aussies with your exchange. Currently our only option is gox. Best of luck!

1

u/ng731 Apr 12 '13

Can you create an email list or something to keep people up to date? That would be awesome!

→ More replies (1)

1

u/Plumbum27 Apr 12 '13

If the project continues and starts to bear some fruit I will gladly contribute $$$ to it. Please keep reddit updated!

1

u/GrimAndSarcastic Apr 12 '13

Just FYI, typo in your 2nd sentence. (I've done or I did, not both ;p ... 'I've done' sounds better imo)

1

u/Tumorseal Apr 12 '13

I have no way to help you besides happily being one of your customers when you launch.

1

u/[deleted] Apr 12 '13

Technical is not the real problem for bitcoin. Lack of it could not explain the recent volatility. There are more monetary issues for it.

If we want to work on technology what we should do is build as generalized an exchange system as possible. Bitcoin may or may not stay in fashion but the technology may always stay useful in alternative currencies.

1

u/jahare Apr 12 '13

I agree this would be a great undertaking to stabilize and further extend bitcoin curreny.

+1 Buttercoin ;)

1

u/anon774 Apr 13 '13

Please don't use CoffeeScript in the interest of keeping the project as accessible as possible to interested developers.

1

u/[deleted] Apr 13 '13

yeahhhhhh said I and 2-Chainz ;)

1

u/[deleted] Apr 13 '13

+bitcointip 0.01 BTC verify

→ More replies (1)

1

u/mikewren Apr 13 '13

Oh butters!

(sorry, couldn't help myself)

1

u/janeTAX Apr 13 '13

any chance there will be some DECENT diagrams detailing proposed design?

→ More replies (1)

1

u/shupack Apr 13 '13

I'd love to see it happen! I'd like to help but I'm a novice, I'll follow along for the learning experience...

1

u/torabayashi Apr 13 '13

My original question also in the r/buttercoin subreddit: http://www.reddit.com/r/Buttercoin/comments/1c88tj/subreddit_improvement_thread/c9e6kn6

Forgive me if this question is newb: Would every server running an buttercoin exchange be on it's own? For example, if Bob wants to sell 1 BTC on Buttercoin server A, then Sally on Buttercoin server B who wants to buy 1 BTC would not be able to?

What if the entire exchange was p2p networked between buttercoin servers, so that Bob and Sally could trade?

I think what Bitcoin needs is more exchanges for sure, but fewer trades per exchange makes the price less stable on that currency right?

Or maybe simply the buttercoin servers could communicate what BTC is being traded at, so that the price is relatively stable.

Would having them p2p networked just make it one big exchange, thus vulnerable to a Mt.Gox-esque crash again?

→ More replies (1)

1

u/janeTAX Apr 13 '13

and while choice of (interim) language appears to have been made, later, as serious design and performance issues have to be looked at, the language Julia should be added to the list for consideration;

1

u/defconoi Apr 13 '13

This is epic, thanks op for taking the time and having the passion to do this

1

u/[deleted] Apr 13 '13

Thank you so much for doing this. Thank you thank you thank you

1

u/epiclogin Apr 13 '13

God speed ahead! The community needs this.

1

u/JSHDALT Apr 13 '13

Will you be posting updates on here? Or separate threads?

I will definitely be checking up on this.

1

u/borderpatrol Apr 13 '13

Any relation to Buttcoin?

1

u/timbtim Apr 13 '13

wtb shares

1

u/timbtim Apr 13 '13

Are you planning on also having support for alternate crypto currencies (litecoin / ppcoin etc)

1

u/musicbunny Apr 13 '13 edited Apr 13 '13

@enki23 Why not aim to be a more decentralized exchange?

From the user end I'd love to see a model like how Interactive Brokers works but instead of forex usd/eur, usd/btc.

They have a website for account management and tech support, but there is no trading on their website. They have software written in Java that is ran on the user's computer instead of the web page. This way there is little to no load on the website. Also, they have a fantastic API.

If you did it this way:

  1. It would be more professional. It wouldn't just be a bitcoin exchanger, but the mentality would be closer to an actual broker.
  2. If the software is running on the user's computer it can be decentralized the same way bitcoins are decentralized. This would carry on the bitcoin spirit.
  3. It would be much cheaper. The server load would be minimal on your end as user's computers would be doing the heavy lifting and most of the data transfer. It would also be extremely cheap to maintain.
  4. DDOS and flood immune.

I highly recommend considering something more revolutionary instead of just reinventing the wheel again. Until you consider something a bit more revolutionary, I don't see the benefit.

1

u/[deleted] Apr 13 '13

Would this be strictly for currency exchange or would you consider supporting advanced features such as margin trading, futures, options, and short selling?

1

u/myringotomy Apr 13 '13

Nodejs? Really?

Why don't you do it in erlang?

1

u/my_red_blanket Apr 13 '13

I'll never trust you.

1

u/psionix Apr 13 '13

Please if its possible see if you can arrange ACH transactions (Debit w/pin), as this would be a huge step.

Also, I cannot code but am local to SF if future help is needed in some other aspect. I'll stay tuned.

1

u/[deleted] Apr 13 '13

+ flattr you are amazing so I sent you a flattr payment too, keep up the good work looking forward to buttercoin

1

u/Gaby_64 Apr 13 '13

Unfortunately this is almost impossible to accomplish with a goal of real-time trading, we are limited by the speed of propagation through the distributed network.

is my idea:

trade client (updates the client on the orderbook, latest trades, high, low, charts and offers funding (connected to server 2) and trading(distributed) options)
public distributed orderbook (like the blockchain, every client will need to mine, secure with low difficulty since the only reward is a functional distributed trading platform)

central trade listener and executioner (server 1 - non-public)
(interacts with orderbookchain and server 2)
needs to broadcast the wait-for block number (your client requires his orderbookchain to be updated to this block to add trades)
probably through an attached public server

central banking interaction and escrow system (server 2)

The orderbookchain contains all the orders unfulfilled, fulfilled or partially fulfilled for its entire history. The non-public server listens for the longest chain and evaluates the orderbook to set new statuses on trades, then creates a new valid block with it.

The end goal would be something that executes trades every 5 minutes or lower if possible. Delays in the system are:
-Trade propagation
-Mining a orderbook block
-Central Trade Server picking it up
-Central Trade Server doing its logic
-Central Trade Server making a new block (some way to make it instant for its special case?)
-Clients getting the block and updating the displayed information

1

u/danster82 Apr 13 '13

Cool, looking forwards to it.

1

u/BitcoinPRBuzzcom Apr 13 '13

This is a great idea for the scalability of exchange operations and distribution of exchanges that Bitcoin urgently needs right now with the current exponential growth.

1

u/jdmax Apr 13 '13

Hi - please limit the frequency of high frequency traders. Thx !

1

u/hpski Apr 13 '13

I'm glad somebody's going to do this, and do it right. Looking forward to the finished product!

1

u/A_AnatomistHooks Apr 13 '13

Very interesting.

1

u/SWAYYqq Apr 13 '13

Great project! I have no idea of programming or coding, but if you need any help beside, I would be glad to help you out. I also left my mail, good luck!

1

u/[deleted] Apr 13 '13

Really, don't use JavaScript for this. This is the kind of thing bitcoin needs to move away from. It's just more amateur hour bullshit.

Another red flag is your completely impulsive plan.

On the other hand, I do agree that an open source exchange front end and backend would be a good addition to the community. I would highly recommend using languages and tools which are designed for high reliability and proof of correctness. Some examples would be erlang, java, scala, haskell. You are going to want an extremely durable message queue, something like activemq or zeromq, and likewise a database designed for correctness and data integrity, such as postgresql. This is one of those engineering domains where correctness and reliability is a top priority. JavaScript is nearly the worst tool you could use for this job.

1

u/[deleted] Apr 13 '13

node.js is proven to work in a highly-scalable fashion, which seems like a good fit here.

Yes you'd get gains from using haskell, but using node.js isn't an amateur decision in and of itself - with the right test-suite and similar frameworks it is productive, stable, and scalable.

→ More replies (1)
→ More replies (4)

1

u/reddog323 Apr 13 '13

I think you're headed in the right direction. I don't have much coding experience, but would like to help in any way possible.

1

u/Froppy0 Apr 13 '13

Fantastic Idea, as many have said, good luck to you.

However, I will also have to agree, the name is not very good. If you want to be taken seriously, you should have a serious name. Maybe you can use buttercoin as the dev name and once you release an actual exchange - you do something more serious. Even Mt. Gox's name is slightly ridiculous and hard to take seriously... There is a lot to a well planned out name, I must say.

Bitchange, cointrade, or something even more technical that uses an acronym.

Just my 2 cents.

1

u/Buckiller Apr 13 '13

this is an open-source exchange engine that real exchanges can use.

unknown if people behind this will also open an exchange. certainly the capability is there.

1

u/ZephramC Apr 13 '13

Looks promising.

1

u/Rainfly_X Apr 14 '13

+tip 5 USD verify

1

u/bitcointip Apr 14 '13

[✔] Verified: Rainfly_X ---> ฿0.05 BTC [$5 USD] ---> enki23 [help]

1

u/DavidCandlestick Apr 15 '13

Last week's trading exposed several problems with the exchanges, not just infrastructure. Here is how I would deal with infrastructure along with a couple of other problems:

http://www.reddit.com/r/Bitcoin/comments/1ccvst/how_i_would_manipulate_the_bitcoin_exchange/

1

u/sjalq Apr 15 '13

Interesting, using the disruptor/prevaylor pattern, I had the same idea.

I think this concept is very good and would like to suggest an extension.

Instead of writing an opensource system alone to improve future exchanges, why not also add an "inter-exchange" element to the system. Basically exchanges can be set up similar to Diaspora pods. So if I wanted to start an exchange to my local currency I can start up a pod and register it as an exchange between BTC and ZAR (South African Rands). I could then transfer my BTC to an account with another exchange pod that trades between BTC and USD. All seemlessly within the network of exchange pods.

Furthermore reliability information about the specific exchange could be uploaded, Ie an audit of my ZAR account signed by a reputable audit firm or two.

Having the interchange feature would also allow more interesting things to be priced in BTC. Like Coffee beans for delivery in June by an east African local farmers group. Price discovery can be very well greased by this for far more than just BTC.

1

u/sjalq Apr 15 '13

What do you intend to do tat requires the B-trees?

1

u/fifi_btcpl Apr 15 '13

I'm a web applications programmer from Poland and I've been working on similar open source project since february. It's written in PHP and by default uses MongoDB as its's database but I also plan to add drivers for other databases (including fail-safe simultaneous connections). Wallet is stored using armory in cold storage - security and performance are my priorities. It's completed in about 40%, but since I'm programming alone in my free time I think it will take me about two-three months to complete. If you want cooperate in some way, please let me know by sending e-mail to filip(at)ofp(dot)com Sorry for my bad english :)

→ More replies (1)

1

u/C0ffeeface Apr 17 '13

Hey man, this sounds great. What is your time frame of completion of this projekt?

1

u/xlzkprhsw Apr 17 '13

I hope someone has already pointed this out, but in case not:

in your quora-article in this sentence you probably meant "then" instead of "or": If any of those 300 entities get compromised or malevolent attackers will be able to read your email, access your bank account, and violate your privacy.

1

u/n0mad_10 Apr 23 '13

the projects dead, right?

1

u/donnyd413 May 01 '13

I hope Max Keiser reads this!

1

u/jaminunit May 04 '13

I love the idea of mutually assured destruction to create incentive to make the p2p trade go through. http://www.policymic.com/articles/39633/what-do-bitcoin-and-mutually-assured-destruction-have-to-do-with-each-other

1

u/ghoul21 May 10 '13

I would gladly support anything that could help cryptocurrency get off the ground and mainstream Support Cryptocurrency!!!! Make Cryptocurrency!!!!

1

u/[deleted] May 15 '13

Damn hot but $hizzle needs a logo!

1

u/muyuu May 16 '13

Any news on this?

1

u/No_2 Jul 31 '13

Do you anticipate your design will be decentralised or centralised?

1

u/BetterThanCash Oct 04 '13

how can I help, marketing, sales and a little web knowledge not much

1

u/NotoriousArab Apr 12 '13

I wish I was an advanced programmer already because this sounds like an awesome project.

1

u/selax77 Apr 12 '13

Sounds amazing. Will definitely support financially

1

u/dog_on_acid Apr 13 '13

That's the thing with fiat women, everythings good buttercoin

*Badum ts