IMO the basic building blocks of TradeNet are
- Digital identity. My proposal, "SIN", is https://en.bitcoin.it/wiki/Identity_protocol_v1 (alas, this is spec is a jumble, and difficult to read)
- Decentralized market software: anyone should be able to create their own market, or join another market. This software permits multiple market types to be created or managed: classified ads, auctions, kickstarter-like funding, commodity exchange/short/option/future and more. This must be open source, available for all. Open-Transactions "could have been" this, but I am not happy with its format specifications, quality of code and other features and factors. OT would also need to be upgraded to support SINs.
- Decentralized messaging: some method for humans and agents to communicate with one another. BitMessage is a nice attempt, but riddled through design and implementation problems today. Maybe B.M. will fill this role, maybe something else will arise, time will tell.
Digital identity and reputation ties everything together. A human or agent may be participate in a market by identifying themselves, and exchanging digitally secure messages.
Can you narrow this down to something minimal? A very basic prototype that would fulfill at least the base functions. Lets say you had to sit in a room for a month and build something that works. How would you go about it?
Well, for identity (SIN), the basics needed to generate a new SIN, and verify something signed with an ECDSA key, already exist in
https://github.com/gasteve/node-libcoin I have been committing code there (SIN.js, SINKey.js) and more is coming soon, including test vectors.
A SIN is so close to a bitcoin address that much of the bitcoin verify/sign infrastructure may be easily reused.
For markets, the goal is that users -- humans or agents -- may (1) discover markets that already exist or (2) create a new market and advertise its existence. Once a market is active, users must be able (3) advertise goods for sale, (4) view advertised goods, and (5) offer to purchase goods.
So, answering "how would you go about it?" for TradeNet, creating a platform where agents could talk to each other,
An off-the-cuff, five-minute, you-could-do-better, something-that-works design might then be:
A) Clone the low-level P2P bitcoin network protocol, and create a flood-fill, address-gossip network. Mostly done, here:
https://github.com/jgarzik/smartcoinB) Change protocol buffer definition at
https://github.com/jgarzik/smartcoin/blob/master/codec.proto to include obvious messages derived from paragraphs above: "create-market", "get-market-info", "advertise-market"
This accomplishes the goal of #1 and #2, above. Humans and agents then choose a market they need, and connect directly to that market.
C) Create protocol, client and server, with messages: "advertise-item", "list-advertised-items", "item-info", "item-offer"
D) To sell something, an agent logs onto the P2P network, chooses a market ("cars in Austin, Texas") or creates one, and advertises their good for sale.
E) To buy something, an agent logs onto the P2P network, chooses a market ("cars in Austin, Texas"), and searches that market for desired items. Purchase information (bitcoin payment address, payment protocol URL, ...) is obtained, and bitcoin payment process begins.
All messages are digitally signed with your SIN (identity).
Assuming that all agents conform to the same protocol when naming markets and items, one may easily see how agents may locate one another, and participate in open markets.
That would be my minimal get-it-working decentralized TradeNet. Possibly rather than P2P, the cjdns protocol should be considered.
Answering "how would you go about it?" for a StorJ-like agent itself... it's just a freaking HUGE problem that involves a lot of work, quickly getting into the weeds.
F) Create a daemon with a bitcoin wallet, that may understand digitally signed messages sent to it.
G) Create the file download module described in StorJ.
(so far, it just looks like a basic bitcoin web service)
H) Create a proxy module, whereby you send work A->B->C and return results C->B->A, and verify that the results match those locally generated, from local data storage.
I) If local site is profitable, search on TradeNet for required OS/mem/cpu/storage/bandwidth/API requirements, and purchase service
J) Or advertise on TradeNet for someone to create an API etc...
Past "H" you start getting incredibly complex, and an "it just works" implementation quickly becomes a herculean task you must break up into much smaller pieces. For example, step "I" might require creating a business that resells AWS/Rackspace cloud services for bitcoins, complete with the API necessary for an agent to load itself onto a VPS.
Remember, "load itself onto another VPS" is quite complex, by itself. You must verify that the OS environment matches the requirements for your agent: Does it need a compiler? Does it require a specific Linux version, or will OSX/Windows work also? What versions of libraries are needed for the agent to successfully run? Once the basic environment is verified as "suitable for agent life," you have to write all the code that is involved in basic system administration. You must set up OS firewall, root passwords, SSH keys, and many other installation details besides that of copying the agent software itself.
Therefore, my general advice is: pick a small part of this problem, work on that, complete it and test it, and then pick another small piece of the puzzle. Iterate and repeat. Eventually an agent will emerge!
As far as making a StorJ like system everything seems pretty straight forward, except the actually hosting part. I can't really find a nice "cloud service" with nice APIs that takes Bitcoin listed in the Trade wiki. Instances need to be able to launch new nodes, preferable without human help.
RE APIs: in theory, an agent would hire a human to build an API, where none exists today. An API is always possible, even if it is an ugly screen-scraping unofficial API.
Or, someone can build a business by reselling Amazon Web Services or Rackspace Cloud API via bitcoin payments. 5% markup, just have to filter out service abusers to make sure you don't get cut off.
Yes, you can do this but you run into
twoone major hurdle
s.
1) Cost.
Even a small node is going to run you $44 a month. Ran the per GB numbers again, and actually that might just work. Thanks for that.
"5%" was a pulled-out-of-my-ass number.
I am certain there is
some price at which this is a profitable business plan. (whether customers appear at that price is another question...) It is the standard business problem.
Just calculate the cost to do this, including possible support costs (your time is valuable), and add 10%.
2) Filtering out services abusers is going to be pretty hard. Even for services like Paypal the abuse rate is pretty high for VPS hosts. This is why my main hosting provider, Digital Ocean, would not accept Bitcoin. They feared that the abuse rate would be too high. Maybe someone who owns a Bitcoin host can chime in? If Amazon decides that there is abuse within the account they might just shut it down, so you might have to do some leg work to actually let them know you are only reselling their services, and that abuse requests should dealt with on a case by case.
It is not as difficult as you might think.
Remember, SINs are digital identities that build reputation. You may whitelist SINs that previously were good customers, or blacklist SINs that are abusers.
Further, there is time cost for criminals and abusers, and this plays in your favor: a simple 24-hour delay after setting up a new account for an unknown user can do wonders. Or a simple phone call + 24 hour wait. Most abusers want to strike immediately, then disappear. Normal, good customers do not have this pattern necessarily.