Sunday, May 11, 2014

Rough draft of the exchange software (works for anything)

            //selling IBM
            TransactionItem item = Transaction.Sell("100 IBM", "myCommerceID");
            TransactionItem terms = Transaction.Terms(item.TransactionID, "5000 USD", "myCommerceID");

            item = Transaction.CorrespondingValue(item.TransactionID, "4900 USD", "hisCommerceID");

            item.Accepted();  //becomes a contract here

            TransactionItem deliverStock = Transaction.Delivered(item.TransactionID, "100 IBM", "myCommerceID");
            TransactionItem deliverCash = Transaction.Delivered(item.TransactionID, "4900 USD", "hisCommerceID");

            Transaction.Completed(item.TransactionID, "complete", "myCommerceID");
            Transaction.Completed(item.TransactionID, "complete", "hisCommerceID");

            //buying IBM
            TransactionItem item2 = Transaction.Sell("5000 USD", "myCommerceID");
            TransactionItem terms2 = Transaction.Terms(item2.TransactionID, "100 IBM", "myCommerceID");

            item2 = Transaction.CorrespondingValue(item2.TransactionID, "100 IBM", "hisCommerceID");
            item2 = Transaction.Modify(item2.TransactionID, "5100 USD", "hisCommerceID");

            item2.Accepted();


Database:


1 faeb6594-ca25-494c-b506-2b8cc76f06fb myCommerceID Initiating Value 100 IBM 2014-05-11 15:23:50.493 NULL
2 faeb6594-ca25-494c-b506-2b8cc76f06fb myCommerceID Terms 5000 USD 2014-05-11 15:23:53.813 NULL
3 faeb6594-ca25-494c-b506-2b8cc76f06fb hisCommerceID Value 4900 USD 2014-05-11 15:23:53.833 2014-05-11 15:23:53.847
4 faeb6594-ca25-494c-b506-2b8cc76f06fb myCommerceID Delivery 100 IBM 2014-05-11 15:23:53.853 NULL
5 faeb6594-ca25-494c-b506-2b8cc76f06fb hisCommerceID Delivery 4900 USD 2014-05-11 15:23:53.860 NULL
6 faeb6594-ca25-494c-b506-2b8cc76f06fb myCommerceID Completed complete 2014-05-11 15:23:53.867 2014-05-11 15:23:53.867
7 faeb6594-ca25-494c-b506-2b8cc76f06fb hisCommerceID Completed complete 2014-05-11 15:23:53.873 2014-05-11 15:23:53.873
8 24370bb9-ac0c-4546-bcd7-dd131f5f7aa4 myCommerceID Initiating Value 5000 USD 2014-05-11 15:23:53.880 NULL
9 24370bb9-ac0c-4546-bcd7-dd131f5f7aa4 myCommerceID Terms 100 IBM 2014-05-11 15:23:53.883 NULL
10 24370bb9-ac0c-4546-bcd7-dd131f5f7aa4 hisCommerceID Value 100 IBM 2014-05-11 15:23:53.887 NULL
11 24370bb9-ac0c-4546-bcd7-dd131f5f7aa4 hisCommerceID Modification 5100 USD 2014-05-11 15:23:53.893 2014-05-11 15:23:53.900


Saturday, March 22, 2014

Imagine you are running a stock exchange using the Promise Language specification

Initiating Promise:    100 IBM
Notice - accept: 5000 USD

Initiating Promise:    5000 USD
Notice - accept: 100 IBM


Note the structure is identical for both the Bid and the Ask.  Effectively this means everything is a commodity.

"Notice" messages become part of the contract.  Terms and late payments can be specified.  Clearing companies as well.

Monday, March 17, 2014

The Origin of Money

Once upon a time, some guy had an orange and you wanted it.  So you offered to trade a banana for his orange.  But your banana was way back at your hut.  So you picked up a seashell or something and handed it to him in exchange for his orange.  You promised to go get your banana and deliver it later.  That is the origin of money.  The seashell was a symbol that represented a contract to deliver a banana.

Alternatively, both people could have yelled out to the surrounding village that you owed that person a banana.  Then you didn't need the seashell.  Everyone knew you owed that person a banana.  Then you go back to your hut the next day and get the banana.  Then you yell out to the village that you paid back the banana.  Let's hope that banana did not go bad overnight.

Would it be possible to have a computer store these transactions so the villagers wouldn't have to remember?

Sunday, March 16, 2014

Closing out the transaction and EDI format

See below for the context, but two more EDI messages might be a good idea:

"Completed" to show that both sides delivered on their promises and all was acceptable.

"Closed" with a something in the description field to describe transactions that were voided or otherwise rectified if disputed.

The solution to money

Promise Language is a standard way to yell to the global village who owes what.  If placed into a peer-to-peer database, all promises would be tracked.  Open promises and delivered promises.  I was thinking today how to design that database:

Promise table

Type of entry (Initiating promise, promise, notification)
Id (GUID for that promise or a GUID corresponding to the person)
Description (describes what was promised)
TimeStamp

So.. it would work like this:

[transaction]
  [promise]
    1 banana
  [endpromise]
  [promise]
    1 orange
  [endpromise]
[endtransaction]

One entry for the Initiating Promise:  my Id, his Id, "1 banana", 12/21/2003 12:15:34
One entry for the Promise:  his Id, my Id, "1 orange", 12/21/2003 12:15:45
One entry for the Delivery: his Id, my Id, "1 orange", 12/21/2003 12:15:48
One entry for the final Delivery: my Id, his Id, "1 banana", 12/22/2003 8:23:32

That's it.


Now.  That shows you made good on your promise.  That's your rep.  Now you can go anywhere in the world with the Promise App that shows your history of promises.

It's free.  No transaction fees.  Works with any currency on earth.
Newer Posts FOR MORE, CLICK OLDER POSTS ----> Older Posts