Bitcoin Forum
March 29, 2024, 12:36:17 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Smart Contracts - a suggested format  (Read 1124 times)
andrewbb (OP)
Member
**
Offline Offline

Activity: 81
Merit: 10


View Profile
July 26, 2014, 01:28:54 AM
 #1

One table with 5 columns:

Transaction ID
Commerce ID - person/entity identifier
Item Type - initiating value, terms, value, delivery, notice, status
Description - quantity and value OR terms OR status/notice messages
Time Stamp

I think this will work for any contract or monetary transaction possible.  It's the result of studying monetary science for many years.

I have a working alpha prototype that shows viability as a stock exchange (or any other type of exchange).  Code is available, if interested.

Blockchain technology is one solution to ensure data integrity.

The Commerce ID can be chosen by the individual on a transaction basis or grouped and made public or private or combination thereof.  That provides privacy with accountability.
1711715777
Hero Member
*
Offline Offline

Posts: 1711715777

View Profile Personal Message (Offline)

Ignore
1711715777
Reply with quote  #2

1711715777
Report to moderator
1711715777
Hero Member
*
Offline Offline

Posts: 1711715777

View Profile Personal Message (Offline)

Ignore
1711715777
Reply with quote  #2

1711715777
Report to moderator
1711715777
Hero Member
*
Offline Offline

Posts: 1711715777

View Profile Personal Message (Offline)

Ignore
1711715777
Reply with quote  #2

1711715777
Report to moderator
You can see the statistics of your reports to moderators on the "Report to moderator" pages.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1711715777
Hero Member
*
Offline Offline

Posts: 1711715777

View Profile Personal Message (Offline)

Ignore
1711715777
Reply with quote  #2

1711715777
Report to moderator
andrewbb (OP)
Member
**
Offline Offline

Activity: 81
Merit: 10


View Profile
July 26, 2014, 01:35:42 AM
 #2

One might envision the "transaction stack" of selling 100 IBM for a final price of 4900 USD:

Initiating a transaction, 100 IBM, myCommerceID
Terms, 5000 USD, myCommerceID
Corresponding Value, 4900 USD, hisCommerceID
Accepted, contract, myCommerceID
Delivered, 100 IBM, myCommerceID
Delivered, 4900 USD, hisCommerceID
Completed, completed, myCommerceID
Completed, completed, hisCommerceID

The words can be changed.  That's the alpha version.  The important part is a Time Stamp on every item in the transaction stack with sufficient granularity to describe any contract or transaction.
andrewbb (OP)
Member
**
Offline Offline

Activity: 81
Merit: 10


View Profile
July 26, 2014, 01:52:26 AM
 #3

This might not be intuitively obvious, so here is a transaction stack for Buying 100 IBM for a final price of 5100 USD:

Initiating a transaction, 5000 USD, myCommerceID
Terms, 100 IBM, myCommerceID
Corresponding Value, 100 IBM, hisCommerceID
Modification, 5100 USD, hisCommerceID
Accepted, contract, myCommerceID

[deliveries on both sides of the contract]
screwUdriver
Full Member
***
Offline Offline

Activity: 346
Merit: 102


View Profile
July 26, 2014, 02:04:21 AM
 #4

I don't think this would work.

There would be just too much room for interpretation on these contracts. It would also be possible to dispute facts of the cast (for example if the product was actually delivered or not).  
andrewbb (OP)
Member
**
Offline Offline

Activity: 81
Merit: 10


View Profile
July 26, 2014, 02:25:13 AM
 #5

I don't think this would work.

There would be just too much room for interpretation on these contracts. It would also be possible to dispute facts of the cast (for example if the product was actually delivered or not).  

The above is the data format.  You are talking about validating contract specifications (Description).  

Also, the "Delivered" entry in the stack is not made until the person receiving the delivery accepts it.  The structure does support in process Deliveries and partial Deliveries.

It is "smart code" that analyzes the data during the transaction (for rollup, display, and status).
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4158
Merit: 8343



View Profile WWW
July 26, 2014, 07:32:10 AM
 #6

This doesn't seem to have anything to do with smart contracts though, perhaps you should be using another word here.

