chromaway / ngcccbase

next-gen colored coin client base
MIT License
85 stars 46 forks source link

p2ptrade #16

Open killerstorm opened 10 years ago

arichnad commented 10 years ago

What's the plan for p2ptrade? I don't know how we plan on distributing the EOffer and the EProposal objects. I assume it won't go over the bitcoin protocol, right? So we'll be setting up our own network of nodes?

amidvidy commented 10 years ago

interested in helping out with this. Is there some kind of specification for the p2ptrade protocol?

killerstorm commented 10 years ago

Here's a brief description: https://github.com/bitcoinx/colored-coin-tools/wiki/p2ptrade

I've already implemented the basic form of it (see here), it works in the sense it is possible to trade, but it is incomplete: it doesn't do all checks.

These checks require understanding of coloredcoinlib's internals, so I'd rather implement them myself.

However, there are various improvements to p2ptrade which we plan to implement:

  1. Support partial fills.
  2. Support for other communication channels, for example, BitMessage or IRC.
  3. Strategies which make p2ptrade less prone to DoS and spam attacks, for example: checks, monitoring, reputation and so on.
  4. Alternative agent behavior strategies. For example, proposing to all matching offers. (This will allow exchange to function even under DoS/spam attack.)

Would you like to implement something from this list? Some of these improvements are fairly self-contained, other ones require changes to internals and research/design...

amidvidy commented 10 years ago

I'll probably start out with (1) to familiarize myself with the codebase a bit, but I'd like to explore 2 & 3 as well. In terms of other communications channels I think it would be interesting to consider a DHT (e.g. Kademlia) based design for higher network scalability. In any case it's something I'll be thinking about. At the moment I'm in exams at school so its unlikely I'll be able to get started for about a week, though.

amidvidy commented 10 years ago

just submitted a pull request to finish up test_basic to familiarize myself with the code. I'll be on IRC later tonight.

amidvidy commented 10 years ago

I've started implementing a generalized order matching engine, with the goal of supporting partial fills as well as scalability for high order volume and many asset pairs. It should be easy to integrate into the p2ptrade agent when it is done.

Code is here: https://github.com/amidvidy/multimatch