Bitcoin Forum
May 07, 2024, 08:41:34 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4 5 6 »  All
  Print  
Author Topic: PROFITS - ATPx [Automated Trading Platform eXtended]  (Read 7621 times)
Nova! (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 101


View Profile
June 02, 2013, 08:01:10 AM
Last edit: June 02, 2013, 11:30:39 PM by Nova!
 #1

OpenPay is a project I've been working on for over a year now, mostly behind the scenes with the goal of bringing cryptocurrencies, from Cyberspace to meatspace.

The OpenPay project consists of an entire ecosystem and is comprised of, a new altcoin (more on that later), an FPGA scrypt miner, a properly licensed currency exchange, a financial services company, an EMV qualified smartcard, a new payment network, and the ATP or Automated Trading Platform.

The ATP is a key element of the OpenPay ecosystem, because for cryptocurrencies to truly enter the mainstream (and by mainstream I mean for merchants to feel comfortable with them), there needs to be greater price stability.  There are also legal and regulatory hurdles to overcome, but we need to solve some technical issues first.

I am fortunate right now to have about 90 days of downtime starting this week.  During this time I will be working like mad to complete OpenPay and all it's components.  
I have the help of a few talented programmers and of course we're looking for more volunteers.

My first foray produced the Isis-ATP product which I had to temporarily abandon in the middle of a major refactor.
Aido was kind enough to carry on with it and make significant improvements on it during my absence.

However I'm looking at page after page of issues stemming from the initial design choices, and if I had the chance to do it over again I would do many things differently.  Therefore I will continue to make patches and improvements on the Isis-ATP mainline via Aido's version, but there will be a definite EOL to my participation in this branch in the near future.  IsisATP will eventually be replaced with the next gen system called ATP eXtended or simply, ATPx.

ATPx itself is part of a project called PROFITS.
PROFITS stands for PROFessional Inter-exchange Trading System and as it's name implies it will focus mostly on arbitrage across exchanges.  

Because it's built on top of ATPx it will still feature all the good parts of ATP like customizable programmable trading logic for seeking opportunities on a single exchange.  
In fact, much of the existing code will be copied over, stripped of it's dependencies on outdated APIs then converted to use limit rather than market orders.
This will form the core of the new engine.  

The distinguishing feature of PROFITS is a secure "whispernet" that you can enable (disabled by default).  
The whispernet feature is designed to allow you to run a private cluster of bots that can communicate and coordinate trades across exchanges in realtime.  
The plan is for you to run 1 bot to per exchange.  Each bot will have it's own identity, similar to a bit message identity.  This means that you can choose to run solo or you can swap IDs with friends, and you will automatically be able take advantage of arbitrage opportunities even on exchanges you don't have an account on (you will be able to configure limits to this as well).

A group of ATPx bots cooperating together make up the PROFIT System.
  
Ever wanted to arbitrage across exchanges, but don't want the hassle of holding accounts on both?  
You can do it with PROFITS!  

The new design for ATPx is greatly simplified and much more modular.  
It is designed to be easy to extend and maintain so new users can jump in and fiddle with things and power users can do amazing things.  

ATPx is comprised of a core set of features called the ATPx engine.
The rest of the functionality is implemented as modules.
There will be modules for each exchange.
Trading logic will also be pluggable in the form of modules.  
This means if you'd like to use a stochastic oscillator instead of the default VWAP Cross, you just drop it in and go.

There will be a common API for these modules, so it should be a simple matter to add a new exchange or new trading logic by dropping a module in the modules directory and telling it to reload.

Trading Logic Modules...
I will only be implementing VWAP Cross trading logic for the trading module, there will be other trading modules such as a stochastic oscillator and a pure AI module available commercially.

Everything Aido implemented will also be carried over and I will attempt to put it into a module with his assistance.

The first exchange modules will be for BitBox.mx (formerly BitMe), MtGox.  BTC-e will follow along shortly after.
I am doing it in this order because what little funds I have are all on these exchanges, thus they're the only ones I'm planning to build for at this time.

I will take requests for additional exchanges in this thread, however I cannot promise that I will be able to get any, or all of them implemented in the time frame that I've got.
The hope is that others will pickup on the module concept once the API has been specified and develop extra modules, even if it's a commercial effort.

Currency Modules & Wallets...
Currencies and Wallets are implemented as modules.  For our purposes a currency is something you can actually manage within a wallet without the need for an exchange to facilitate transfer in almost all cases this will be crypto-currencies, the sole exception I can think of is CAD which may have a path for electronic trading via their new "MintChip".  I'll have to look into that further before I can make a comment on it.   This is different from currency pairs which are managed virtually on an exchange.  There will be a wallet for each supported currency.  I will definitely be implementing a bitcoin wallet and will likely implement a litecoin wallet if I can find a path for it. 

Our own internal altcoin will also of course have a wallet module in the system, but the new altcoin is the subject of another discussion because I need to ensure that it will pass legal muster first.  For the record, the internal altcoin won't have any particular preferential treatment in ATPx, ATPx will just treat it like any other currency.

Potentially all currencies can be handled through the use of individual wallet modules, someone just needs to write the modules.

Finally, there will also be a GUI that you can run to communicate with your ATPx bots.  
This GUI will communicate over a secure encrypted connection to get updates in realtime.  It will use the same whispernet system that the bots use to communicate with one another, so you will be able to stream live trading data direct to your GUI and literally see what your bots are thinking.
By doing it this way if someone wants to offer a better GUI, it can be built directly on top of the protocol.

I hope you find this exciting.  The work to do this has already begun and the first commits will occur this week.  
There will be a defined weekly development cycle and I've got a project plan I will make available on the OpenPay github site in the coming days.
Enjoy!

Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
1715114494
Hero Member
*
Offline Offline

Posts: 1715114494

View Profile Personal Message (Offline)

Ignore
1715114494
Reply with quote  #2

1715114494
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715114494
Hero Member
*
Offline Offline

Posts: 1715114494

View Profile Personal Message (Offline)

Ignore
1715114494
Reply with quote  #2

1715114494
Report to moderator
1715114494
Hero Member
*
Offline Offline

Posts: 1715114494

View Profile Personal Message (Offline)

Ignore
1715114494
Reply with quote  #2

1715114494
Report to moderator
1715114494
Hero Member
*
Offline Offline

Posts: 1715114494

View Profile Personal Message (Offline)

Ignore
1715114494
Reply with quote  #2

1715114494
Report to moderator
dwolfman
Full Member
***
Offline Offline

Activity: 224
Merit: 100



View Profile WWW
June 02, 2013, 08:11:53 AM
 #2

I'll be the first to ask for CampBX to be added.  Smiley

Wanna send coins my way? 1BY2rZduB9j8Exa4158QXPFJoJ2NWU1NGf or just scan the QR code in my avatar.  :-)
Ianwhitbread
Member
**
Offline Offline