The general idea of smart contracts is that the contract itself is a kind of (very-)narrow artificial intelligence which takes care of its own enforcement.
laurentmt
Sr. Member
****
Offline Offline

Activity: 384
Merit: 258


View Profile
July 26, 2014, 02:02:46 PM
 #7

Open Bazaar and Open Transactions propose a very close concept (Ricardian contracts).
Am I right if I say that your idea is to sign contracts when they are sent to the network for validation and registration into the blockchain (like transactions in Bitcoin) ?
andrewbb (OP)
Member
**
Offline Offline

Activity: 81
Merit: 10


View Profile
July 26, 2014, 03:17:14 PM
 #8

This doesn't seem to have anything to do with smart contracts though, perhaps you should be using another word here.

The general idea of smart contracts is that the contract itself is a kind of (very-)narrow artificial intelligence which takes care of its own enforcement.

That is kind of true.  This is the data structure.  I kind of term it "smart code" that does the enforcement/artificial intelligence.  That would be application specific, of course.  But the data structure will work for ANY application.
andrewbb (OP)
Member
**
Offline Offline

Activity: 81
Merit: 10


View Profile
July 26, 2014, 03:20:04 PM
 #9

Open Bazaar and Open Transactions propose a very close concept (Ricardian contracts).
Am I right if I say that your idea is to sign contracts when they are sent to the network for validation and registration into the blockchain (like transactions in Bitcoin) ?

As I just posted above, this is the data structure only.  I have not posted the "smart code" because that is very application-specific.  


But, generally, yes.  This would be the data structure stored within the blockchain.  It follows contract law with total granularity and works for finance.  It also works for any possible "smart contract" implementation.


(fyi, I have about 15 years of software architecture experience and over 15 years of monetary science study, so I am trying to make this as simple to understand to people who might not have the same domain experience.)
andrewbb (OP)
Member
**
Offline Offline

Activity: 81
Merit: 10


View Profile
July 26, 2014, 03:28:58 PM
 #10

So, yes.  Each entry in the "transaction stack" would be sent to the blockchain.

Now.  There are OTHER ways to verify data integrity in a P2P network besides the blockchain, but that would be an application-specific implementation decision.  Also, keep in mind that data structure works for all contracts so might be implemented in a private database too.
mtomcdev
Sr. Member
****
Offline Offline

Activity: 310
Merit: 250


View Profile
July 26, 2014, 04:27:35 PM
 #11

This doesn't seem to have anything to do with smart contracts though, perhaps you should be using another word here.

The general idea of smart contracts is that the contract itself is a kind of (very-)narrow artificial intelligence which takes care of its own enforcement.

Is that correct that most likely a function would be included in the smart contract using the built in Bitcoin scripting feature and that would take care of the enforcement of the contract?
laurentmt
Sr. Member
****
Offline Offline

Activity: 384
Merit: 258


View Profile
July 26, 2014, 06:25:30 PM
Last edit: July 26, 2014, 06:48:37 PM by laurentmt
 #12

Open Bazaar and Open Transactions propose a very close concept (Ricardian contracts).
Am I right if I say that your idea is to sign contracts when they are sent to the network for validation and registration into the blockchain (like transactions in Bitcoin) ?
As I just posted above, this is the data structure only.  I have not posted the "smart code" because that is very application-specific.  
But, generally, yes.  This would be the data structure stored within the blockchain.  It follows contract law with total granularity and works for finance.  It also works for any possible "smart contract" implementation.
It's good to see that different persons/teams have very close approaches on the subject.
Having a standard for this kind of thing would be great for interoperability (an old dream) !
In absence of a standard, similar approaches allow to imagine possible gateways among heterogeneous systems.

(fyi, I have about 15 years of software architecture experience and over 15 years of monetary science study, so I am trying to make this as simple to understand to people who might not have the same domain experience.)
Thanks for that. The first time I've read the term "ricardian contract", it sounded like a very complicated concept. A bit intimidating !

Do you plan to release some sample code or a document giving more details about some use cases ?
Seeing how this data structure can be used in the context of specific use cases would be very interesting.
Pages: [1]
  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!