Activity: 101
Merit: 10


View Profile
June 02, 2013, 08:34:59 AM
 #3

Great news

Yes I am one that will pay for the Ai version

One question

If your billy nomates or simply don't trust anyone

Are you able to run multiple bots on one machine or would you run them in different VM's?
Love that idea of the cross market trading
Ianwhitbread
Member
**
Offline Offline

Activity: 101
Merit: 10


View Profile
June 02, 2013, 08:38:45 AM
 #4

Also

Do you have a rough idea on cost

Or have a version that take a percentage of profits

Or even. Have an introduction offer for early buyers  Wink

So many questions,

Thanks

Aido
Sr. Member
****
Offline Offline

Activity: 248
Merit: 250


1. Collect underpants 2. ? 3. Profit


View Profile
June 02, 2013, 12:25:18 PM
 #5

exciting and ambitious stuff!

I'll assist wherever I can.

Interesting Bash command line, try it Wink:
bitcoin-cli sendtoaddress 1Aidan4r4rqoCBprfp2dVZeYosZ5ryVqH6 `bitcoin-cli getbalance`
Ianwhitbread
Member
**
Offline Offline

Activity: 101
Merit: 10


View Profile
June 02, 2013, 01:00:01 PM
 #6

Yes very. Can't wait
Nova! (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 101


View Profile
June 02, 2013, 10:12:01 PM
 #7

exciting and ambitious stuff!

I'll assist wherever I can.

Yeah Aido I hope so.  Your programmable trading logic is going to need to be broken out into a seperate module and frankly I'm not 100% sure on what half that stuff does.  Smiley
I will get you specs as soon as I finish writing them.  At the moment the entire spec is in my brain waiting for me to code a reference implementation and a harness to test it.

We will be moving off the current system of tracking the tickers in an array list and instead store them in a DB and having the ticker monitor for an exchange fire an event to registered listeners when a tick occurs.  It will be up to the listeners to fetch the historical data from the DB (they will get the current tick though).
That is the key difference from your perspective.

Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
Nova! (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 101


View Profile
June 02, 2013, 10:31:55 PM
 #8

Also

Do you have a rough idea on cost

Or have a version that take a percentage of profits

Or even. Have an introduction offer for early buyers  Wink

So many questions,

Thanks



The cost is free, it's an open source project.  The costs for commercial modules will depend on the supplier.  
For the ones I create, I won't be able to provide long term support to individual customers so my plan is to sell the distribution rights to the highest bidder with the expectation that they commercialize it.  What they charge will be up to them.  My business plan entails taking the proceeds from module sales and using it to fund the other aspects of the OpenPay ecosystem that need cash (smartcards, regulatory fees, etc).  Then OpenPay will be gifted to the community.
If they want to charge a percentage or a yearly or monthly licensing fee or just a one time cost that would be up to them.

Those who participate in the development of ATPx like Aido will of course have a license to commercial modules for whatever purpose.  It's just that for instance a true AI, would technically constitute "the giving of investment advice" and so I'm not sure it can be sold by anyone who isn't a licensed stockbroker.  It wouldn't stop the adventurous from participating in the development and using their copy for their own personal gain though.  Smiley

Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
Nova! (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 101


View Profile
June 02, 2013, 11:07:04 PM
 #9

Great news

Yes I am one that will pay for the Ai version

One question

If your billy nomates or simply don't trust anyone

Are you able to run multiple bots on one machine or would you run them in different VM's?
Love that idea of the cross market trading

You can run multiple bots on a single machine.  The purpose of having each exchange run as it's own bot is to prevent the whole system from crashing just because an exchange changes something (*cough* MtGox's cheapy SSL certs *cough*).  This allows you to quickly determine if the software puked, or if they changed something.  (Oh my MtGox bot is offline, maybe I should investigate it). 

It also makes scaling easier later on, eventually I envision that there will be exchanges in every country specializing in their own particular market.  The current design uses 1 thread per currency per exchange that needs to go away.  Even on my Quad Core laptop it's taxing to just trade all the pairs on MtGox. 

Having a single thread per module makes a lot more sense and so does having them put their data into a DB or a memcache structure of some kind if latency could be an issue, then communicating between themselves using a whispernet.

One other design change I failed to mention.  There will be a wallet for each supported currency.  I will definitely be implementing a bitcoin wallet and will likely implement a litecoin wallet if I can find some help on it.  Our own internal altcoin will also of course have a wallet in the system, but the new altcoin is the subject of another discussion because I need to ensure that it will pass legal muster first.  For the record, the internal altcoin won't have any particular preferential treatment in ATPx, ATPx will just treat it like any other currency. All currencies can be handled through the use of individual wallet modules, someone just needs to write them.

 


Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
Nova! (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 101


View Profile
June 03, 2013, 12:06:31 AM
 #10

I modified the original description to include a description of currencies and wallets.

Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
Nova! (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 101


View Profile
June 03, 2013, 06:26:30 AM
 #11

I've had a couple of PMs about this so I figure I'll answer these questions here so I don't end up repeating myself.

The whispernet system (and by extension the GUI) will utilize the FIX protocol for communications.
Specifically the QuickFIX/J implementation.

Also the bitcoin wallet will probably just be a loose wrapper over bitcoin RPC so you can communicate with whatever wallet you want (make sure it's configured for RPC over SSL).  
It should also make dealing with other altcoins easier.

Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
nii236
Member
**
Offline Offline

Activity: 85
Merit: 10


View Profile
June 04, 2013, 10:17:11 PM
 #12

Wow I'm really excited about the mention of this new altcoin! If it can somehow be traded between OpenPay clients as a representative of value of various currencies this might pave the way to a decentralised exchange between OpenPay clients!

...Or am I misunderstanding the implications of this completely?
Nova! (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 101


View Profile
June 16, 2013, 07:33:16 PM
 #13

Wow I'm really excited about the mention of this new altcoin! If it can somehow be traded between OpenPay clients as a representative of value of various currencies this might pave the way to a decentralised exchange between OpenPay clients!

...Or am I misunderstanding the implications of this completely?

You are understanding it completely Smiley
I just don't want to announce until I'm sure of 2 things.
#1 it will work
#2 it won't cause anyone to violate the law

Here is a sort of pre-announcement.
The value of the crypto coin will itself be pegged at some ratio of XDR the IMF's special drawing rights currency. 
This will give it stability even in the face of significant market fluctuations in 1 or more fiat coins.

It will not be similar to bitcoin, litecoin or any other crypto coin. 
It will be a metacoin that can be freely exchanged with these but the exchange rate will be fixed on a daily basis.

Unlike any other crypto coin, there will be no single canonical blockchain.  I'll have to explain how that part works later, but the jist is you should be able to spend your funds without any more information and connectivity than could be placed on an EMV compatible smartcard.

It's based on the thought that generation, validation and spending are different actions and different paths through the same system.

Furthermore the generation process is completely different from any other alt coin.  To generate funds you have to do more than simply add hashing power.  You need to donate real computing power and real storage & network capacity.  The rate at which you generate currency is directly proportional to the amount of computing, storage and network capacity you add to the system as well as your proximity (in terms of ping time) to other miners.  This means that currency generation could never be asic'd even if the validation of the currency can be.  It also means with this altcoin you are much better off with a run of the mill desktop computer, than with a GPU, FPGA or ASIC rig.  It also means you can use the miner for this currency to mine other crypto-coins (including bitcoin & litecoin) simply by adding it as a "useful work" request and spending into it.

Clearly this is not something I can implement at the moment.  ATPx provides a framework to allow for it and thus ATPx is the first step of many along this pathway.   It will present itself a nothing more than a currency module for ATPx.  When it's ready to roll, anyone running ATPx will be able to participate in it simply by enabling it as an option and setting their donated CPU, Storage space and Network speed allotments.

Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
Viceroy
Hero Member
*****
Offline Offline

Activity: 924
Merit: 501


View Profile
June 16, 2013, 07:47:37 PM
 #14

watching Lips sealed
Ianwhitbread
Member
**
Offline Offline

Activity: 101
Merit: 10


View Profile
June 16, 2013, 09:14:25 PM
 #15

Got my eye on this too

Sounds like I should get some more disk space

And also a pref option on the location of the space

As my system disk is a small Ssd

Nova! (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 101


View Profile
June 17, 2013, 12:43:41 AM
 #16

This has nothing to do with the altcoin I was mentioning before and altcoins aside, I've come to realize as I'm building this that there needs to be some sort of trust based system in place for the peer 2 peer exchange element to really take off.
I want to bounce an idea off you guys.

Imagine a trade scenario like this...
I have paypal and it's in good standing, I've never issued a single chargeback, but because there are lots of folks who have, there is no easy way for me to convert paypal to bitcoins and of course the reverse.  There is always the risk of a chargeback.

However if someone knew that I was reputable, then they would probably take paypal for my bitcoins and vice/versa.
But how do I prove to the world that I'm trustworthy?

How can we enforce trust in this system?  Specifically how can we disincentize bad actors while encouraging good actors.
I'm envisioning a trust-chain.  Similar to bitcoin's blockchain but comprised exclusively of reputation credit.

For each transaction that completes successfully, there is a report made to the system and both sides get 1 point. 
However if a dispute later erupts, either side can relay the dispute and the trust-credit is automatically revoked for both. 
Here's the kicker though.  Trust is semi logarithmic.

To get a trust score of 1 requires 10 transactions, 2 is 100, 3 is 1000, 4 is 10000 etc.
However a dispute will take you down 1 whole step.

To prevent the obvious hack of filling a million transactions between machines you own, the trust score would need a regulation mechanism, i.e. a max increase per period of time, so perhaps it takes a month to go from 1 step to another and that counter resets each time a dispute is filed.

Note that this would just be a publicly viewable shared database, it's not intended for use as a currency, coin, store of value or money transfer system.  It's just meant to be a reputation management system.  It's intended to reward good actors but to severely punish bad actions.  First reputation is added and then disputes are subtracted from the logarithmic total.  So if you have a dispute it will take you 10 times as long to get any future step as someone who had no disputes.  There are also those who may chose to only deal with established operators who have a year or more with no disputes.  To prevent blackmail or extortion, it would probably be a good idea to have a dispute expire out after a fixed length of time such as a month or a year if there are no other disputes in that time frame and to also limit dispute counts against you to 1 per party, but since both sides take a reputation hit, either of those may not be necessary steps.

Thoughts?

Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
Aido
Sr. Member
****
Offline Offline

Activity: 248
Merit: 250


1. Collect underpants 2. ? 3. Profit


View Profile
June 17, 2013, 01:12:07 AM
 #17

hhmmm.

The first thought that came to mind was what happens with a dispute between a highly reputable party i.e. very high trust score and party with a low trust score. As the score is logarithmic, the 'pain' of a dispute is unfairly weighted on the party with the higher trust score.

Or am I totally misunderstanding the concept?

Slightly off topic, have you been following developments here: https://bitcointalk.org/index.php?topic=212490.0 and here: https://bitcointalk.org/index.php?topic=225954.0

My head hurts trying to understand it but it seems to negate the need for trust or reputaion: http://bitcoin.stackexchange.com/questions/517/how-can-a-single-person-operation-keep-a-collection-of-online-wallets-secure/834#834

Interesting Bash command line, try it Wink:
bitcoin-cli sendtoaddress 1Aidan4r4rqoCBprfp2dVZeYosZ5ryVqH6 `bitcoin-cli getbalance`
Viceroy
Hero Member
*****
Offline Offline

Activity: 924
Merit: 501


View Profile
June 17, 2013, 01:15:20 AM
 #18

I don't understand the need for trust.  If the payment is non-reversible what do you gain?  I can understand this in regard to trading but not everyone trades.  Many people just buy or sell or buy and hold or mine and sell; the number of people who trade and need trust is small.  I also think this is off topic and you run the risk of diverting the audience from the "task at hand".

My BTC0.02

Nova! (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 101


View Profile
June 17, 2013, 01:25:14 AM
 #19

I don't understand the need for trust.  If the payment is non-reversible what do you gain?  I can understand this in regard to trading but not everyone trades.  Many people just buy or sell or buy and hold or mine and sell; the number of people who trade and need trust is small.  I also think this is off topic and you run the risk of diverting the audience from the "task at hand".

My BTC0.02



Yeah you're probably right.

Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
Nova! (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 101


View Profile
June 17, 2013, 01:54:37 AM
 #20


Slightly off topic, have you been following developments here: https://bitcointalk.org/index.php?topic=212490.0 and here: https://bitcointalk.org/index.php?topic=225954.0

My head hurts trying to understand it but it seems to negate the need for trust or reputaion: http://bitcoin.stackexchange.com/questions/517/how-can-a-single-person-operation-keep-a-collection-of-online-wallets-secure/834#834

Not really, Holy Grail is just allowing peer discovery via bitmessage, i.e. you don't need a domain name or IP address.  Our code base has the same thing and calls the concept Whispernet.  You put in the whispernet address of the other bot and the message system finds them.  The message has the potential to execute actions, hence it's opt in, probably with a whitelist. 

For instance if you put a BTC-e connected ATPx instance in Russia and a MtGox connected one in Tokyo, neither of those exchange connected servers would need to know where the other is located at, just which whispers to listen for.  They would then work out on their own how to solve arbitrage windows and you could profit from this.

Process looks something like this.

I put up a MtGox bot, you have a BTC-e bot.
They chat back and forth about currencies and an arbitrage window is noted.
It's buy on BTC-e and sell on MtGox with a 5USD spread.
The two bots agree as follows.
 
1. BOT1 - SELL|1 BTC.MTGX@USD.CURRENT
2. BOT2 -  BUY|1 BTC.BTC-E@USD.CURRENT
3. BOT2 -  XFR|1 BTC[BOT1.BTCADDR]
4. BOT1 -  XFR|102.5 USD.OKPAY[bot2@myemail.com]

You'll note that the only part of this that actually needs to execute is 3 & 4 though, so the entire thing is the plan, but 3 & 4 are the contract.

Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
Pages: [1] 2 3 4 5 6 »  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!